Go Down

Topic: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches (Read 306751 times) previous topic - next topic

Jantje

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

innodron

Importing Cayenne also imports ESP8266Wifi, Ethernet, SD, SPI, Wifi, and Wire libraries.  Various files from the three Wifi-related libraries cause multiple definition errors.
I am experiencing a very similar issue that, including Blynk (via menu Arduino--> Add a library to the selected project or through having #include <Blynk.h>), Sloeber imports Ethernet, SD, SPI, Wifi. Which causes compilation errors like redefinition of 'class WiFiUDP', ...:

Code: [Select]

In file included from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:29:0:
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.h:27:7: error: redefinition of 'class WiFiUDP'
 class WiFiUDP : public UDP {
       ^
In file included from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/utility/wifi_drv.h:26:0,
                 from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:26:
/Users/ozkanserin/Developer/cpp/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiUdp.h:32:7: error: previous definition of 'class WiFiUDP'
 class WiFiUDP : public UDP, public SList<WiFiUDP> {
       ^
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp: In constructor 'WiFiUDP::WiFiUDP()':
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:35:22: error: class 'WiFiUDP' does not have any field named '_sock'
 WiFiUDP::WiFiUDP() : _sock(NO_SOCKET_AVAIL) {}
                      ^
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp: In member function 'virtual uint8_t WiFiUDP::begin(uint16_t)':
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:45:9: error: '_sock' was not declared in this scope
         _sock = sock;


@chantling

The bad news is:
What you are experiencing is a weel known issue with Sloeber with a workaround described here.
https://www.patreon.com/posts/defines-before-6795548
Unfortunately I cannot view the content in this link; saying patrons only  ::) .



The good news is that I released V.4 and V4.0 fixed this problem.
I have the plugin version 4.1.0.201705252335, on a newly installed Eclipse CDT Oxygen 4.7.1 on Mac OSX.


I have tried;
- deleting the release folder,
- then menu:Arduino--> Add a library, deselect Ethernet, SD, SPI, WiFi leaving Blynk checked
- they disappear from includes in Project Explorer however for a brief while, until plugin adds them again
during workspace rebuild

I had been happily developing for an ESP8266 Thing Developer with this plugin without an issue until I had  to add Blynk libraries. The sketch compiles fine with Arduino IDE (which I do not want to use unless I have no other option).

A simple Blynk example without any extra code does not compile either, complaining about same multiple-definitions in WiFi library.

I will appreciate any help. Thanks in advance.

Jantje

Setting the cdt indexer settings as described here should fix this issue.
https://github.com/Sloeber/arduino-eclipse-plugin/issues/825
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

proddy

Hi everyone, ESP8266 question

Just made the switch from PlatformIO to Sloeber as I miss working in a real IDE.

Installed the latest 4.1 (also tried the nightly build) but don't see ESP8266 in the Paltforms/Boards as it's described in the video https://www.youtube.com/watch?v=S_QTMNhaDwM .

Am I missing something?


Jantje

ESP8266 have changed something on their server causing the file to fail to download
see this issue for more detail https://github.com/Sloeber/arduino-eclipse-plugin/issues/743
I copied the file to my server and added code to download this file instead of the original one but that caused issues as well
So I have removed this in mylatest version.
ESP8266 never responded to my questions on how to download  the file. I can't even understand why they put limitations on the download anyways
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

proddy

Ah ok. I managed to get it working by adding "http://arduino.esp8266.com/stable/package_esp8266com_index.json"  to the 3rd party URL list.

innodron

Setting the cdt indexer settings as described here should fix this issue.
https://github.com/Sloeber/arduino-eclipse-plugin/issues/825
I had upgraded the plugin today to 4.1.0.20171003 from nightly builds before I saw your response. After the upgrade the issue had been resolved somehow - without changing indexer settings - no longer giving duplicate definition compilation errors, although the plugin had added a few libraries

Then, I made changes to the indexer as you suggested above. Removed Blynk and additional libraries from the project, cleaned and added Blynk again. This time no additional library added to the project.

It seems all issues resolved. Thanks for the help.

Jantje

>It seems all issues resolved. Thanks for the help.

good

As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back!
As a supporter you can drag our attention and prioritize your submission...
please become a supporter!
https://www.patreon.com/jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Meinzi

Hi I am new here and I dont know if I am right here to ask a question about Local Debug on Sloeber Arduino.
I have installed the 4.1 Version of plugin Sloeber.

Now I have tried to implement debug function to Sloeber.
I made as it is described in video tutorial. (https://www.youtube.com/watch?v=ZN-rLSyhBN8&list=PLCSjf7QmP3TDPSjT_5UIp0DHXzKdhIQsF&index=4)

But now after all i tried to compile in localdebug and it shows me the error:

20:09:00 **** Incremental Build of configuration localdebug for project blink ****
"D:\\Arbeit\\sloeber\\arduinoPlugin\\tools\\make\\make" all
'Building file: ..\.ino.cpp'
'Starting C++ compile'
"/bin/g++" -c -g -O0 -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -DF_CPU=8000000L -DARDUINO=10802 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR_LOCAL -DLOCAL_RUN  -I"D:\Arbeit\git\hardware\jantje\avr_local\cores\arduino" -I"D:\Arbeit\git\hardware\jantje\avr_local\variants\avr:1.6.20:eightanaloginputs" -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "..\.ino.cpp"  -o  ".ino.cpp.o"  -Dsrandom=srand -Drandom=rand
Das System kann den angegebenen Pfad nicht finden.
subdir.mk:24: recipe for target '.ino.cpp.o' failed
make: *** [.ino.cpp.o] Error 1

20:09:01 Build Finished (took 450ms)


As i understand it tried to call "/bin/g++" which is not possible cause also the command console doesnt find the path of g++.exe.

If it would be called simple with "g++" it will be found due to the windows path implementation shown in the video. I checked this in a cmd console!
What is wrong?
Can you help me?

best regards Klaus

Jantje

@klaus
Thanks for becomming a patron.
I have been working on debugging the last weeks and things have changed a lot. It is all a lot easier easier now.
I'm planning to make a video on it and as a patron you'll be with the first ones to see it. But it is so easy a video is not really needed :-)
When you upgrade to the nightly and use the json file https://raw.githubusercontent.com/jantje/hardware/master/package_jantje_index.json and install the pc boards you should be able to get local debugging up and running.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Meinzi

Hi Jantje

As I understood right I should update the Json File which is located in the hardware>target section of project  explorer.

I just copied the new content into the old file for replace and saved it.
I just see that the file wich you gave me yesterday has an older version 1.0.0, than that one I replaced. The given checksum inside the Json file is also same ??

After this I tried to compile but same problem than before.  :smiley-confuse:

regards Klaus

Jantje

There is no need to copy files around.
Sloeber does not check the checksum and sizes so I do not always bother to update them.
But it looks to me you miss basic sloeber knowledge. I'll try to get the video's out this week.
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Meinzi

Hi
Yes of course I am new at Sloeber, but I already did wirte software for Atmel 8 Bit cpu's.
I did use Atmel Studio in a much older version than the current version 7 which comes now with the posiblilty to import Arduino projects and of course debugging or code simulation function.

At Arduino I did only simple projects with no need of any debugging feature.
But now I do need this ability and so i came to sloeber.

Is there a posibility to do at least code simulation on Pc. Hardware debugging is not realy needed at the moment.

I do not use the Uno board and i do not use 32bit processor's.

Currently I only use 8 bit Arduino boards.
So how can I induce sloeber to simulate a written code (for an Arduino pro mini board for example)?

best regards Klaus

Jantje

I'm sorry but I didn't get to making the video.
It is  however very similar to the hardware zero debug.
https://www.youtube.com/watch?v=DXTo4-0pWKA
As I'm currently running lots of test for the V4.2 release and preparing for Rome maker fair there is little space for new video's.
Note that I release Sloeber video's earlier to my patrons.
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Headroom

On my iMac I currently use Slober 3.1 (ancient) and an even more ancient version 1.30 of Teensyduino.

I installed Sloeber 4.1 (stable) on my new MacBook Pro and the latest Java JDK 9.
That is one step ahead of what is documented on the sloeber.io website, which is 8.

I can start Sloeber and it asks for a work space directory, bu when I accept the default it responds with the error message.

The log file this error message points to is attached. Not having any java background I have no idea where to even start looking for a root cause, other than installing JDK 8, but I've installed higher java versions before and it's never been a problem.

Help is appreciated!
http://trippylighting.com

http://ledshield.wordpress.com/

Go Up