meta data for this page
Eclipse ARM cross tool chain development
This is a guide to setup an IDE (Eclipse) and toolchain to develop applications for bare metal ARM board like the OLIMEXINO STM32.
Installing latest Eclipse on a debian system
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.
Installing Java ...
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.
... the OpenJDK way
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:
~# apt-get install openjdk-11-jdk openjdk-11-jre
Be sure to set the correct java runtime environment in Debian's alternative configuration:
~# update-alternatives --config java
Select the openjdk if necessary.
... the Oracle Java way
~# echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic main" | tee /etc/apt/sources.list.d/linuxuprising-java.list ~# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A ~# apt-get update ~# apt-get install oracle-java11-installer
Installing Eclipse
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:
Eclipse Plugins
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.
Installing ARM Cross toolchain
First install system-wide npm, the installer tool for node.js packages.
~# apt-get install npm
Then install xpm from the node.js repository as eclipse user:
guest:~$ npm install --global xpm
Xpm is now installed in ~/.npm-packages and can be used to install the ARM cross toolchain:
guest:~$ .npm-packages/bin/xpm install @gnu-mcu-eclipse/arm-none-eabi-gcc --global
The ARM cross toolchain is now installed beneath ~/opt/xPacks/ and could be found by the GNU MCU Eclipse plugin.
Creating first project
- 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.
Combine managed build projects with cmake
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
guest:~$ cmake -G "Eclipse CDT4 - Unix Makefiles" ..