Many of my currently active projects are using Kinetis Design Studio (KDS) V3.2.0 from NXP (I have published many of my projects on GitHub). Now with the advent of the MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“), I have migrated several projects from KDS to MCUXpresso. This post is about how to easily get KDS projects ported and running in MCUXpresso IDE.
MCUXpresso IDE Series
This article is part of a series to get up to speed using the new NXP MCUXpresso IDE. Published so far are:
- MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers
- MCUXpresso IDE: S-Record, Intel Hex and Binary Files
- MCUXpresso IDE: Adding the Eclipse Marketplace Client
- MCUXpresso IDE: Importing Kinetis Design Studio Projects
- MCUXpresso IDE: Installing Processor Expert into Eclipse Neon
- MCUXpresso IDE: Terminate and Disconnect a Debug Session
- MCUXpresso IDE: Blinky the NXP LPC800-DIP Board
MCUXpresso IDE is using the newer (Neon) Eclipse IDE than KDS (Luna) with a different build system: MCUXpresso IDE is using the same build system and integration as LPCXpresso, while KDS is using the GNU ARM Eclipse plugins. Both approaches have their pros and cons (as always). Plus MCUXpresso IDE does not include Processor Expert, but KDS does. To migrate and use KDS projects with MCUXpresso IDE, there are the following basic approaches:
- Importing KDS (non-Processor Expert) projects: for this the GNU ARM Eclipse plugins needs to be installed, along with the GNU ARM Eclipse build tools. This allows to use KDS projects as in KDS, but with the extra functionalities of MCUXpresso IDE.
- Importing Processor Expert projects: same as above, but this needs the installation of Processor Expert plugins too. That way I can continue to use Processor Expert projects as in KDS, but keep in mind that NXP does not offer newer device support for Processor Expert.
- Porting KDS projects to MCUXpresso IDE: this means to migrate a KDS project to the MCUXpresso build system. This is a fairly simple approach, basically with creating a new project in MCUXpresso IDE and then move the files over.
💡 In general I follow the approach not to switch IDE or toolchain for projects. Migrating or porting a project only makes sense where it is really necessary. I do have many projects I keep maintained in older toolchains like CodeWarrior, and only migrate projects which I continue to develop and evolve.
Because it is too much to describe everything in one post, I focus on approach 1 in this article.
At the time of this article, I’m using the following software:
- KDS projects using Kinetis Design Studio V3.2.0
- MCUXpresso IDE V10.0.0 build 344
- GNU ARM Embedded Toolchain v6-2017-q1
- GNU ARM Eclipse Build tools v2.8-201611221915
- GNU ARM Eclipse plugins v3.3.1-201702251311
I’m using Windows as host, but similar steps apply to the Mac and Linux hosts. I’m assuming you already have Kinetis Design Studio V3.2.0 installed. If not, the steps below install everything you need to use Kinetis Design Studio projects in MCUXpresso, and you don’t need KDS V3.2.0 installed (e.g. if you downloaded a project from somewhere).
💡 Note that tutorial does not include the installation of Processor Expert into MCUXpresso IDE: this is subject of a next article.
GNU ARM Embedded Toolchain
KDS has pre-installed the GNU ARM Embedded Toolchain. While it would be possible to use that same version, I’m using the latest version from https://launchpad.net/gcc-arm-embedded which is the 6-2017-q1-update I can get from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads:
I recommend to download the installer and run the setup with the default settings:
Installation of GNU ARM Eclipse Build Tools
On Windows, I need to install other build tools which are already part of Kinetis Design Studio (inside the <kds>\bin folder).
Follow the instructions on http://gnuarmeclipse.github.io/windows-build-tools/install/ and download the latest setup from https://github.com/gnuarmeclipse/windows-build-tools/releases, then run the setup with the default settings:
GNU ARM Eclipse Plugins
To have the build tools working in Eclipse, I need to install the GNU ARM Eclipse plugins, otherwise KDS projects in MCUXpresso IDE will show an error message similar to the one below:
Orphaned configuration. No base extension cfg exists for ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1376620489
Basically it means that the project (.cproject file) needs the ilg.gnuarmeclipse.managedbuild.cross.config.elf build plugin/integration which is not installed by default in MCUXpresso IDE. The general process is described in http://gnuarmeclipse.github.io/install/.
To install the plugins, I have two ways:
- Eclipse Marketplace (preferred)
- Install new Software
💡 Latest GNU ARM (now MCU) Eclipse plugins starting with v4.1.1 require CDT 8.2.1. MCUXpresso IDE uses CDT 8.1, so it will not install the latest version. Instead, go to the releases download page (https://github.com/gnu-mcu-eclipse/eclipse-plugins/releases) and download the GNU ARM Eclipse plug-ins v3.4.1-201704251808 and install that zip file using the menu Help > Install New software.
With the Eclipse Marketplace you need that plugin installed (see “MCUXpresso IDE: Adding the Eclipse Marketplace Client“), use the menu Help > Eclipse Marketplace:
Search for the plugin and install it:
I recommend to install all plugins: that way it is possible to create and debug any ARM Cortex-M projects (beyond NXP):
If you are running into a ‘handshake’ problem, then there is a problem with the security settings to get access to SourceForge (see this link).
In that case, I recommend to download a zip file described in the next step.
Install New Software
I can use the menu Help > Install New Software and point to the following update site:
But be aware that this might not work because SourceForge has recently changed the security settings (see this link). Instead, I recommend to download the zip file from
and then use that zip file in the dialog accessible by Help > Install New Software:
💡 I can drag&drop the zip file into the dialog.
NOTE: Be warned! I recommend to *copy* the projects, and *not* to try to use with MCUXpresso and KDS in parallel. MCUXpresso is using a newer Eclipse, but while it *might* work to open that project afterwards in KDS again, it is certainly not something I would like to do. So make a copy/backups of the project before importing (and changing) it in MCUXpresso! Likewise, you should NEVER share a workspace folder with different Eclipse versions.
With this, I have everything to import, build and debug Kinetis Design Studio V3.2.0 projects :-). There are multiple ways to import projects, the easiest one is to use the Quickstart panel and use ‘Import project(s) from file system…’:
💡 Alternatively use the normal Eclipse way using the menu File > Import > General > Existing Projects into Workspace
Then browse to the folder or use the zip archive:
Then go through the dialog to import the project(s).
Verify Project Settings
With the installed plugins and software in the previous steps, everything should be in place to build and debug the imported projects. Here are a few things to verify and check if everything is configured correctly.
Use the ‘edit project settings’ menu in the Quickstart panel (or use the menu Project > Settings):
Opening the project properties, the settings should show up as in KDS:
There is a small glitch in that Quickstart menu action that it might show only the ‘Error Parsers’. In that case, use the ‘left’ icon to get to the left side of the panels:
The toolchain shall show up as ‘GNU Tools for ARM Embedded Processors‘ in the project settings:
The GNU ARM Eclipse plugins allow a very flexible and powerful tool chain configuration (up to separate tool chains for each project). Below are the workspace settings (menu Window > Preferences). It specifies which toolchain and build tools are used, and it shows where I have installed them in the previous steps:
💡 I’m using here *different* (newer) build tools and tool chain than what is installed in KDS v3.2.0! If you have KDS installed, and if you want to use the same toolchain, then you can configure that in that dialog.
MCUXpresso has an extra setting in the project to specify the microcontroller used. Because that project has been created outside MCUXpresso IDE, the MCU is not correctly assigned. This setting is not important for building it with the GNU ARM tools, but is needed if I want to use other advanced MCUXpresso IDE settings like automatic probe discovery (more about this later).
I recommend to go to the C/C++ Build > MCU settings and assign the correct MCU used in that project:
However, I need the MCUXpresso SDK (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“) installed for that MCU!
💡 I recommend to have the SDK installed. Otherwise (and if there is no SDK for the MCU used in the project), I recommend to set a matching ‘generic’ MCU from the preinstalled MCUs
With this, everything is set up to build and debug!
An important step after importing projects is to get rid of any old files with a ‘clean’. The easiest way is to use the ‘clean’ in the Quickstart panel (or use the menu Project > Clean):
Yet again, us the Quickstart panel to build the project (or use the menu Project > Build):
This should build the project without errors (as in KDS).
KDS projects use normal Eclipse launch configuration files and settings. The launch files are usually stored in a ‘settings’ folder inside the project:
MCUXpresso IDE, on the other side, is able to detect debug probes automatically and to create and manage the launch configurations (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“).
I can continue to use the launch configurations in the project, the same way as in KDS. I can check them using the Debug Configurations menu:
The screenshot below shows some debug configurations in my workspace:
Compared to KDS, there is a group on the top for launch configurations for the LPC-Link/LPC-Link2 debug connection.
Because the debug plugin for P&E are the same (provided by P&E), the group combines both imported KDS and MCUXpresso configurations.
Notice that there are two groups for the Segger debug plugin: one for MCUXpresso and one for the GNU ARM Eclipse Segger plugin we have installed in one of the previous steps. The one on the bottom is exactly the one you know from KDS.
💡 If you compare the features and responsiveness of the GNU ARM Eclipse SEGGER plugin and the one installed with the GNU ARM Eclipse plugins, then you might like the one from GNU ARM Eclipse more, especially as it provides more detailed settings. The good thing is that with installing the GNU ARM Eclipse plugins you can use it for any project. However, it won’t work with the MCUXpresso automatic probe detection.
Which Segger J-Link binaries are used by the GNU ARM Eclipse debugger plugin is a setting behind the menu Window > Preferences > Run/Debug > SEGGER J-Link:
Verify the folder settings or use the ‘Restore Defaults’ folder if you have updated the SEGGER files.
With this, I can debug my KDS project in MCUXpresso IDE:
Using MCUXpresso Probe Detection
One benefit of the ‘combined’ IDE and plugins is that now I can use the extra features of MCUXpresso for my imported project. And one of it is the automatic probe detection (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“). For this I launch the debugger with the blue debug icon (instead with the normal green one):
If you get a dialog about “No MCU associated with this project. Please select an MCU before continuing”, then check the section “MCU Settings” from above: it means that project settings no MCU assigned.
Otherwise, I get the automatic probe discovery dialog:
And then it will create the selected debug connection/configuration and I can debug with it.
To re-trigger the automatic probe discovery, a simple way is to remove the created launch configurations (but then I will lose any custom settings I have made):
Processor Expert Projects?
The presented approach even works with Processor Expert projects, only that you won’t be able to generate Processor Expert code with it. So as long you have generated code in the KDS project, you can import it as any normal project using the above approach.
As for how you could continue to use Processor Expert projects in MCUXpresso and fully using Processor Expert as in KDS: this is subject of a future article.
I can easily import existing Kinetis Design Studio (KDS) projects. With installing the toolchain (if not already installed) plus the GNU ARM Eclipse plugins in MCUXpresso IDE, I can build and debug existing KDS projects without any porting effort or any project conversion: they simply work. Compared with the original KDS, I have a newer Eclipse, the latest toolchain and can use the extra features offered in MCUXpresso. I have this now working with several existing KDS projects, and this works very well. To the point I might leave KDS behind and continue to use all KDS projects with the MCUXpresso IDE.
I’m running out of time this week-end. What I have not covered in this article is how to get Processor Expert running in MCUXpresso IDE, or how to switch the toolchain/project from KDS to the native MCUXpresso one. So this next on my list of things. I hope that what I was able to write-up is already useful for you.
Happy Importing 🙂
- MCUXpresso IDE web page: http://www.nxp.com/mcuxpresso/ide
- MCUXpresso IDE community: http://www.nxp.com/mcuxpresso/ide/forum
- MCUXpresso Config tools and SDK: https://mcuxpresso.nxp.com/
- GNU ARM Embedded Toolchain: https://launchpad.net/gcc-arm-embedded
- GNU ARM Eclipse: http://gnuarmeclipse.github.io/
- GNU ARM Eclipse plugins: http://gnuarmeclipse.github.io/developer/releases/
- GNU ARM Eclipse build tools: http://gnuarmeclipse.github.io/windows-build-tools/install/