Decisions, decisions! Such long weekends like Pentecost are a real challenge for a family with engineers:
- Should we join that record long traffic jam to Italy and be stuck for more than 4 hours and analyze it?
- Or: should we stay home, turn the BBQ smoker engine on fire, load it with baby back pork rib racks for a slow-and-low smoke treatment, while doing some on-the-side IDE and technology exploration?
Well, my family vote was kind of clear: they have chosen that second option. Not to mention that hidden technology piece in it, but that was part of the deal ;-).
And I’m sorry: this article is not about BBQ (for this see “Smoking BBQ Baby Back Ribs – Swiss Style“), it is about technology: I’m using the NXP MCUXpresso IDE and tools for many of my projects (see “Eclipse MCUXpresso IDE 10.1 with integrated MCUXpresso Configuration Tools“). Right before the this extended weekend, NXP has released the new v10.2.0 version, so here is where that technology exploration piece comes into play. Checking the release notes, this version number change includes so many cool stuff I decided to have a look and to check it out. Of course always having an electronic eye on the baby back ribs!
The MCUXpresso IDE targets the NXP LPC, Kinetis and i.MX RT Cortex-M microcontroller and microprocessors and runs on Windows, Mac and Linux hosts. It includes the GNU ARM Embedded toolchain, debugger and graphical configuration tools (MCUXpresso Config Tools) for pin muxing, clocks and peripheral driver configuration. Support for specific devices and families are provided through downloadable software packages (MCUXpresso SDK). It includes wizards to create and manage projects, managed linker scripts and many debugging features (instruction trace, SWO trace and profiling, live and global variable view, FreeRTOS Kernel awareness, flash programming tools, …). It has replaced all the previous IDE’s Freescale/NXP has provided in the past (CodeWarrior, Kinetis Design Studio) and is the NXP flagship and choice of IDE and toolchain.
At a very high level, the new version 10.2 comes with an updated Eclipse (Oxygen 3) and new CDT (9.4.3), updated toolchain/libraries and extended debugging features. It is free-of-charge, and as 10.1 there are no code size limits. But now even the ‘Pro’ features of 10.1 are now included free-of-charge, so everything is free and unlimited :-).
💡 MCUXpresso IDE v10.2 can be installed without removing any previous version (this is pretty standard for any Eclipse). Of course make sure you are installing into a new directory. Actually I have many different version of Eclipse/toolchains installed that way on my machine. But make sure you are NOT sharing/mixing workspaces (see note below).
In the next sections I go through some of the new features and functions I have explored. Given the long list of changes and improvements, I picked the ones which seem to be the most relevant for my work. Other than that, check out this community post with overview of main enhancements.
💡 This new Eclipse IDE comes with an updated Eclipse (Oxygen). As a general rule for Eclipse, never use an older IDE workspace with a newer IDE/Eclipse. What I do is to keep the IDE workspaces separate, e.g. having a folder named wsp_MXUXpresso_v10.1 and wsp_MCUXpresso_v10.2. As for the projects, I never open/use older/existing projects with a newer IDE, and always use a version control system (e.g. git) so I can go back. Only after everything is working fine, I’m moving over projects to the new IDE version. Keep in mind that moving from an older version to a newer version is usually working fine, going back is usually *not* easy (unless you have a version control system in place for this).
For later reference: this is the version I’m using the following version in this article:
The installer is available from https://www.nxp.com/mcuxpresso/ide download section:
Better Quickstart Panel
Starting the new IDE, one thing to see right away is the updated quick start panel:
Items are now grouped/foldable which makes it easier to pick a task in the development process, and it shows the selected project on the top.
The feature to force a probe rediscovery is now visible in the tooltip. That’s useful if changing the connection in an existing project.
This will search for new probes attached to the host:
What is new is the ability to trigger directly actions from the drop down for each probe (LinkServer, P&E and SEGGER):
The button will remember what action I have configured, that way I only need to press that button the next time. And best of all it offers debugging, programming, attaching and erasing in single mouse click. I think that’s the easiest and simplest way I ever have seen.
Importing Projects with Drag&Drop
Something I have really missed from the ‘CodeWarrior time’ which is now available in the MCUXpresso IDE: A convenient way is to drag&drop projects into the Project explorer view:
It will ask me if I want to link to that project or copy that project:
I can drag&drop one or multiple projects and import them that way. It works the same way with zip files too.Or I can drag&drop projects from one IDE/workspace to another one which is a cool way to move/copy projects between workspaces.
As an extra cool feature, I can drag projects from the Eclipse Project Explorer view to my desktop or to a folder on my disk: it will copy that project so I can use it as an ‘export’ feature.
New Projects and Importing Example Projects
As in the previous version, there are wizards to create new projects or import SDK example projects from the set of available SDKs:
For new projects I choose from the set of available drivers and middleware:
What I really like is that I can add/remove components for an existing project:
Project Explorer View with Project Settings
Another thing I noticed in the Project Explorer View: there is a new ‘Project Settings’ node available. This is a very convenient way to get a quick overview about the project details:
Even better, I can use the context menu to change settings that way too:
Faster Build Time
The v10.2 includes a new GNU ARM Embedded toolchain (GCC7, 2017q4-major). For the projects I have tried, the code size with that new version is a bit smaller (few bytes for 10-50 kB projects). Positive, so not really noticeable. But one thing I noticed when I was building one of my larger projects: the new build time seemed to be somewhat faster with the new IDE. So I compared the time needed to build the same project:
MCUXpresso IDE 10.1:
text data bss dec hex filename 515516 324 63656 579496 8d7a8 FRDM-K64F_Demo.axf 16:09:33 Build Finished (took 24s.151ms)
MCUXpresso IDE 10.2:
text data bss dec hex filename 515440 324 63656 579420 8d75c FRDM-K64F_Demo.axf 15:51:12 Build Finished (took 18s.431ms)
Instead of 24 seconds it is now 18 seconds which is ~24% faster. Of course that depends on the files. It seems to me that the Eclipse CDT 9.4.3 has contributed to that too. In any case, a positive thing too :-).
Managed Linker Scripts with Extra Linker Script Input Sections
An interesting new feature is the ability to assign special input sections in the linker settings. Previously I had to do this by hand or add extension points to the linker scripts (see “FreeRTOS Heap with Segmented Kinetis K SRAM“). Now I can do this directly in the linker panel: I can specify the section name or simply the variable and then place it into one of the available sections:
New Terminal View
Another benefit of using the new Eclipse is that finally (again) the Terminal View is working with serial ports. That way I don’t need to use an external terminal program to connect to a target serial port.
GUI Flash Tool extended for P&E and SEGGER
The GUI Flash Tool previously was only for the LinkServer (or LPC-Link2) connections.
Now it supports all debug probe connections, including P&E and SEGGER, and I can program, erase or even resurrect a ‘bricked’ Kinetis device:
Using the toolbar icon is probably the most convenient way to use the GUI Flash Programmer, it is possible to run it from the debugger launch configuration too:
The operation executed is logged in the Console View:
As in the previous version, I can manage my SDKs inside the IDE and jump to the SDK Web page to download packages:
Jump to SDK Documentation
What is new is that I can directly access the documentation provided in the SDK:
In the SDK Details there is a ‘filter’ button so I can filter for all the documentation (pdf, txt, html) content. From that area, I can open the file:
‘Portable’ SDK Projects
Previously, when I wanted to pass a SDK project to someone else (e.g. passing to students), I had to make sure they have that SDK used installed as well. For example the debugger needed that part/device information. Now this is much easier as I can add the needed SDK support files to an existing project so it can be built and debugged without the full SDK installed:
Of course this does not replace the need for having the SDK and all the source files installed if I want to add new drivers/etc. But at least allows someone else to use the project ‘as is’ without the need to have the SDK for it installed.
The added information shows up in the Project Explorer view:
MCUXpresso Configuration Tools
As in 10.1, the IDE comes with the MCUXpresso Configuration tools integrated. They have now an ‘overview’ menu item:
This shows a dashboard of the current configuration tool status (Pins, Clocks and Peripherals):
It gives me an overview and informs me about any dependency problems. I can click on the items and directly open the corresponding tools.
Below the Pins perspective to manage the pins and muxing:
With the Clocks Perspective I can manage all the system clocks and clock settings:
And in the Peripherals View I can manage the peripheral drivers:
Now this is *really* cool: instruction trace was previously only available for the LinkServer/LPCLink2 connection, now all connections including P&E and Segger are supported with instruction trace! 🙂
This probably deserves a more detailed article, but here are the quick steps to get instruction trace: From the Instruction Trace view open the configuration view:
Enable trace and press apply:
In the Instruction Trace view, turn on ‘Record continuously’:
Run the target, stop it, and then load the instruction trace data:
Instruction trace markers are shown in the source view:
For more information, see the IDE Instruction Trace Guide (btw, the documentation has been updated too and is worth a read too):
Now the the SWO interrupt trace graph which previously was a ‘pro’ feature is available to everyone (but only for now available for LinkServer, but not for P&E and Segger yet):
💡 note that to have SWO trace data, the SWO pin needs to be available on the debug connector. This is usually not the case for Freescale FRDM boards, but the TWR boards have it usually available on the larger 20pin debug header. The NXP LPCXpresso boards have the SWO pin available on the debug connector. See “Tutorial: Using Single Wire Output SWO with ARM Cortex-M and Eclipse” for more details.
Same for the SWO Interrupt statistics:
The same for the SWO Profiler which is only available for the LPCLink2/LinkServer connection:
Global Variables Graph with LinkServer Connection
The earlier IDE version already supported ‘live variables’ (variable values updated in a view while the target is running) for P&E and LinkServer/LPC-Link2 connections. With LinkServer/LPC-Link2, there is a new feature to capture the values in a graph. This is very useful to watch one or multiple variables over time:
Faster Redlib with Semihosting
From the release notes I read that there is a new optimized Redlib library with semihosting using message buffers:
The Redlib semihosting should be faster now, plus the ‘mb’ variants are used to transfer data without stopping the target with a breakpoint instruction.
I did not had a chance to try this out, but as I’m using semihosting with file I/O using the GNU coverage (gcov), any performance improve will be more than welcome. So once I have this working, I have to see how much this will speed up writing files on the host PC for dumping coverage files.
Migrating to the new IDE
As a rule of thumb, I don’t change IDE/toolchains for ‘work in progress’. I recommend to use a dedicated workspace for each IDE/Eclipse version and a version control system to keep track of any changes. Over the weekend, I have tested the v10.2 with several 10.0 and 10.1 projects, and they worked all fine. The only thing I did was deleting the existing launch configurations to create new ones. I plan to migrate all my MCUXpresso IDE projects on GitHub to the new version over the next few days.
I have been very happy with the v10.1, but this new MCUXpresso IDE v10.2 tops it by many aspects. I like the new views and features. I have missed that drag&drop project import for a long time, the Quickstart panel and Project Settings node in the project view makes things very accessible and easy to use. I have now extended flash programming and instruction trace features with the P&E and SEGGER connections which were before only available with the LinkServer/LPC-Link2 one. Doing debug/attach/erase/program has never been easier. I have a simple way to place variables or sections in the linker (which is a pain with normal GNU linker scripts). The configuration tools help me to configure the pins, clocks and peripheral drivers. The IDE is using Oxygen, and I can carry forward my legacy projects with the 10.2 version (I have it working with Processor Expert too :-)), which is incredibly useful as some of my projects are maintained and evolving for more than 10 years. And for my NXP Cortex-M projects, the v10.2 version of the MCUXpresso IDE is my choice going forward.
Happy Xpressing 🙂
- MCUXpresso IDE web: https://www.nxp.com/mcuxpresso/ide
- MCUXpresso IDE v10.2.0 changes: https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2018/05/18/mcuxpresso-ide-v1020-now-available?et=watches.email.blog
PS: Oh, look what I have found under ‘additional resources’ 🙂
PS2: if you are still interested in BBQ ribs, post a comment and I see what I can show 🙂