IDE with Eclipse with Jantje's plugin

Development environment specific, Arduino, Eclipse, VS2013,Em::Blocks etc
michael_l
Posts: 337
Joined: Mon Aug 24, 2015 6:11 pm

Re: IDE with Eclipse with Jantje's plugin

Post by michael_l » Wed Apr 12, 2017 2:47 pm

Thanks Rick! Installed and RXTX plugin works for me - in Windows that is. You'll have to copy the libraries into java's lib and bin folders.
Last edited by michael_l on Thu Apr 13, 2017 6:08 am, edited 1 time in total.

ag123
Posts: 804
Joined: Thu Jul 21, 2016 4:24 pm

Re: IDE with Eclipse with Jantje's plugin

Post by ag123 » Wed Apr 12, 2017 2:53 pm

this is OT again, note that if you are running eclipse Neon or Oxygen, eclipse now has a plugin which support Arduino directly, accordingly this is part of the CDT which is very good news
https://marketplace.eclipse.org/content ... de-arduino

i've sort of 'succeeded' in compiling Arduino_STM32/STM32F1 in eclipse, no 'arduino native' plugin, the trouble with this approach is that you need to define all the includes, source directories, all the defines, ld scripts, and varous settings (e.g. the compile flags, debug launch parameters) manually, in terms of the source directories, you'd need to define the arduino core codes Arduino_STM32/STM32F1/cores/maple, a variant source directory for your board, and your sketch directory. And that is not yet including any external libraries. And on top of all that, you'd need to do it twice one full set for Debug another full set for Release.

The benefit of such a tedious approach is that everything is broken down to the details, but as it stands it is tedious. and for each new sketch, u'd probably need to do the same again.

hopefully the plugins could help to simply all these book keeping etc e.g. automatically derive includes, source directories, defines, compile flags and variants etc say from boards.txt and platform.txt. that'd make eclipse a really good alternative platform vs the arduino ide
Last edited by ag123 on Wed Apr 12, 2017 3:21 pm, edited 1 time in total.

User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: IDE with Eclipse with Jantje's plugin

Post by Rick Kimball » Wed Apr 12, 2017 3:16 pm

On ubuntu 16.04 I installed the rxtx lib using apt:

$ sudo aptitude update
$ sudo aptitude install librxtx-java

It installs the .jar and lib*.so in the wrong place for me (I'm using the oracle java 8 ) So I copied the files by hand. Eclipse doesn't seem to provide me a list of the available tty devices, however if I type in /dev/ttyACM0, it works.
-rick

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 12, 2017 3:54 pm

@ag123: why so much effort with Eclipse? Sloeber distro (Eclipse+Arduino plugin) works fine with stm32duino. No installation required. Built-in Serial monitor works perfectly. All the mess I've described here is because the Debugger - that is the "GNU ARM Eclipse" you have to install into the Sloeber.
Again: you download Sloeber, unpack it and work.
I think we mix a lot of different stuff here in this topic :)
Pukao Hats Cleaning Services Ltd.

ag123
Posts: 804
Joined: Thu Jul 21, 2016 4:24 pm

Re: IDE with Eclipse with Jantje's plugin

Post by ag123 » Wed Apr 12, 2017 5:16 pm

for reasons i'm unsure, i'm running eclipse mars, after i installed sloeber, my eclipse setup is pretty much broken, i can't create a sketch, some other things seemed broken as well. after a while i restored a backup i've done just prior to installing sloeber
as i do use eclipse for java / android and other stuff, i decided to postpone the upgrade to another time, i think i simply have too many interdependent plugins and it isn't a surprise that this 1 plugin broke the camel's back :oops:

nevertheless i think eclipse CDT default Arduino integration may become a norm, do check that out, but it requires eclipse N or O

zmemw16
Posts: 1489
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: IDE with Eclipse with Jantje's plugin

Post by zmemw16 » Wed Apr 12, 2017 6:21 pm

oxygen seems to have a problem, specifically Timer.sleep() calls, i forget which env i was in at the time.
search oxygen & Timer in my posts. that's for the blinky 'sketch'
neon.3 is ok as stated on wiki.

sloeber-workspace directory does persist regardless of rm -rf it seems

stephen

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 19, 2017 10:41 am

While trying to compile a naked arduino sketch in Sloeber for the F407 I get zillion errors like:

Code: Select all

..
C:/Users/pito/MyCode/Sloeber/WhetstoneSP/Release/arduino.ar(rccF2.c.o): In function `rcc_clk_enable':
C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/rccF2.c:653: multiple definition of `rcc_clk_enable'
C:\Users\pito\MyCode\Sloeber\WhetstoneSP\Release\arduino.ar(rccF2.c.o):C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/rccF2.c:653: first defined here
C:/Users/pito/MyCode/Sloeber/WhetstoneSP/Release/arduino.ar(rccF2.c.o): In function `rcc_clk_disable':
C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/rccF2.c:653: multiple definition of `rcc_clk_disable'
C:\Users\pito\MyCode\Sloeber\WhetstoneSP\Release\arduino.ar(rccF2.c.o):C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/rccF2.c:653: first defined here
..
C:/Users/pito/MyCode/Sloeber/WhetstoneSP/Release/arduino.ar(systick.c.o): In function `systick_enable':
C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/systick.c:64: multiple definition of `systick_enable'
C:\Users\pito\MyCode\Sloeber\WhetstoneSP\Release\arduino.ar(systick.c.o):C:\Users\pito\MyCode\Arduino\hardware\Arduino_STM32\STM32F4\cores\maple\libmaple/systick.c:64: first defined here
..
Basically all definition you can imagine are "multiple definitions".
But it always points to the same function in the same file :?

It compiles fine F407 under Arduino IDE. It compiles fine for F103 under Sloeber.
The structure of the ..\Arduino\hardware\Arduino_STM32\STM32F4 is similar to ..\Arduino\hardware\Arduino_STM32\STM32F1 but not identical. Any idea what went wrong here, plz?
Pukao Hats Cleaning Services Ltd.

zmemw16
Posts: 1489
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: IDE with Eclipse with Jantje's plugin

Post by zmemw16 » Wed Apr 19, 2017 11:51 am

the guard statements preventing multiple inclusion of the same file are slightly different, perhaps allowing the double inclusion of .h file symbols or the include file is a slightly different name, same result ?
possibly the config directories of the 'env in use' are clashing?
stephen

danieleff
Posts: 336
Joined: Thu Sep 01, 2016 8:52 pm
Location: Hungary
Contact:

Re: IDE with Eclipse with Jantje's plugin

Post by danieleff » Wed Apr 19, 2017 12:07 pm

I would delete the .o, .ar and .elf files and make a clean build.

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: IDE with Eclipse with Jantje's plugin

Post by Pito » Wed Apr 19, 2017 12:48 pm

ok, I've found it.. This is the correct combiner recipe (F407 platform.txt):

Code: Select all

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} "{build.path}/{archive_file}" -Wl,--end-group
The old one messed with archive flags erratically :?

Code: Select all

--whole-archive  ....  -Wl,--no-whole-archive -Wl,--end-group
PS: Hint: the Sloeber's makefile takes over the settings from platform.txt with Project Properties Arduino Apply OK
Last edited by Pito on Fri Apr 21, 2017 2:52 pm, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

Post Reply