So NXP announced here a $40 Billion Merger with Freescale. Frequent readers of my blog will know that I’m using in my own and university projects many Freescale devices with Eclipse based tools (Eclipse Kepler/Luna, Emprog ThunderBench, Atollic TrueSTUDIO, Freescale CodeWarrior and of Freescale Kinetis Design Studio) in combination with Processor Expert. In a few projects I have used NXP devices with the CodeRed Eclipse base tools too. So I was curious how that merger of the two silicon companies could look like, if you merge the Freescale and NXP Eclipse based tools, and mix it with Processor Expert and the Freescale Kinetis SDK? The result looks like this:
A while back I wrote about using the CodeRed Red Suite (see “Red Suite 5: Eclipse Juno, Processor Expert and unlimited FRDM-KL25Z“), and only shortly afterwards NXP had acquired CodeRed. Now with NXP is in the process to acquire Freescale, time to look how the Freescale Kinetis SDK and Processor Expert can be combined with the LPCXpresso?
💡 LPCXpresso is a special version from CodeRed created for NXP.
NXP LPCXpresso IDE
💡 I already have Kinetis Design Studio V3.0.0 installed on my machine. I have not tried the steps below on a clean machine. The steps below work for me using the FRDM-K64F board and the Segger J-Link Software. LPCXpresso is able to debug my board using Segger, but I’m not sure if it using the KDS drivers or drivers from LPCXpresso.
Download LPCXpresso from http://www.lpcware.com/lpcxpresso/download and install it. I’m using in this post the v7.7.2:
GNU ARM Eclipse Plugins
LPCXpresso comes with its own build tools integration. But because the Freescale parts are using the open source GNU ARM Eclipse plugins. I use with the menu Help > Install New Software:
I’m using the following update site:
Press ‘Next’ and go through the installation process.
Freescale Kinetis SDK
Next, download Kinetis SDK from http://www.freescale.com/ksdk and install it. The Kinetis SDK is a software library and drivers package for Kinetis devices. The version I’m using at this time is V1.2.0.
The Kinetis SDK comes with an update package for Eclipse. On Windows, it is
Install that package in LPCXpresso using the menu Help > Install New Software and then install that archive:
💡 Drag&Drop the file into the ‘Work with’ edit box.
Press ‘Next’ and go through the installation process.
Freescale Processor Expert
Next, I’m going to install Freescale Processor Expert. Processor Expert is a really cool tool which allows to graphically configure and initialize a device. Additionally it comes with a wizard to create projects for Freescale Kinetis devices. Download Processor Expert V3.0.0 from http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PE_DRIVER_SUITE&tid=PEH. Because LPCXpresso V7.7.2 is Eclipse Luna (4.4) based, download the file for the Eclipse 4.4:
This downloads you the PEx_for_Kinetis_3.0.0_Install_into_Eclipse_4.4_Unzip_me.zip file: as the name indicates: unpack that archive. Besides documentation, there are two software packages in it. First, use in LPCXpresso the menu Help > Install new Software and install the freescale_updater.zip:
Go through the installation process. Then, do the same, but this time install the PEx_for_Kinetis_3.0.0.zip:
The first time the IDE is launched with the new installed Processor Expert, it will update the list of supported processors:
After that, ready to rock :-).
For this example, I’m creating a project for the Freescale FRDM-K64F board (see e.g. “FTF: FRDM-K64F, Kinetis Design Studio and Kinetis SDK“) using the Segger J-Link interface (see “Segger J-Link Firmware for OpenSDAv2“). To start the New Project Wizard, I use the Menu File > New > Kinetis Project:
Next, I specify the project name and select the board or processor:
As I have the Kinetis SDK installed, it recognizes that my board/device is supported with the SDK and Processor Expert:
The last dialog is about the compiler to be used (if I have selected Processor Expert, as it supports multiple compilers and IDE’s). LPCXpresso is using GNU, so I’m going with the default:
With this, the project will be created:
Building and Toolchain Selection
LPCXpresso is using its own custom GNU toolchain and libraries, and not the de-facto standard one from ARM (GNU ARM Embedded from launchpad (https://launchpad.net/gcc-arm-embedded)). The GNU ARM Eclipse (Liviu, http://gnuarmeclipse.livius.net/blog/) make it easy to use different tool chains. So I’m going to use the one installed by Kinetis Design Studio. I use the menu Window > Preferences > C/C++ > Build > Global Tools Path to configure it for all workspaces to use the KDS v3.0.0 GNU ARM Embedded tool chain:
💡 If not having the Kinetis Design Studio installed, get the GNU ARM Embedded tool chain from https://launchpad.net/gcc-arm-embedded and the Build Tools from http://gnuarmeclipse.livius.net/blog/build-tools-windows/
The same settings are as well under the menu Window > Preferences > Run/Debug > String Substitution:
With this, the project should compile fine:
The debug configurations (menu Run > Debug Configurations) have been preconfigured at project creation time by the wizard. For Segger J-Link, I had nothing to do:
This because I already had the Segger J-Link software downloaded and installed on my machine. If this is not the case for you, you might need to download it from www.segger.com. If you want to know which Segger software the launch configuration is using, press the ‘Variables…’ button:
On the jlink variable, press the ‘Edit Variables…’ button:
And there I can see what it is using or I can change it to my needs:
With this sorted out, I can press ‘Debug’ or use the ‘Debug’ toolbar drop-down:
💡 Do not use the ‘plain’ debug icon, as this launches a LPCXpresso specific ‘search my debug adapter/emulator’ wizard, which won’t recognize a non-LPCXpresso debug connection.
And voilà: I’m debugging the Freescale FRDM-K64F board with the NXP LPCXpresso :-):
LPCXpresso is a nice Eclipse distribution, with nice features built-in like trace. Their customized build tools integration and views making things easy to use. Advanced features like trace are not free of charge, and the free of charge edition comes with a code size limit. On the other side, the Freescale Kinetis Design Studio is unlimited and free of charge, but does not come with advanced features like trace. The cool thing is that the Freescale differentiator Processor Expert and as well the Kinetis SDK support with it can be easily installed into the LPCXpresso IDE, making it possible to be used for Freescale Kinetis Devices.
Happy Expressing 🙂