This is a guide to setup an IDE (Eclipse) and toolchain to develop applications for bare metal ARM board like the OLIMEXINO STM32.
The preferred way of installing Eclipse on a Debian system is NOT to use Debian package management tool because it provides a hopelessly outdated eclipse version.
You can use either the OpenJDK or the proprietary Oracle Java to provide the needed java runtime. The latter is the one which works better with Eclipse, the first one is free software.
Eclipse is a standalone Java application and needs an up to date version of the Java runtime environment, which can be provided by the OpenJDK available as Debian packages:
debian@pc:~/$ sudo apt-get install openjdk-11-jdk openjdk-11-jre
Be sure to set the correct java runtime environment in Debian's alternative configuration:
debian@pc:~/$ sudo update-alternatives --config java
Select the openjdk if necessary.
debian@pc:~/$ sudo echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main" | tee /etc/apt/sources.list.d/linuxuprising-java.list
debian@pc:~/$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
debian@pc:~/$ sudo apt-get update
debian@pc:~/$ sudo apt-get install oracle-java11-installer
Download and install the latest version of Eclipse IDE for C/C++ Developers into the users home directory by unzipping the tar.gz file. Optionally add a new entry in the gnome menu:
Also install the devstyle plugin via eclipse marketplace for better user experience:
For development on embedded MCU's with ARM core the GNU MCU Eclipse 4.5.1 plugin is needed.
First install system-wide npm, the installer tool for node.js packages.
debian@pc:~/$ sudo apt-get install npm
Then install xpm from the node.js repository as eclipse user:
debian@pc:~/$ npm install --global xpm
Xpm is now installed in ~/.npm-packages
and can be used to install the ARM cross toolchain:
debian@pc:~/$ .npm-packages/bin/xpm install @xpack-dev-tools/arm-none-eabi-gcc@latest --global
The ARM cross toolchain is now installed beneath ~/opt/xPacks/
and could be found by the GNU MCU Eclipse plugin.
Open File → New → C/C++ Project.
Select a C++ managed build project.
Chose a project name and its location on file system.
Select a STM32F10x C/C++ Project type and toolchain ARM Cross GCC.
https://github.com/gnu-mcu-eclipse/eclipse-plugins/issues/138
When you are done with generating an Eclipse project out of the build directory with
debian@pc:~/$ cmake -G "Eclipse CDT4 - Unix Makefiles" ..