Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches

Hi Jantje,

Thanks for the quick reply, the solution from issue 1028 will indeed solve the # include filename error, however the other error is still there.

"C:\sloeber\/arduino-esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++" -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-IC:\sloeber\/arduino-esp32/tools/sdk/include/config" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/bluedroid" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/bluedroid/api" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/app_trace" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/app_update" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/bootloader_support" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/bt" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/driver" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp32" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp_adc_cal" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp_http_client" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp_https_ota" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp-mqtt" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/esp-tls" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/ethernet" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/fatfs" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/freertos" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/heap" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/http_server" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/jsmn" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/log" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/mdns" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/mbedtls" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/mbedtls_port" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/newlib" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/nvs_flash" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/openssl" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/spi_flash" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/sdmmc" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/smartconfig_ack" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/spiffs" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/tcpip_adapter" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/tcp_transport" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/ulp" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/vfs" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/wear_levelling" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/xtensa-debug-module" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/lwip" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/coap" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/console" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/expat" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/json" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/newlib" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/nghttp" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/soc" "-IC:\sloeber\/arduino-esp32/tools/sdk/include/wpa_supplicant" -std=gnu++11 -fno-exceptions -Os -g3 -Wpointer-arith -fexceptions -fstack-protector -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror=all -Wextra -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -fno-rtti -MMD -c -DF_CPU=240000000L -DARDUINO=10802 -DARDUINO_ESP32_DEV -DARDUINO_ARCH_ARDUINO-ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1"  -DESP32 -DCORE_DEBUG_LEVEL=0    -I"C:\sloeber\arduino-esp32\cores\esp32" -I"C:\sloeber\arduino-esp32\variants\doitESP32devkitV1" -I"C:\sloeber\arduino-esp32\libraries\ArduinoOTA\src" -I"C:\sloeber\arduino-esp32\libraries\ESPmDNS\src" -I"C:\sloeber\arduino-esp32\libraries\Update\src" -I"C:\sloeber\arduino-esp32\libraries\WiFi\src" -MMD -MP -MF"libraries\ESPmDNS\src\ESPmDNS.cpp.d" -MT"libraries\ESPmDNS\src\ESPmDNS.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "C:\sloeber\arduino-esp32\libraries\ESPmDNS\src\ESPmDNS.cpp"  -o  "libraries\ESPmDNS\src\ESPmDNS.cpp.o"
:0:21: warning: ISO C++11 requires whitespace after the macro name
C:\sloeber\arduino-esp32\libraries\ESPmDNS\src\ESPmDNS.cpp: In member function 'void MDNSResponder::enableArduino(uint16_t, bool)':
:0:17: error: 'doitESP32devkitV1' was not declared in this scope
C:\sloeber\arduino-esp32\libraries\ESPmDNS\src\ESPmDNS.cpp:85:41: note: in expansion of macro 'ARDUINO_VARIANT'
         {(char*)"board"         ,(char*)ARDUINO_VARIANT},
                                         ^

This brings me to ESPmDNS.cpp where a symbol cold not be resolved.

|500x298

I Tried the suggestion's that has been done for a esp8266 in issue #960, but could not find the file mentioned by you.

When commenting out this line in ESPmDNS it will compiles fine. However this is not "the" solution. Any tips where to look at what the problem is with the symbol?

It is the same issue and the same solution applies https://github.com/Sloeber/arduino-eclipse-plugin/issues/1028

It works, thanks again for your help and Sloeber.

Think about this net time you get the nag screen ;-)

I'm trying to find out since hours the differences between Sloeber V4 and Eclipse C++ IDE for Arduino 3.0. Which one is the recommended tool? I tend to use Sloeber since the IDE 3.0 has an annoying bug with include resolving. But I'm still interested about your thoughts on why using Sloeber.

VicomtedeValmont: Which one is the recommended tool?

Depends on who you ask the recommendation. Given this is a Sloeber thread the recommendation here is Sloeber :-)

VicomtedeValmont: But I'm still interested about your thoughts on why using Sloeber.

My thoughts on this subject (not having been able to get "Eclipse C++ IDE for Arduino" to work ever). The main reason to use Sloeber is that it is supported far better.

Basically I bother to ... 1) write documentation and make video's on how to 2) test boards/setups I don't use. (currently more than 500 boards compile the default ino successfully out of the box) 3) be responsive when there are issues. 4) be even more responsive to people who support me on patreon https://www.patreon.com/jantje

IMHO this makes the end user experience far better because 1) I limit my response efforts by fixing issues 2) If there are issues there is help available

VicomtedeValmont: I'm trying to find out since hours the differences between Sloeber V4 and Eclipse C++ IDE for Arduino 3.0.

Both tools are build on top of CDT and as such have at least 95% the same functionality. The differences are only at the level of 1) implementation/integration differences of the arduino framework -Sloeber supports multiple versions of the same platform at the same time - 2) specific boards features -like esp debug info-. 3) What is included in the package. Sloeber product comes with everything you need to do hardware/software debug 4) Add on functionality/integrations like the x-y plotter and serial monitor 5) Support for boards which do not come in a json package (like teensy)

