Still struggling with Eclipse, New issue on Page2, please help

Nutsy
Wed Feb 08, 2017 6:32 pm
Hi im trying to port my project to a new ide, eclipse with the arduino plugin installed, i followed the guide on the stm32 wiki but im still having trouble getting it to work.

the std c++ headers are missing, things like stdio.h and stdlib.h and when I try to compile I also get the error;Starting C++ compile
"/bin/arm-none-eabi-g++" -c -g -Os -DDEBUG_LEVEL=DEBUG_NONE -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_maple_mini -DVECT_TAB_ADDR=0x8002000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_MAPLE_MINI -DARDUINO_ARCH_STM32F1 -DMCU_STM32F103CB -DSERIAL_USB -mthumb -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB -DSERIAL_USB -mthumb -march=armv7-m -D__STM32F1__ "-I/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/system/libmaple" "-I/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/system/libmaple/include" "-I/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/system/libmaple/stm32f1/include" "-I/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/system/libmaple/usb/stm32f1" "-I/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/system/libmaple/usb/usb_lib" -I"/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/cores/maple" -I"/Users/Helen/Documents/Arduino/hardware/Arduino_STM32/STM32F1/variants/maple_mini" -I"/Users/Helen/Documents/Arduino/libraries/ArduinoThread" -I"/Users/Helen/Documents/Arduino/libraries/SwitecX25" -I"/Users/Helen/Documents/Arduino/libraries/Adafruit_NeoPixel" -MMD -MP -MF".ino.cpp.d" -MT".ino.cpp.o" -D__IN_ECLIPSE__=1 -x c++ "../.ino.cpp" -o ".ino.cpp.o" -Wall
/bin/sh: /bin/arm-none-eabi-g++: No such file or directory


victor_pv
Wed Feb 08, 2017 7:04 pm
I installed Eclipse with the Arduino plugin about a week ago. These are the steps I followed if I remember right:
1.- Downloaded the complete IDE from the plugin page, V4. The IDE+plugin is called Sloeber for some reason.
2. Extracted that to my C: drive, c:\eclipse or c:\sloeber, dont remember (you can use any folder name, but do not use any spaces in the path).
3. Opened it, and in preferences went to the Arduino section, and downloaded the SAM core, version 1.6.11 I believe. That downloads the C++ compiler.
4. Added the path to my libraries folder, and the path to the stm32duino core within the Arduino section in preferences. On both cases, use a path that does not include spaces.
5. Click Ok in preferences to apply those changes, and let it download the SAMD core, will take a few minutes.
6. Close the IDE and open it again, and I think that was it.

EDIT: From the last line in your post, I think you are missing the step of installed one of the SAM cores, since it can’t find the compiler bin:
/bin/arm-none-eabi-g++


Nutsy
Wed Feb 08, 2017 7:15 pm
Im having a go at reinstalling now… ill follow what you did. Only im on mac :p

victor_pv
Wed Feb 08, 2017 7:29 pm
Nutsy wrote:Im having a go at reinstalling now… ill follow what you did. Only im on mac :p

Nutsy
Wed Feb 08, 2017 8:40 pm
Well reinstalled and followed your steps… Yes before i did forget to install the sam and samd however… didnt forget this time, but still getting all the same errors :/

victor_pv
Wed Feb 08, 2017 8:51 pm
Nutsy wrote:Well reinstalled and followed your steps… Yes before i did forget to install the sam and samd however… didnt forget this time, but still getting all the same errors :/

Nutsy
Wed Feb 08, 2017 9:49 pm
oh and im using v3, on account i cant download v4 for some reason

Nutsy
Thu Feb 09, 2017 12:06 am
Weeehellllllllll! Got it working. mostly.

Got v4 standalone running… Forgot about macs security features blocking unrecognised developers….

Anyway, got the project loaded and all the libraries are detected and it builds :D
WOOOOOOOOOOOOO

one last problem. I cant upload to the maple. I selected the coms port on the project properties.

If i do the build and upload, i get ;
Starting reset using DTR toggle process
Toggling DTR
Continuing to use /dev/cu.usbmodem1411
Ending reset

Launching/Users/Helen/Documents/Arduino/hardware/tools/win/maple_upload cu.usbmodem1411 2 1EAF:0003 /Users/Helen/Documents/EclipseWorkspace/HSpeedSpeedo/Release/HSpeedSpeedo.bin
Output:
failed to upload


victor_pv
Thu Feb 09, 2017 1:13 am
Nutsy wrote:Weeehellllllllll! Got it working. mostly.

Got v4 standalone running… Forgot about macs security features blocking unrecognised developers….

Anyway, got the project loaded and all the libraries are detected and it builds :D
WOOOOOOOOOOOOO

one last problem. I cant upload to the maple. I selected the coms port on the project properties.

If i do the build and upload, i get ;
Starting reset using DTR toggle process
Toggling DTR
Continuing to use /dev/cu.usbmodem1411
Ending reset

Launching/Users/Helen/Documents/Arduino/hardware/tools/win/maple_upload cu.usbmodem1411 2 1EAF:0003 /Users/Helen/Documents/EclipseWorkspace/HSpeedSpeedo/Release/HSpeedSpeedo.bin
Output:
failed to upload


Nutsy
Thu Feb 09, 2017 1:35 pm
Yeah cant do that in mac, resetting manually hides the serial port.

Nutsy
Thu Feb 09, 2017 1:48 pm
Just noticed, its trying to launch the wrong uploader… its trying to start a windows program not the mac one :/

Nutsy
Thu Feb 09, 2017 11:56 pm
New Issue here

So I got it working for the most part. Maybe the hack by putting the tools macosx files in the win dir might be causing my issue… i dont know.

But I do have a new issue.

My project currently wont work on my maple mini IF I compile it from Eclipse. It compiles and works from Arduino.

Simple sketches like Blink compile and run from Eclipse fine… however I narrowed my problem down. If i upload a sketch that uses Neopixels it causes the board to die, if compiled from eclipse.

i have tried 2 different neopixel libraries, ANDnXOR and Rintins tweaked library. Both cause the same problem.

i have tried to install AVRdude for eclipse but ive struggled to get it to work or compile at all. Im using a Mac so… yeah fun.

So does anyone have any ideas? Compile and upload wise i would like to do what ever Roger has setup inside arduino to do… Im trying to use eclipse so I have better auto complete and project navigation as my projects getting rather large now. I just want to get this working.

Can anyone help?


victor_pv
Fri Feb 10, 2017 5:13 am
Nutsy wrote:New Issue here

So I got it working for the most part. Maybe the hack by putting the tools macosx files in the win dir might be causing my issue… i dont know.

But I do have a new issue.

My project currently wont work on my maple mini IF I compile it from Eclipse. It compiles and works from Arduino.

Simple sketches like Blink compile and run from Eclipse fine… however I narrowed my problem down. If i upload a sketch that uses Neopixels it causes the board to die, if compiled from eclipse.

i have tried 2 different neopixel libraries, ANDnXOR and Rintins tweaked library. Both cause the same problem.

i have tried to install AVRdude for eclipse but ive struggled to get it to work or compile at all. Im using a Mac so… yeah fun.

So does anyone have any ideas? Compile and upload wise i would like to do what ever Roger has setup inside arduino to do… Im trying to use eclipse so I have better auto complete and project navigation as my projects getting rather large now. I just want to get this working.

Can anyone help?


michael_l
Fri Feb 10, 2017 7:39 am
Going a bit off-topic here but I’m currently using Eclipse as IDE for editing and debugging. Project for Eclipse is created by Platformio. Platformio also knows how to compile the code but for some reason the flash files it produces don’t seem to work for me currently. So I compile / upload with Arduino IDE. In eclipse I create an a debugging configuration that points to elf build file created for Arduino

stevestrong
Fri Feb 10, 2017 9:28 am
You should try to extend the Eclipse project step by step.
Starting from the working LED blink example, just add consecutively more features, like Serial output, then SPI, then others.
This way you can narrow the issue, just saying that the board is “death” is a bit too broad.

Nutsy
Fri Feb 10, 2017 1:31 pm
Remember to bare in mind i am on a Mac… Eclipse for some reason was running as if I was on a windows machine, triggering the wrong system flag maybe. So i had to copy the Mac tools into the win folder inside rogers stm32duino core pack.
It might be simply getting eclipse to recognise im on a mac might fix everything, who knows. But this is a level of geekery im not qualified for :p I still feel there is a bit of dark arts involved in programming, a sacrificial virgin or something. Sadly im all out of virgins.

As I mentioned I narrowed down my issue to addressable led libraries. Both ANDnXOR and Rintins seem to crash the board when compiled through Eclipse.

I have not tried Neomaple, though i found I had trouble with that library previously so I didnt use that to test with… (oh yeah its because its tied to a single pin thats why i didnt use it)

This is the Strandtest example …

This is the printout of the build console form Sloeber/Eclipse;
http://pastebin.com/Ecsm4QMe

And here is the same code using the strandtest example.
http://pastebin.com/vbYs59jj

Sorry they are posted on pastebin. I tried to paste them here with code tags but the message size was monstrously high and the forum blocked it.
Both compile, eclipse doesnt fail the build… So I really dont know what to look out for.


stevestrong
Fri Feb 10, 2017 2:17 pm
Narrowing down to a lib is too course.
I meant consecutively adding code line by line, not lib by lib having 100s lines of code…

Nutsy
Fri Feb 10, 2017 5:16 pm
I cant narrow it down any further than this… I mean. I dont know how to deconstruct a library such as this. There are simple too many components to it that I dont understand.

victor_pv
Fri Feb 10, 2017 6:49 pm
Nutsy wrote:I cant narrow it down any further than this… I mean. I dont know how to deconstruct a library such as this. There are simple too many components to it that I dont understand.

