There are many mergers going on in the industry, and one of the largest one was in 2016 the integration of Freescale Semiconductor with NXP Semiconductors, with both providing Eclipse based IDE’s to their customer base. Consequently, the company merger triggered a merger of the IDE’s, and last week NXP has released the result: the 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 is basically ‘LPCXpresso on steroids’ (see “Embedded World Nürnberg 2017 Impressions: MCUXpresso, Hexiwear, NTAG, LPC800-DIP and Alan Hawse”), supporting both NXP Kinetis and LPC devices (ARM Cortex-M0(+)/M4/M7), and it is built upon the feature set of LPCXpresso. From LPCXpresso it inherits the Pro edition option (with IDE email support and extended trace features), and as Kinetis Design Studio, it is free of charge and unlimited in code size. For existing LPCXpresso IDE users it brings unlimited code size (the free LPCXpresso IDE has a code size limit of 256 KByte) beside of all the extra features like MCUXpresso SDK support.
Traditionally, at the university we are using a combination of CodeWarrior for MCU 10.x, Kinetis Design Studio v3.2 and LPCXpresso v8.2. Because the new IDE both supports Kinetis and LPC devices, I plan to migrate the LPCXpresso and Kinetis Design Studio course material to the new MCUXpresso IDE. In this post I give a brief overview about some of the main features which think will be very useful. Other than that, I think the information below is useful for anyone upgrading either from LPCXpresso or Kinetis Design Studio to the new NXP Eclipse IDE.
The IDE is available from http://www.nxp.com/mcuxpresso/ide. Downloading needs a user account at NXP, but no other registration or activation is needed for the free and code size unlimited version.
Support for the free version is community based (http://www.nxp.com/mcuxpresso/ide/forum) as for Kinetis Design Studio and LPCXpresso. There is a Pro version available which adds one year IDE email based support plus extended trace support (an existing LPCXpresso Pro license is recognized by the MCUXpresso IDE too).
I have used the version 10.0.0 (Build 344):
Compared to other IDE’s, the download size is rather small (576 MByte on Windows), and it is available on Mac and Linux too (I have it installed on Windows 7 and 10 so far). It installs all the debug probe drivers.
I think tools should not need a manual, as they should be intuitive so you don’t need to read the documentation. On the other side, especially for new users or for advanced topics, having a look at the documentation is not a bad idea (even if it is only to avoid a ‘RTFM’ answer from the support :-)):
The help menu has an entry for the electronic documentation:
This shows all the help files:
There is a direct link to the MCUXpresso IDE User Guide too:
The electronic IDE user guide is searchable, so this usually should give me what I’m looking for:
The documenation is accessible both from http://www.nxp.com/mcuxpresso/ide and from the installation folder of the IDE.
As LPCXpresso, the IDE includes a Quickstart Panel which gives access to the most used functions:
💡 I strongly recommend to use the Quickstart Panel, especially using the blue icon in there to start a debug session (more about this below).
Students typically are a bit lost with finding the project settings in Eclipse or how to do a build/debug. Using that panel will make things easier for them to find.
It includes the a ‘blue’ debug button to launch a debug session, and that’s the recommended way to start the debugger. The ‘blue’ one is present in the toolbar too.
There is as well the default ‘green’ debug icon of Eclipse, but that one should only be used if I have a debug connection (launch configuration) configured, as the ‘blue’ one is able to automatically detect a debug probe and configure it automatically (more about this later).
The IDE comes with legacy LPCOpen support for LPC devices. Everything else is data driven with the addition of MCUXpresso (formerly Kinetis) SDK.
I have to download the SDK for a device from https://mcuxpresso.nxp.com/ using the SDK Builder:
When building a new SDK/Configuration, make sure that the MCUXpresso IDE is selected, so it can be used with the IDE:
SDK Package Manager
In the IDE, there is a SDK package manager which is available under Window > Show View > MCUXpresso IDE:
The easiest way to import the SDK’s is to drag and drop the SDK zip file into that view:
The SDK package not only includes the driver sources files, but as well example projects and everything else the IDE needs to know about the device, for example toolchain support and debugger information.
By default, the SDK is used as a zip file. With this, the IDE extracts files from the zip and copies the files into the project. There is a workspace option to unzip the files to allow ‘linked files’ in the projects, but I do not recommend to use such linked files in projects.
From the ‘Installed SDKs’ view, I can directly open the Config and Builder page using a toolbar button:
For the classroom setup I plan to download the SDK zip files and then pass it to the students so they can import the zip file(s).
Projects can be created (as ‘new project’) or imported from the SDK examples:
For new projects, I can select a device or board from the SDK Wizard:
In the next dialog I can choose what I want to use in the project:
In the next Advanced Projects settings I have options for the library and memory settings. Beside of the usual Newlib and Newlib-nano I have the choice of the Redlib, a proprietary library more optimized for embedded devices:
Importing example projects is very similar, except that I have the choice of which examples I would like to import:
Using the previous SDK with the linked files were really hard (or even impossible?) to use, so I think students will very much like that new functionality.
MCUXpresso IDE uses the GNU Tools for ARM Embedded Processors version 5 (Q3 2016 release). The IDE is using the same project file format/build settings as LPCXpresso, so legacy LPC projects can be imported easily. Existing Kinetis Design Studio can be used with a few migration/porting steps.
💡 Kinetis Design Studio projects can be imported or migrated as the project format is different from the GNU ARM Eclipse one used in Kinetis Design Studio. I have ported several university KDS projects to MCUXpresso, but this is subject of a future article.
There is a ‘MCU settings’ panel in the project settings which tells the IDE the device used with the memory map:
This information is used for the managed linker scripts: by default, the IDE creates and maintains the GNU linker script, with other settings to manage the libraries, heap and stack settings:
Probably I will disable the managed linker script feature: the GNU linker files are really not that hard to read/write/use, and hiding the linker scripts behind this generator makes the object allocation not very transparent. But for inexperienced users, that’s certainly a useful feature.
The IDE supports P&E probes (Multilink, …), SEGGER probes (J-Link, …) and the LPC-Link/LPC-Link2 (CMSIS-DAP) probes. So the NXP embedded OpenSDA circuit on Kinetis Freedom and Tower boards are supported with P&E, Segger and CMSIS-DAP firmware, the SEGGER and P&E commercial probes, the NXP embedded LPC-Link and LPC-Link2 probes. I have the IDE working with different Tower, Freedom and LPC boards and debug probes (J-Link EDU is missing on the picture below):
What is new for Kinetis Design Studio users: it supports the LPC-Link2 probe which can load either a CMSIS-DAP or Segger firmware (for LPC). CMSIS-DAP with KDS really never worked well, so now I can use the LPC-Link2 with CMSIS-DAP to debug the Kinetis K22 on our robots:
So that would be a very affordable debug probe option as the LPC-Link2 is priced at US$ 20.
To debug the project, it is important to use the blue debug icon (and not the normal green one!). Use either the one in the toolbar:
or the one in the quickstart panel:
💡 Using the green one only works properly if I have a project selected, and a launch configuration available. Kinetis Design Studio works with the green debug button very well because the behaviour for the green button has been enhanced in that Eclipse distribution. MCUXpresso uses the ‘stock Eclipse’ green debug button which does not have that extension.
What is really cool is the probe discovery: When I start debug the project, it offers me to pick from any of the detected probes:
With this, it automatically creates the launch configuration file in the project root folder.
💡 In case I want to re-trigger a full probe discovery, I can delete the .launch files and it will recreate them.
That feature will be very useful for our classroom setup, where students debug from one machine multiple boards with multiple debug probes. This will be now much simpler and easier with the probe discovery.
As in LPCXpresso (see “CodeRed Debug Perspective in Kinetis Design Studio“), the new IDE offers a ‘Develop’ perspective:
Unlike in normal Eclipse where I would switch between ‘C/C++’ and ‘Debug’ perspectives, I can stay in a ‘Develop’ perspective. Especially on small laptop displays that unified perspective is a plus for the students too.
Normal Eclipse has a problem that it does not really show normal global variables (see “Variable Debugging with Eclipse Kepler“). Instead, the Expressions view had to be used (this has been a constant complain from the students too). MCUXpresso offers a ‘Global Variables View’ which solves that problem: I can browse and add global variables to that special view:
Kinetis Design Studio included the EmbSysRegView (see “Freescale CMSIS-SVD Register Files with Eclipse MARS and EmbSysRegView“) which worked well, but did not automatically use the target device SVD files. In MCUXpresso IDE there is the ‘Peripherals+’ view which basically extends the memory view:
I feel the EmbSysRegs view is somewhat more versatile and easy to use (but that’s probably only me?).
💡 A mistake I made with the Peripherals+ view was trying to inspect a peripheral for which the clocks were not enabled. I only can inspect peripherals which are clocked and accessible!
What I really like in that IDE is the support for FreeRTOS :-). All the debug connections (P&E, Segger and CMSIS-DAP) include FreeRTOS thread awareness:
Plus the IDE includes the NXP FreeRTOS Kernel views (see “FreeRTOS Kernel Awareness for Eclipse from NXP“) for Tasks, Heap, Timer and Queues:
So far students had to load that plugin, now it is included in the IDE installation.
The MCUXpresso IDE combines the features of Kinetis Design Studio plus LPCXpresso. For LPC users it has unlimited code size, Segger and FreeRTOS support added. For Kinetis users it adds CMSIS-DAP, trace support, automatic probe discovery, but there is no Processor Expert included. For Kinetis and LPC it provides a unified and modern IDE and build system, with a common SDK and nice project creation and added nice debugging features.
I have not touched on many other aspects and features like multicore support, watch/live variables, extended registers view or any of the (really cool!) SWO/trace/profiling/printf features with the LPC-Link2 debug probe. So I think these things might deserve another article about MCUXpresso IDE and tools.
I plan for more articles about the MCUXpresso IDE in preparation for the next semester, and compared to LPCXpresso and Kinetis Design Studio, I can use the new IDE with less efforts in the class as most things come pre-installed, and several features make it easier to use.
I have explored areas like what other plugins I would add/install, or how to use or migrate existing Kinetis Design Studio projects. And even how to use it with Processor Expert projects :-). And if you are interested in any particular topic, post a comment or thought and I try to get on it.
Happy Xpressing 🙂