On Monday the new semester starts, and yet again: we will do a Sumo thing :-). They can choose which tool chain they would like to use to develop their application for the ARM Cortex-M0+ used from Freescale. One option is to create a ‘Do-It-Yourself’ toolchain. Since the start of the series, things have evolved: there is a new GNU ARM tool chain available, Segger has updated their drivers, and most important the GNU ARM Eclipse plugin has been greatly extended to support Freescale parts and Processor Expert. So instead to read through all the previous tutorials, this one is about putting together a free tool chain less than 10 minutes (not counting the time to download around 500 MByte).
Outline
The steps outlined below get you a free and unlimited Eclipse toolchain installed on Windows. The setup outlined is for Segger J-Link/OpenSDA, but can be easily adapted for other run control solutions.
What we need are the following parts for a full-sized tool chain with all the bells and whistles:
- Eclipse for C/C++: the IDE and framework to edit, build and debug my projects.
- Cross Build Tools: some tools like ‘echo’ or ‘rm’ are not present by default on Windows, this package closes that gap.
- GCC ARM Embedded: compiler, linker, build tools and gdb, they are needed to compile my sources.
- PATH: making sure that external tools are in the PATH.
- GNU ARM Eclipse plugins: integration of the GNU gcc for ARM into Eclipse, provides panels and build tool integration including a wizard to create new projects.
- Processor Expert: With Processor Expert I can build my applications with software drivers and have it deal with the low-level microcontroller initialization.
- McuOnEclipse Processor Expert Components: an extensive set of added Processor Expert components featured in this blog.
- Debug Interface: using the GDB debugger to deal with a probe like Segger.
💡 For deeper technical details, please go through the previous tutorials, listed at the end of this article.
Installation
The following are the quick steps for installation of the toolchain. There are several downloads needed with a total size of 600 MByte. It is possible to have multiple toolchains installed. For this tutorial, I’m installing everything into C:\Freescale\Kepler
Step 1: Eclipse
From http://www.eclipse.org/downloads/ and download Eclipse IDE for C/C++ Developers:
- 32bit version: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-win32.zip
- 64bit version: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR1/eclipse-cpp-kepler-SR1-win32-x86_64.zip
Then unzip the archive into your installation folder (I use C:\Freescale\Kepler).
Step 2: Cross Build Tools
There are a bunch of tools like ‘echo’ or ‘rm’ which are used by Eclipse. Go to
and download the Cross Build Tools.zip file. I have the files placed in
C:\Freescale\Kepler\CrossBuildTools.
The package has cs-make.exe and cs-rm.exe included. Rename them to rm.exe and make.exe (or make copies and rename):
Step 3: GCC ARM Embedded
Download the latest GCC ARM Embedded from the Launchpad:
💡 You can use the .zip from above site too. But then you need to change the PATH setting manually.
Run the setup. It is up to you where to install the tools, default (depends on release) is
C:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4
On my side I have it installed within my Eclipse installation folder:
C:\Freescale\Kepler\GNU Tools ARM Embedded\4.8 2013q4
💡 Having the GNU Tools installed inside the Eclipse folder has advantages (everything in one place, easy to pass tool chains to somebody else, etc), but might not fit your needs. You still can change things later on.
❗ Make sure you select ‘Add path to environment variable’ at the end of the setup.
Step 4: Checking PATH
Now verify that the PATH is correct. The PATH variable needs to reach
- The GNU ARM Embedded (gcc) tools.
- The Cross Build Tools: echo, make and rm.
So I need to have
C:\Freescale\Kepler\Cross Build Tools;C:\Freescale\Kepler\GNU Tools ARM Embedded\4.8 2013q4\bin;C:\Freescale\Kepler\GNU Tools ARM Embedded\4.8 2013q4\arm-none-eabi\bin
in my PATH settings. Verify with the DOS/cmd prompt and the ‘set path’ command if everything setup correctly. If not, go the to Windows Control Panel and change/modify the PATH environment variable (see here if you don’t know how to do this).
Step 5: GNU ARM Eclipse Plugins
Launch Eclipse (C:\Freescale\Kepler\eclipse\eclipse.exe), use the menu Help > Install New Software, use
as update site and install the packages.
Step 6: Processor Expert
This step requires that you register with Freescale (free registration). Go to
then switch to the Downloads tab. Download the ‘Microcontrollers Driver Suite plug-in for existing Eclipse’.
This is a zip file with two updater packages for Eclipse. Unpack the zip file and install first the
- com.freescale.eclipse3.7-4.2.updater.custom.updatesite.zip
💡 Use ‘Add’ and then ‘Archive’ to browse for the zip file. Or drag&drop the file into the ‘Work with:’ field.
Afterwards, install the second zip archive file:
- PExDriverSuite_v10.3_eclipse.zip
Installation takes several minutes, followed by a restart of Eclipse.
Step 7: McuOnEclipse Processor Expert Components
Go to
and download the PEUpd files (Part1 and Part2).
In Eclipse, use the menu Processor Expert > Import Component(s) to import the two packages. Restart Eclipse.
Step 8: Debugger Interface (Segger)
If you own a Segger J-Link or are using the Segger OpenSDA firmware, then this will be your choice of debug interface. There are other alternatives like P&E or CMSIS-DAP with OpenOCD (see List of Tutorials at the end of this article). Go to
and download the software (you will need a serial number of a Segger probe). Then install the software (I have it installed under C:\Freescale\Kepler\SEGGER).
Summary
With a few steps, I have put together my Do-It-Yourself toolchain, ready to develop cool applications for ARM microcontroller:
In the next post I explain how to create a project with the newly released GNU ARM Eclipse plugins. Stay tuned :-).
List of Tutorials
In case you want to get all the details, here is the list of tutorials for each part:
- Part 1: Setting up ARM GNU tool chain
- Part 2: Setting up Eclipse IDE
- Part 3: Setting up the debugger (P&E and Segger)
- Part 4: Setting up Processor Expert
- Part 5: Setting up FreeRTOS Kernel Awareness
- Part 6: Linux Host Support with OpenOCD and CMSIS-DAP
- Part 7: GNU ARM Eclipse Plugins
- Part 8: Processor Expert with GNU ARM Eclipse Plugins
- Part 9: DIY Free Toolchain for Kinetis: Part 9 – Express Setup in 8 Steps
- Part 10 – Project Creation with GNU ARM Eclipse 2.1.1
Happy Toolchaining 🙂
Excellent summary, although I am the linux guy, this is enough for anyone to port over in linux. Just that building openOCD in linux is straightforward so i don’t use Segger, just the Freedom boards.
LikeLike
Thanks! I still cannot build (yet?) OpenOCD with CMSIS-DAP on my machine, and I have not found any pre-built libraries. I started on this and wrote all the steps (using your steps as guideline), but somehow I still don’t have all the needed (or correct) build tools on my machine. Who could offer prebuilt Win32 binaries from the https://github.com/TheShed/OpenOCD-CMSIS-DAP?
LikeLike
What’s the main issue? i will get a win7 system and try tonight
LikeLike
Issues were with the needed tools and dependencies. I had to stop working on it because of other priorities.
LikeLike
Pingback: DIY Free Toolchain for Kinetis: Part 8 – Processor Expert, Eclipse and GNU ARM Eclipse Plugins | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 7 – GNU ARM Eclipse Plugins | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 4 – Processor Expert for Eclipse | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 6 – Linux Host with OpenOCD and CMSIS-DAP | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 5 – FreeRTOS Eclipse Kernel Awareness with GDB | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 3 – Debugger (GDB Server with P&E and Segger) | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 2 – Eclipse IDE | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 1 – GNU ARM Build Tools | MCU on Eclipse
Pingback: DIY Free Toolchain for Kinetis: Part 10 – Project Creation with GNU ARM Eclipse 2.1.2 | MCU on Eclipse
Pingback: First Steps with the Freescale TWR-K64F120M | MCU on Eclipse
Pingback: Processor Expert (Driver Suite/Plugins/KDS) V10.4 with new Component Inspector | MCU on Eclipse
Pingback: Constructing a Classroom IDE with Eclipse for ARM | MCU on Eclipse
Hey amazing. I was re-reading this as I’m trying to follow how to modify a component.
I’m using KDS1.1. which seems to do all the above (and was released after your wrote it)
KDS1.1 also has the ability to create a new component, (which I found after downloading CW-10.6) so I’m assuming it therefore has the ability to modify a component
So when I import the mcuoneclipse .PEupd I think it ends up in C:\ProgramData\Processor Expert\PEXDRV_PE5_3
So to modify a PEupd source file (since it is such a great teaching paradigm) I create a new component project “mcuoneclipseLocal” and from my fork of mcuoneclipse I copy the file Beans and Drivers on to the local project tree.
However on opening KDS I can go into the project tree, but haven’t figured out how to invoke PE views. So I think I’m missing something and will have to go back to a previous tutorial to figure it out – or any suggestions.
LikeLike
Hi Neil,
yes, many aspects fo this article seems to have ended up in KDS :-). With that DIY toolchain and Processor Expert (Driver Suite 10.4), it is possible to create components too, altough I still use and prefer the classic component wizards of CodeWarrior (easier and simpler to use).
Where the components end up, depends on the IDE. For DS 10.4 and KDS it is PEXDRV_PE5_3, for CodeWarrior it is CWMCU_PE5_00, for classic S12X tools it is CW12_PE3_02. To open the Processor Expert views use Processor Expert > Show views. To import components from my library use File > Import > Component Development Environment.
LikeLike
Following this tutorial I get this error when installing PExDrivers 10.4
An error occurred while collecting items to be installed
session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=null –> [R]com.freescale.processorexpert.standalone_root 10.4.0, action=).
The required Touchpoint: com.freescale.updater.touchpoint 1.0.0 touchpoint for the collect action is not included in the installation manager configuration.
The required Touchpoint: com.freescale.updater.touchpoint 1.0.0 touchpoint for the collect action is not included in the installation manager configuration.
LikeLike
Hi Jacques,
have you installed this package (part of step 6):
com.freescale.eclipse3.7-4.2.updater.custom.updatesite.zip
?
Erich
LikeLike
For some reason I’m unable to install this package
PExDriverSuite_v10.3_eclipse.zip
It keeps failing at 79%, this is the error it spits out.
An error occurred while installing the items
session context was:(profile=epp.package.cpp, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null –> [R]com.freescale.processorexpert.standalone_root 10.4.0, action=com.freescale.updater.customactions.actions.FreescaleInstall).
org/eclipse/core/runtime/adaptor/LocationManager
org/eclipse/core/runtime/adaptor/LocationManager
LikeLike
Which Eclipse version are you using? Luna? Kepler? I see that you are trying to install 10.3: Driver Suite 10.4 is the latest one for Kepler, and Processor Expert for Kinetis v3.0 is the latest for Eclipse Luna.
LikeLike
I’ve run into this problem as well. I went back to step 6 as you suggest, downloaded and unzipped the files again and attempted to install com.freescale.eclipse3.7-4.2.updater.custom.updatesite.zip but got the error message that it was already installed. I still get the same error message. I’m running on Windows 8.1 with Kepler C/C++ Eclipse installed. I noticed that the download doesn’t mention Kepler “Microcontrollers Driver Suite v10.4 plug-in for existing Eclipse 3.7 (Indigo) and Eclipse 4.2 (Juno) installations (REV 10.4) “
LikeLike
With a little luck I found that the Touchpoint error encountered in step 6 can be resolved by skipping the installation of PExDriverSuite_v10.3_eclipse.zip and downloading and installing PExDrv v10.4 Update 3 (requires base PExDrv v10.4 installed). The PExDrv v10.4 Update 3 update includes PExDriverSuite_v10.3_eclipse.zip.
LikeLike
Hi Teno,
thanks for posting that solution. Yes, indeed, things are a little bit different with the 10.4. Glad to see that you made it working and posted the tip here!
LikeLike
Hello Eric,
I’m spending more time getting the development environment working than the rest of the entire project will take and this has been the most helpful posting I’ve used, and I’ve tried many, so I felt it was appropriate to post the solution here. Glad I could help.
LikeLike