Nutsy
Fri Feb 10, 2017 7:03 pm
ohh i havent checked that… But good point. i scrolled through it. but still I dont know whats missing :(

stevestrong
Fri Feb 10, 2017 10:08 pm
Usb serial?

Nutsy
Fri Feb 10, 2017 10:49 pm
What about it?

victor_pv
Fri Feb 10, 2017 10:54 pm
Nutsy wrote:ohh i havent checked that… But good point. i scrolled through it. but still I dont know whats missing :(

Nutsy
Fri Feb 10, 2017 11:05 pm
well currently when the sketch loads, no… i can only upload if i catch it at the right moment before the sketch runs.

victor_pv
Fri Feb 10, 2017 11:19 pm
Nutsy wrote:well currently when the sketch loads, no… i can only upload if i catch it at the right moment before the sketch runs.

Nutsy
Fri Feb 10, 2017 11:30 pm
whats a .map file?

sheepdoll
Sat Feb 11, 2017 1:44 am
I was going to suggest looking at the *.map file

The *.map file is sometimes called the symbol table. This is a text file of the locations of the functions and variables in a somewhat human readable format. It is created with the compiler options flags. Some IDE’s have options to generate it. There is also a *.lst file which shows an assembly listing along with the code Sometimes the *.map is included at the bottom of the *.lst file.
The *.elf file contains most of the same info as these files along with the executable code. That way it when stepping through the debugger it can look like one is stepping through the c code. On some IDE’s the trace information is not available (and one only sees assembly) if the *.map and *.lst files are missing.


Nutsy
Sat Feb 11, 2017 12:11 pm
looking throught eh elf, unfer the hardwareserial;
/*
* Roger Clark
*
* 2015/05/28
*
* Moved definitions for Hardware Serial devices from HardwareSerial.cpp so that each board can define which Arduino "Serial" instance
* Maps to which hardware serial port on the microprocessor
*
* Note. Maple mini always has SERIAL USB, so there is no need for the #fidef for this
* As its a Medium Density device, it only has 3 hardware serial devices.
*/

DEFINE_HWSERIAL(Serial1, 1);
DEFINE_HWSERIAL(Serial2, 2);
DEFINE_HWSERIAL(Serial3, 3);


victor_pv
Sat Feb 11, 2017 4:41 pm
Nutsy wrote:looking throught eh elf, unfer the hardwareserial;
/*
* Roger Clark
*
* 2015/05/28
*
* Moved definitions for Hardware Serial devices from HardwareSerial.cpp so that each board can define which Arduino "Serial" instance
* Maps to which hardware serial port on the microprocessor
*
* Note. Maple mini always has SERIAL USB, so there is no need for the #fidef for this
* As its a Medium Density device, it only has 3 hardware serial devices.
*/

DEFINE_HWSERIAL(Serial1, 1);
DEFINE_HWSERIAL(Serial2, 2);
DEFINE_HWSERIAL(Serial3, 3);


Nutsy
Sat Feb 11, 2017 6:22 pm
Ok going back to blink and adding components to see if anything else breaks. I am writing this as I test…
Currently the basic blink builds and loads fine on the maple mini, however a bug warning is shown. “Symbol ‘HIGH’ could not be resolved” Same for LOW. So at least in the writing stage it doesnt recognise the keywords there….

But it does build and work…

Ive added a Serial.begin So this using USB Serial. With Serial.println(); ON and OFF with the blink.
This runs fine and im getting serial read/feedback…

Ill try testing some other libraries see if they die too


stevestrong
Sun Feb 12, 2017 5:12 pm
If symbols cannot be resolved, Eclipse should not build at all…

I remember, after I wrote the wiki entry how to setup Eclipse for Arduino_STM32, I had serious issues with Eclipse (just like yours, and also more severe…), that’s why I finally abandoned using it…

I don’t know whether it is the Arduino plugin which brings Eclipse out of business, but these kind of issues are really annoying.


Nutsy
Sun Feb 12, 2017 5:39 pm
Yeah I would have thought so too re symbols. While in writing it calls it a bug it still builds ok. And as I said blink works…

I dont want to abandon eclipse though. I like its interface. And I really do need its navigation and bug management (when working) I just want it to actually work.

I really didnt like platformIO, far too much didnt work propperly at all, couldnt even get it to build properly.


stevestrong
Sun Feb 12, 2017 9:56 pm
I didnt tried yet but someone said EmBlitz should be an alternative.

sheepdoll
Sun Feb 12, 2017 10:37 pm
stevestrong wrote:If symbols cannot be resolved, Eclipse should not build at all…

I remember, after I wrote the wiki entry how to setup Eclipse for Arduino_STM32, I had serious issues with Eclipse (just like yours, and also more severe…), that’s why I finally abandoned using it…

I don’t know whether it is the Arduino plugin which brings Eclipse out of business, but these kind of issues are really annoying.


victor_pv
Mon Feb 13, 2017 3:10 pm
Nutsy,

Just wanted to let you know today I tested compiling and uploading my i2s test sketch. It compiled and run fine.
Uploading gave me some trouble, it would just not even try. After scratching my head and testing a few things I found out it was because I was not selecting any COM port when selecting the upload method.
Even though the COM port is only used to reset the board, and I can do that with the button, the dfu uploader expects to be passed some com port parameter, even if a wrong one.

But as far as the bin, works fine. The only warnings I got where about some functions not using all their passed parameters, and some dma functions being deprecated.

As I test more things in Eclipse I’ll update if I find anything wrong.
I think eclipse and a good debugger is a great combination.


Nutsy
Mon Feb 13, 2017 4:46 pm
I have no trouble uploading from eclipse in sloeber… thats not my issue.
My issue is that the compiled program doesnt work, if im using an led library… I assume it gets upset but doesnt tell you its upset.

Its amazing, arduino IDE is too simplified that doing real hard work with it… Is really hard work… But eclipse is way on the other end. That its sooooo full of options all over the place. Its actually near impossible to find whats breaking the thing. Typical Open source tosh >.> J.k

Wouldnt it be nice if things just worked with minimal configuration. Sure I get you have to tell it where libraries are… Nothing wrong with that. Just wish it worked.


victor_pv
Mon Feb 13, 2017 5:16 pm
Nutsy wrote:I have no trouble uploading from eclipse in sloeber… thats not my issue.
My issue is that the compiled program doesnt work, if im using an led library… I assume it gets upset but doesnt tell you its upset.

Its amazing, arduino IDE is too simplified that doing real hard work with it… Is really hard work… But eclipse is way on the other end. That its sooooo full of options all over the place. Its actually near impossible to find whats breaking the thing. Typical Open source tosh >.> J.k

Wouldnt it be nice if things just worked with minimal configuration. Sure I get you have to tell it where libraries are… Nothing wrong with that. Just wish it worked.


zmemw16
Tue Feb 14, 2017 4:27 am
what is the
1. target ?
2. arduino version ?
3 os ?
4. platform ?

not understanding why there are stm32f1 and seemingly stm32f7(arm-7(??) ) flags declared ?

stephen

<EDIT> seems the ld file uses this, so can you add your ld file to the above ?
</EDIT>


victor_pv
Tue Feb 14, 2017 6:28 am
victor_pv wrote:Nutsy wrote:I have no trouble uploading from eclipse in sloeber… thats not my issue.
My issue is that the compiled program doesnt work, if im using an led library… I assume it gets upset but doesnt tell you its upset.

Its amazing, arduino IDE is too simplified that doing real hard work with it… Is really hard work… But eclipse is way on the other end. That its sooooo full of options all over the place. Its actually near impossible to find whats breaking the thing. Typical Open source tosh >.> J.k

Wouldnt it be nice if things just worked with minimal configuration. Sure I get you have to tell it where libraries are… Nothing wrong with that. Just wish it worked.


Nutsy
Fri Feb 17, 2017 1:16 pm
zmemw16 wrote:what is the
1. target ?
2. arduino version ?
3 os ?
4. platform ?

not understanding why there are stm32f1 and seemingly stm32f7(arm-7(??) ) flags declared ?

stephen

<EDIT> seems the ld file uses this, so can you add your ld file to the above ?
</EDIT>


victor_pv
Fri Feb 17, 2017 4:54 pm
Nutsy wrote:zmemw16 wrote:what is the
1. target ?
2. arduino version ?
3 os ?
4. platform ?

not understanding why there are stm32f1 and seemingly stm32f7(arm-7(??) ) flags declared ?

stephen

<EDIT> seems the ld file uses this, so can you add your ld file to the above ?
</EDIT>


Nutsy
Fri Feb 17, 2017 7:41 pm
I downloaded core last week as well…

Simple proggrames build and run fine. But try adding an adressable led library… It would build broken hexes…


victor_pv
Fri Feb 17, 2017 9:51 pm
Nutsy wrote:I downloaded core last week as well…

Simple proggrames build and run fine. But try adding an adressable led library… It would build broken hexes…


Nutsy
Sat Feb 18, 2017 8:43 pm
well ive only narrowed it down to the led library stuff… compiles fine from arduino ide just broken from eclipse.

it only sends streams of bits out a selected pin… no talk back from the leds.

Ive tried a simple test sketch of the library it still kills the board. Trouble is i cant do without this library or something like it as I addressable leds quite extensively.


victor_pv
Sun Feb 19, 2017 1:54 pm
Nutsy wrote:well ive only narrowed it down to the led library stuff… compiles fine from arduino ide just broken from eclipse.

it only sends streams of bits out a selected pin… no talk back from the leds.

Ive tried a simple test sketch of the library it still kills the board. Trouble is i cant do without this library or something like it as I addressable leds quite extensively.


Nutsy
Sun Feb 19, 2017 7:44 pm
Try the ANDnXOR one in library sub thread.

Or you can try this tweaked version Rintin made https://www.dropbox.com/s/f6uvfpapa0j5t … d.zip?dl=0


Nutsy
Mon Feb 20, 2017 12:34 am
to really see if you can get it to work. you should have some addressable leds…

Or at the very least build a blink programme and have some addressable led code running along side…


victor_pv
Mon Feb 20, 2017 4:15 pm
Nutsy wrote:to really see if you can get it to work. you should have some addressable leds…

Or at the very least build a blink programme and have some addressable led code running along side…


Nutsy
Mon Feb 20, 2017 5:04 pm
Im running two led strings, so i cant stick to one spi port.

The software method is fast enough.


victor_pv
Mon Mar 06, 2017 5:22 pm
Nutsy wrote:Im running two led strings, so i cant stick to one spi port.

The software method is fast enough.


Nutsy
Tue Mar 07, 2017 10:35 am
Are you in windows? or Mac? Thats the only other varible that i can think of. (im on mac) and also being on mac the compiler seem to try and run windows tools… I had to try and swap some files into the windows core dirs to get it to work… I couldnt find a way to force eclipse to run using mac paths…

stevestrong
Tue Mar 07, 2017 11:58 am
Use multi-boot on Mac to boot on Windows :mrgreen:

victor_pv
Tue Mar 07, 2017 3:11 pm
Nutsy wrote:Are you in windows? or Mac? Thats the only other varible that i can think of. (im on mac) and also being on mac the compiler seem to try and run windows tools… I had to try and swap some files into the windows core dirs to get it to work… I couldnt find a way to force eclipse to run using mac paths…

minime
Tue Jun 20, 2017 1:14 pm
i am trying to configure sloeber latest version with windows 10, using stm32duino official branch, I can add the stm32F1 hardware no problem but wont accept stm32f4 and will give errors ?. did any made it working. regards

Leave a Reply

Your email address will not be published. Required fields are marked *