Lean Eclipse IDE setup

Fri Apr 13, 2018 10:38 am
Eclipse is very powerful but complicated. This setup offers the cleanest way to install and use Eclipse for arduino development without the bloat of full Eclipse platform.
First of all, go to eclipse’s download directory:


Go to latest release (now is 4.7.3a) and select it. In the next list, go down and find the “Platform Runtime Binary” entries and select the file for your Platform. For my purpose, I select the eclipse-platform-4.7.3a-linux-gtk-x86_64.tar.gz sized 75MB.

Untar the files in a directory, I am using the ~/eclipse directory. Actually the files in the tarball are already in eclipse directory so you can untar the files directly in ~ directory. Now the basic runtime is ready to run. Execute eclipse binary located inside the eclipse directory. In the beginning the eclipse will ask you to select a workspace, OK, select a new directory and continue. Now the eclipse is loaded (hopefully) and the Welcome screen appears.

Now it is time to install CDT. Go to menu Help>Install New Software. In the Install dialog, press “Add” button and write in Name “CDT”, and in Location http://download.eclipse.org/tools/cdt/releases/9.4/, finaly press OK.
After a while the Installer will ask you to select the packages of CDT repository that you want to install.
Select “CDT Main Features” and “LaunchBar” and expand “CDT Optional Features”. Now on CDT Optional Features select at least the “Arduino C++ Tools”.
Anytime you can add more packages, but for now just select the minimum. Continue accepting the installation of packages. At the end eclipse will restart. After restarting, close the Welcome tab and the main C++ Perspective will appear.
Now we will install stm32 libmaple core and the STM core.
Go to menu Window>Preferences, in the Preferences Dialog, select C++>Arduino and fill in the URLS of arduino packages. Add the following lines:


Fri Apr 13, 2018 12:05 pm
Thanks Slammer for this nice tutorial :!:

Fri Apr 13, 2018 12:35 pm
Thank you Slammer, will there be second episode for configuring the debugger? :)

Cheers, E.

Fri Apr 13, 2018 12:43 pm
I not very good in debugger but I will try to start it…. I am sure that somebody will help
Platformio integration will be very usefull, as platformio building/uploading system is more flexible… but anyway the Arduino CDT now is very capable, there are some limitations (eg. flexible download options, custom cores/libraries etc) but as Arduino IDE replacement is OK.

Sat Apr 14, 2018 11:47 am
Bookmarked, thanks Slammer.

I’m gonna give it another go in case I missed something the first time I tried the CDT plugin.

Sat Apr 14, 2018 1:45 pm
One thing I noticed on the Blink Demo in eclipse, after hitting Debug the program started “Suspended” and I had to hit “Resume” for it to start :lol:

Sat Apr 14, 2018 1:54 pm
maybe not needed, but there is a gotcha here

eclipse creates a dot eclispe sub-directory, arduino uses dot arduino15 and their contents will be scrambled e.g. over-written with a subsequent install.
so if you already have an eclipse installed, you’ll need a back up and / or a rename.



Sat Apr 14, 2018 2:18 pm
Eclipse uses .eclipse for configuration and other data and if you already have eclipse installed in your system this may cause problems. But I think that most configuration data are held in workspace directory, anyway if you already have eclipse installed it is better to keep a backup of .eclipse directory.
Arduino CDT uses the .arduinocdt directory for storing packages and libraries, and there is no conflict with the .arduino15 contents.

Sat Apr 14, 2018 3:44 pm
The installation method described by Slammer is a stand-alone installation so .eclipse and .p2 folders should be in the same unzip directory instead using home user folder.
Anyway, one other method to install eclips + CDT + Arduino CDT is to use the eclipse installer from http://eclipse.org/downloads then choose Eclipse IDE for C/C++ Developers .
This will install Eclipse and CDT in one way.
Then using the Eclipse Marketplace from Help menu and search for Arduino and install “Eclipse C++ IDE for Arduino”

Current CDT version available is the 9.3, you could add or change the CDT repo location to point on 9.4:
Do it in the Windows -> Preferences menu then select Install/update -> Available Software Sites

Then you can do Help -> Check for updates

I will provide a config using GNU MCU Eclipse to configure debug using openOCD /GDB

Sat Apr 14, 2018 5:25 pm
The “Eclipse IDE for C/C++ Developers” download installs also a bunch of packages, are all these any helpfull for our purposes?

Sat Apr 14, 2018 7:31 pm
Arduino CDT & ./.arduinocdt – seems someone had a good idea.

Sat Apr 14, 2018 7:45 pm
[Slammer – Sat Apr 14, 2018 5:25 pm] –
The “Eclipse IDE for C/C++ Developers” download installs also a bunch of packages, are all these any helpfull for our purposes?

not necessarily ;) Up to the user to know what he wants. This is just an other way to achieve the same purpose :mrgreen:

Sat Apr 14, 2018 9:39 pm
I also checked the .eclipse directory…
It seems that the core packages and CDT do not write anything to it, it stays completely clean after 1-2 days of use.

Sun Apr 15, 2018 2:51 am
am i wrong? it is something to be aware of though.
someone may just backup a directory on the off chance and save themselves some severe grief

Sun Apr 15, 2018 8:04 am
I’m a bit confuse now. I already installed cdt on my old linux os lubuntu laptop for sloeber. Do I have to reinstall CDT + arduino plugin in the market place in my case for this new install?

