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

6v6gt:
You’ve seen post #1038 ?

Yes ... but all I can see is that it's on the list of things to do. I can't see where or how EspExceptionDecoder can be added to the plugin.

When I build the ESP32_BLE_Arduino example BLE Server, I get an error in the BLEClient.cpp library source file.

The error is "Invalid conversion from 'int' to 'esp_ble-address-type_t' [-fpermissive]"

The same code compiles fine on the Arduino IDE, so I guess this must be a compiler setting on the Eclipse-Arduino.

Help please!

Robert

[HELP]

Hi,

I used a core need to use [arm-none-eabi-gcc][5.4.0-2016q2],
The default version of Sloeber is [4.8.3-2014q1]
Now every time I use that core, I need to replace all the [4.8.3-2014q1] with [5.4.0-2016q2] manually.

I'm wondering if there is a setting or way to set the [arm-none-eabi-gcc][5.4.0-2016q2] automatically?

I'm getting an error on the subdir.mk file when building a test sketch for an Arduino Nano. The error is:
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

Here is the complete line from the console:

"C:\cpp-photon\eclipse/arduinoPlugin/packages/arduino/tools/avr-gcc/4.8.1-arduino2/bin/avr-gcc" -c -g -Os -Wall -Wextra -std=gnu11 -ffunction-sections -fdata-sections -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10802 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -I"C:\Users\Robert\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Users\Robert\Arduino\hardware\arduino\avr\variants\eightanaloginputs" -MMD -MP -MF"core\core\WInterrupts.c.d" -MT"core\core\WInterrupts.c.o" -D__IN_ECLIPSE__=1 "C:\Users\Robert\Arduino\hardware\arduino\avr\cores\arduino\WInterrupts.c" -o "core\core\WInterrupts.c.o"
cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.
core\core\subdir.mk:182: recipe for target 'core\core\WInterrupts.c.o' failed
make: *** [core\core\WInterrupts.c.o] Error 1

I don't know what the 'linker plugin' is ... or what I should do to fix this problem.

Well, I changed the platform to

C:\cpp-photon\eclipse\arduinoPlugin\packages\arduino\hardware\avr\1.6.2

I had another platform directory which obviously had missing elements.

Hello,

i just installed eclipse photon with the sloeber and i am trying to use some of my custom libraries but it doesn't seem that it can find them. I saw the directory that it uses to search for the libraries arduino/preferences and it is where i have placed my libraries. I saw another post with the same problem and i want to ask if with the 4.3 version this problem is going to change. I installed sloeber from Eclipse Marketplace, is it the 4.3 version or do i have to install the github that jantje uploaded recently? Also i want to use eclipse with teensy 3.6, any updates about the way i can achieve that, i' ve read the trippy lighting tutorial but it is for really old version of the software.

Thank you very much

For teensy just add [teensyduino]/hardware/teensy to the private hardware
you probably also want to add [teensyduino]/libraries to your private libraries
Private libraries can be the parent or the root of the library.
If the private library folder you provide contains a .h file it is considered a library, else it is consider the parent of libraries.
As far as I remember there are no known bugs in this area.
Best regards
Jantje

Hello again and thank you for your response,
i have added teensy in the private hardware path and also i have added the directory of my libraries to the private software path. All the libraries contain the header files but when i try to add a library to the selected project, the list is empty and now i get a " Unhandled event loop exception" error. Also teensy board has not be added to the "platform and board" menu.

Thank you

Hi Jantje,

I installed the Eclipse Pluin on Mac (Eclipse Photon). I added the hardware platform "Adafruit/hardware/samd/1.2.1" and want to use "Adafruit Metro M4 (SAMD51)" board.

I could select the board in the properties menu of the project. If I verify the sketch, there is the following error:

/Users/walter.prechtl/eclipse/cpp-latest-released/Eclipse.app/Contents/Eclipse/arduinoPlugin/packages/adafruit/hardware/samd/1.2.1/cores/arduino/Arduino.h:48:17: fatal error: sam.h: No such file or directory
#include "sam.h"

Do you know, how to install and include "sam.h"?

It should work. I can't tell based on the info you provided what could be the root cause.
However eclipse provides all the tools and openness to find out yourself.
Things to check
Are you running Sloeber V4.3?
Does this also happen with a new default sketch?
Does the indexer find the sam.h file
Is the package correctly installed?
Is the package dependent on another package?
And if so is that one properly? installed

Just thanks for your very good work, it's very more easy to use than the standard arduino editor

Firstly, love this plugin! I've got a bit of a weird situation though... I've got a sketch to run on an Atmega2560. Everything compiles, everything works, but in the code window Serial1 is underlined red and flagged Symbol 'Serial1' could not be resolved. But when I compile I get 0 errors, 0 warnings, and like I said everything works, but the error flag in the code remains. It's not actually causing an issue, but the red marks feel like they are mocking me!

@pinja
read the troubleshouting faq Arduino Eclipse Plugin - FAQs
Jantje

That sorted it out. Thanks!

I'm trying to compile the basicOTA.ino sample with Sloeber 4.3 for the esp32 but keep getting error's.
It's totally not clear to me what's wrong.
For the esp8266 it works fine and the other (the one i tried) esp32 samples didn't gave me troubles.
I tried a lot of suggestions that where found on Github and google but nothing helped me.

This is the list of the known issues.

I guess you are experiencing quoted strings from the command line not always working · Issue #1028 · Sloeber/arduino-eclipse-plugin · GitHub
A workaround is described in the issue

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"
<command-line>: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)':
<command-line>: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.

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 quoted strings from the command line not always working · Issue #1028 · Sloeber/arduino-eclipse-plugin · GitHub

It works, thanks again for your help and Sloeber.

Think about this net time you get the nag screen :wink: