Over a million developers have joined DZone.

Constructing a Classroom IDE with Eclipse for ARM

DZone 's Guide to

Constructing a Classroom IDE with Eclipse for ARM

· IoT Zone ·
Free Resource

For the next semester I will do things differently in my advanced embedded systems programming course (INTRO) at the University of Lucerne: Instead of using the Freescale provided CodeWarrior, we will use a DIY tool chain for ARM with Eclipse Kepler.

Eclipse Kepler Ready for Classroom Usage

Eclipse Kepler Ready for Classroom Usage

That way we we can offer students an open and convenient tool chain for their lab work, course assignments and own projects both at work and at home. So this post is about spending about 30 minutes to build your own tool chain which then can passed to students and coworkers so they have a complete toolchain installed in a few minutes.


The process is the following: instead having every student to install and configure the IDE, I prepare an archive. That way the students do not need to go through extended installation steps, and can be up and running in minutes.

What I have to prepare upfront:

  1. Download and install Eclipse with the needed libraries and tools: Eclipse, gcc, gdb, Segger,  …
  2. Inside Eclipse, install the needed plugins: Processor Expert, eGit, Eclox, P&E, …
  3. Setup workspace environment and variables and export it so it can be re-distributed and re-used.
  4. The result is a layout/zip file with all the needed files for the students.

The students only need to:

  1. Unzip the archive with the Eclipse IDE and tools set up.
  2. Import the extra Processor Expert components (step only needed once).
  3. For a new workspace, import the XML settings.

And then they are ready to be productive :-)

Constructing a DIY IDE for ARM Cortex-M

The steps below are for Windows 7 64bit, but similar steps apply to Linux and Mac too. To the normal Eclipse and ARM tools, I’m adding the Freescale Kinetis SDK and Freescale Processor Expert to my IDE.

My class is currently using the Freescale FRDM-KL25Z (migrating to a Kinetis K20 and a FRDM-K64F). So what I need for the course is:

Constructing the IDE for the Classroom