This is my opinion. Please share yours :-)

Jantje

Thanks for your extensive response, Jantje. I'm convinced now and will start using Sloeber. I was confused since the Arduino IDE 3.0 was preinstalled in the latest version of CDT. But Sloeber works perfectly. Good work!

Hi,
I am facing an issue in using ESP8266.
Arduino Nano works fine. But no example compiles for any ESP8266. I have installed ESP8266 board manager v2.4.2.

12:52:44 **** Incremental Build of configuration Release for project genericesp ****
“C:\eclipse\arduinoPlugin\tools\make\make” all
‘Building file: …\sloeber.ino.cpp’
‘Starting C++ compile’
“C:\eclipse\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++” -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ “-IC:\eclipse/arduinoPlugin/packages/esp8266/hardware/esp8266/2.4.1/tools/sdk/include” “-IC:\eclipse/arduinoPlugin/packages/esp8266/hardware/esp8266/2.4.1/tools/sdk/lwip/include” “-IC:\eclipse/arduinoPlugin/packages/esp8266/hardware/esp8266/2.4.1/tools/sdk/libc/xtensa-lx106-elf/include” “-IC:/Users/azhariqbal/eclipse-workspace-arduino/genericesp/Release/core” -c -Wall -Wextra -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DARDUINO=10802 -DARDUINO_ESP8266_GENERIC -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="“ESP8266_GENERIC”" -DLED_BUILTIN=11 -DESP8266 -I"C:\eclipse\arduinoPlugin\packages\esp8266\hardware\esp8266\2.4.1\cores\esp8266" -I"C:\eclipse\arduinoPlugin\packages\esp8266\hardware\esp8266\2.4.1\variants\generic" -MMD -MP -MF"sloeber.ino.cpp.d" -MT"sloeber.ino.cpp.o" -D__IN_ECLIPSE__=1 -x c++ “…\sloeber.ino.cpp” -o “sloeber.ino.cpp.o”
‘“C:\eclipse\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++”’ is not recognized as an internal or external command,
operable program or batch file.
subdir.mk:18: recipe for target ‘sloeber.ino.cpp.o’ failed
make: *** [sloeber.ino.cpp.o] Error 1

12:52:45 Build Failed. 2 errors, 0 warnings. (took 264ms)

It looks like there is a install issue.
Does '“C:\eclipse\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++” exists on your disk?
If not delete the folder C:\eclipse\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\ and deinstall and reinstall the esp8266 platform.

It exists. I removed and reinstalled the plugin with no luck. I have also downloaded sloeber single file "V4.3.1_win64.2018-10-10_08-21-58.tar.gz". Same issue in it also. (build successful for nano but no luck with any esp8266 board).

I also have Eclipse for eSi-RISC development which I use for another chipset. Could it be messing with sloeber?

01:16:00 **** Build of configuration Release for project test5 **** "C:\sloeber\arduinoPlugin\tools\make\make" all 'Building file: ..\sloeber.ino.cpp' 'make' is not recognized as an internal or external command, operable program or batch file. make: *** [sloeber.ino.cpp.o] Error 1 'Starting C++ compile' make -C "C:\sloeber\/arduinoPlugin/packages/esp8266/hardware/esp8266/2.4.2/tools/sdk/lwip/src" install TOOLS_PATH="C:\sloeber\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-" subdir.mk:18: recipe for target 'sloeber.ino.cpp.o' failed

01:16:01 Build Failed. 2 errors, 0 warnings. (took 708ms)

You can't build lwip from source unless you have lots of other stuff installed. Doesn't work in windows with Arduino IDE. Select another option for lwip in project properties->arduino

Thanks. Its working now.

This may not be the proper place for this question, if so I appologize. I have installed sloeber and it is running fine so far. I run linux and want to built the .desktop file so I can access sloeber from the favorites menue. Everything is going fine, but I can't fine the sloeber icon. That is needed to make everything work as its supposed to. I know there is an icon because when I start sloeber the orange and teal gears show up in my favorites bar (gnome desktop).

Many thanks

Have you tried the github repository?
https://github.com/Sloeber/arduino-eclipse-plugin/tree/master/io.sloeber.application/icons

Thanks, I never would have found it without that link. Appreciate the information.

is it possible to upload a sketch through ota, web or arduino style. i can't get it to work.

i mannaged to upload, it printes out by serial what the upload ipadres is, but where do i put this in sloeber.

As port state the ipadress+aspace+something else

it sudely poped up in the port selection part.
it took abou 10 minutes to showed up, for now it’s working.

Is there a way to set the library version, json library is on sloeber on version 6.x and i need 5.x
how can i change it.

it took abou 10 minutes to showed up, for now it's working. The whole bonjour stuff no longer works properly in windows 10.

way to set the library version, json library is on sloeber on version 6.x and i need 5.x Downgrade to 5.x in the library manager.

How do you configure Sloeber to embed binary data such as a certificate.

Like listed here https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#embedding-binary-data

These are the steps for platformIO http://docs.platformio.org/en/latest/platforms/espressif32.html#embedding-binary-data

I thought there must be something similar for Sloeber, but I can't find any doco.

William