Sun Apr 15, 2018 8:56 am
No, if you have already an eclipse with CDT, you just have to install Arduino CDT.
Sloeber and Arduino CDT could be installed on the same Eclipse.

Sun Apr 15, 2018 1:18 pm
Ok. Do you have to launch them separatly or launch them from eclipse since one is an arduino plugin and sloeber has his own launcher ?

Sun Apr 15, 2018 1:59 pm
Unfortunately I also get the maple_upload not found error message under Win10
Cannot run program "/.arduinocdt/packages/stm32duino/tools/stm32tools/2018.4.14/win/maple_upload"
(in directory "\Documents\eclipse\SMT32_Eclipse_blinky_test\build\BluePill_bootloader"): CreateProcess error=2, The system cannot find the file specified

Sun Apr 15, 2018 8:43 pm
I think that the Arduino C++ plugin does not evaluate the Arduino specific {runtime.os} variable.

These lines in platform.txt specify the command to run dependent on specific OS, but it seems that it does not get evaluated, because it always try to run on Windows the command specified by [cmd] and not by [cmd.windows].
# Upload using Maple bootloader over DFU

Sun Apr 15, 2018 9:44 pm
My enthusiasm was so great but now I think this is a dead end.
Or is it really only me (and lewiss66) who has problems here?
Still unable to upload the correctly generated BIN file, which is not found by the upload tool.

So many arduino_cdt-related bugs/issues in Bugzilla not processed…
Not transparent enough, unable to correct/adapt some configuration files…

So at the end I will again go back and give platformio + Eclipse another try.

Mon Apr 16, 2018 4:29 am
Does arduino IDE needs to be installed beforehand to allow the Eclipse for arduino to run?

Mon Apr 16, 2018 4:35 am
No. You don’t have to install Arduino IDE.

Mon Apr 16, 2018 6:31 am
Ok in my case I got a weird install!
I’ve installed Arduino CDT from Sloeber(eclispe) since I can only launch eclipse from sloeber. (I don’t know how to find the laucher in .eclipse directory) on linux.(http://storage7.static.itmages.com/i/18 … 27b3d1.png)
So I got some Sloeber stuff mixed with arduino cdt on the IDE..
Anyway have followed your instructions and almost works. Installed STM32duino package build seems to be working except I don’t see any core folder in the project explorer. I don’t know either how to add librairies that I uploaded from arduino download manager.
Moreover, in the board launcher the USB port does not show up.
http://storage9.static.itmages.com/i/18 … b18395.png
So I cant upload it.

Selection_005.png (89.77 KiB) Viewed 484 times

Mon Apr 16, 2018 10:35 am
Or is it really only me (and lewiss66) who has problems here?
I run Sloeber for ~2-3years (Win7), no problems today. Those few issues in past were solved (see the topics)..

PS: Sloeber reads our platform.txt and boards.txt files, parses them and creates the menu and sets the environment accordingly.
Afaik all the issues in past (-u combine flag, maple-upload, combine recipe..) were solved by small mods to these 2 files.
There are no other places which needed a hack, afaik.
There are topics on all those small changes in this forum.

Attached the STM32F1 platform.txt and boards.txt which work (the build and the usb upload via our stm32duino bootloader) with BluePill (Generic STM32F103C) fine here in Sloeber:

(8 KiB) Downloaded 30 times

Mon Apr 16, 2018 3:05 pm
I reinstalled all my linux and start over.
I got SLoeber V4.2 working fine on windows and won’t touch it! But had trouble to make it running the bluepill on my linux machine so I’m on the way to try Lean Eclipse IDE + arduino plugin.
before installing Eclipse do you know if I need to install java or JRE from java for my PC? (I run lubuntu light linux OS)
I saw there is a latest Eclipse version “Oxygen 3a”. Don’t know if it’s any good to pick that last one?
Maybe I should follow the “fpiSTM” install to get Java included…

Mon Apr 16, 2018 4:10 pm
My Debian machine has already installed Java JRE from repositories.
I also tested the Sloeber V4.2 installed as plugin on top of the “Lean” Eclipse setup and it is running smoothly… No problem with Sloeber and Arduino CDT installed together. Sloeber is a bit bigger and more bloated (has also its own perspective) than CDT but it is OK.
I like Arduino CDT but there are some problems (eg. you can not edit fully the target variant after creation, has some uploading bugs, it is not easy to add custom cores without package manager)

All these are OK but my favorite (not for STM32) is PlatformIO, I like the flexibility of upload/build settings but with PlatformIO you have to use the packages from it’s repository and not by board manager. The libmaple core is not updated very often (currently version 2018.2.19) and the STM core is totally missing. It is possible to create user cores but this requires to edit the building scripts (not the easiest thing). Note that platformIO is not dedicated to arduino but you can also install other frameworks like libopencm3, HALMX, mbed, etc…

It seems that overall, the Sloeber is more polite and refined, supports easily user and packaged cores. Ok, it is a bit bloated trying to “arduinize” the eclipse but it works.

Fri Jun 22, 2018 12:42 pm
[fpiSTM – Sat Apr 14, 2018 3:44 pm] –
I will provide a config using GNU MCU Eclipse to configure debug using openOCD /GDB

In this wiki you will find how to configure eclipse to be able to debug with eclipse:
1.1.1. Install OpenOCD from the GNU MCU Eclipse plug-ins
3 – Debugging Arduino Code

Leave a Reply

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