I’m using C:\Tools\IDE as my installation folder. Steps are explained in my DIY series (see http://mcuoneclipse.com/2014/02/15/diy-free-toolchain-for-kinetis-part-9-express-setup-in-8-steps/), but repeated here so everything is in one place.

The steps to download and construct the IDE:

  1. Eclipse Kepler: Got to http://www.eclipse.org/downloads/ and download the “Eclipse IDE for C/C++ Developers” (eclipse-cpp-kepler-SR2-win32-x86_64.zip). Extract it into C:\Tools\IDE
  2. GCC ARM Embedded: Go to https://launchpad.net/gcc-arm-embedded and download the archive (gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip). Extract it into C:\Tools\IDE\gcc
  3. Cross Build tools: Go to http://sourceforge.net/projects/gnuarmeclipse/files/Miscellaneous/ and download the Cross Build Tools.zip file. Extract echo, rm and make into C:\Tools\IDE\gcc\bin (rename the files so they are echo.exe, make.exe and rm.exe)
  4. Kinetis SDK: Go to http://www.freescale.com/ksdk and download the Freescale Kinetis SDK package (KSDK_1.0.0-beta.zip). Extract it into C:\Tools\IDE\sdk
  5. FreeRTOS for Kinetis SDK: Go to https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KSDK and download the FreeRTOS zip file (FreeRTOS_V8.0.0.zip). Place the files (without the root folder) into C:\Tools\IDE\sdk\KSDK_1.0.0-Beta\rtos\FreeRTOS
  6. Segger: Go to http://www.segger.com/jlink-software.html and download the J-Link Software and Documentation pack. Install it into C:\Tools\segger
  7. MCUonEclipse Processor Expert Components: Go to https://github.com/ErichStyger/mcuoneclipse/tree/master/PEupd and download both the Part1_*.PEupd and Part2_*.PEupd files. Place the two files into C:\Tools\IDE.We will install them later from Eclipse.

Next, I’m going to install the needed Eclipse plugins so they are present in the IDE. I launch Eclipse (C:\Tools\IDE\eclipse\eclipse.exe). Using the menu  Help > Install New Software I install the following plugins with the provided update site (‘Work with:’):

  1. GNU ARM Eclipse: Use http://gnuarmeclipse.sourceforge.net/updates as update site and install the GNU ARM Eclipse plugins.
  2. GNU ARM PEMicro: Use http://www.pemicro.com/eclipse/updates as update site and install the P&E plugins.
  3. Processor Expert: Go to http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PE_DRIVER_SUITE&tid=PEH and download the ‘Microcontrollers Driver Suite plug-in for existing Eclipse’ (DriverSuite_10.4_Install_into_Eclipse_3.7_4.2.zip). Unzip the archive.Use com.freescale.eclipse3.7-4.2.updater.custom.updatesite.zip as local update site and install it. Same for PExDriverSuite_v10.4_eclipse.zip: use as local update site and install it.
  4. FreeRTOS (Wittenstein) State Viewer: Install  http://www.highintegritysystems.com/StateViewer/
  5. Eclox (optional): Use http://download.gna.org/eclox/update/ as update site and install eclox (no need for the ‘hot’ part)
  6. eGit (optional): Use http://download.eclipse.org/egit/updates as update site and install it.
  7. Backeteer: (see “Bracketeer: the ultimate bracket plugin“). Use http://chookapp.github.com/ChookappUpdateSite/ as update site and install it including CDT support.

With this, I have my DIY IDE ready, and the directory structure looks like this:

DIY Eclipse IDE for ARM Directory Overview

DIY Eclipse IDE for ARM Directory Overview

Eclipse Workspace Environment

While I have a functional IDE, there are a few things which need to be setup for every new workspace. In Eclipse I can use the Export function to export the settings as XML, see “Copy my workspace settings“.

  1. ${jlink_path}is the path totheSeggerGDB server, defined as ‘StringSubstitution’ (menu Window > Preferences > Run/Debug > String Substitution) to ${eclipse_home}\..\segger
    Segger jlink_path string variable

    Segger jlink_path string variable

    This is used in the debugger settings for Segger J-Link:

    Segger jlink_path

    Segger jlink_path

  2. ${gcc_path} which points to the GCC ARM Embedded binaries (menu Window > Preferences > C/C++ > Build > Build Variables: ${eclipse_home}\..\gcc\bin
    gcc_path Build Variable

    gcc_path Build Variable

    This is used in the build panel for the tool chain:

    gcc_path in project settings

    gcc_path in project settings

  3. KSDK_LOC Linked resource variable pointing totheKinetis SDK root folder (menu Window > Preferences > General > Workspace > Linked resources) pointing to C:\Tools\IDE\sdk\KSDK_1.0.0-Beta:
    Linked Ressource Setting

    Linked Ressource Setting

    This is used to create linked files to the Kinetis SDK while adding files to the project:

    File Operation to use Link to Files

    File Operation to use Link to Files

  4. ksdk_path which points totheKinetis SDK (${eclipse_home}\..\sdk\KSDK_1.0.0-Beta) with menu Window > Preferences:
    ksdk_path build variable

    ksdk_path build variable

    This is used in the build tool settings e.g. for the header file include path:ksdk_path in compiler settings

This and other options just need to be defined once: I can expert them as XML file and then students can import that into a new workspace.


The above Eclipse workspace settings get exported with the menu File > Export > General > Preferences:

Exporting Eclipse Preferences

Exporting Eclipse Preferences

And then store it as an XML (.epf) file inside the IDE root folder:

Exporting Preferences

Exporting Preferences

With all the needed files in C:\Tools\IDE, I can put everything in a single zip file which I give to the students:

Eclipse IDE with configuration files

Eclipse IDE with configuration files

The need to:

  1. Unpack the archive to C:\Tools
  2. Launch Eclipse, then import the two *.PEupd files in C:\Tools\IDE with the menu Processor Expert > Import Component(s)
  3. For their new workspace, import the settings (File > Import > Preferences) from C:\Tools\IDE\wsp_preferences.epf


It is a little work to have my classroom IDE put together, but compared to silicon vendor provided Eclipse versions, I get *exactly* what I need, even with more features and flexibility. Moreover, I’m not limited to the ARM microcontroller of a single vendor: I have a cross-platform and cross-vendor IDE all together. And with providing the zip file with a few extra files for the students is much easier and faster than to go with the silicon vendor IDEs anyway.

Putting together the above DIY Eclipse took about one hour for me (one time, including downloading and installing all files). With this, I have an IDE with many cool plugins pre-installed for development of ARM microcontroller projects. And students are able debug their first project just in a few minutes.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}