Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Overview of MCUXpresso IDE v10.2.0

DZone's Guide to

Overview of MCUXpresso IDE v10.2.0

The latest version of MCUXpresso has a variety of new features. Let's explore them and see why it should be in contention as your IDE of choice for embedded projects.

· IoT Zone ·
Free Resource

Decisions, decisions! Such long weekends like Pentecost are a real challenge for a family with engineers:

  1. Should we join that record long traffic jam to Italy and be stuck for more than 4 hours and analyze it?
  2. Or: should we stay home, turn the BBQ smoker engine on, 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 chose 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 that, 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 extended weekend in Europe, NXP released the new v10.2.0, so here is where that technology exploration piece comes into play. Checking the release notes, this version number change includes so much cool stuff that I decided to have a look and to check it out. Of course, while always having an electronic eye on the baby back ribs!

MCUXpresso IDE v10.2.0

MCUXpresso IDE v10.2.0

Outline

The MCUXpresso IDE targets the NXP LPC, Kinetis, and i.MX RT Cortex-M microcontrollers 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 IDEs Freescale/NXP 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 of 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 versions of Eclipse/toolchains installed that way on my machine. But make sure you are NOT sharing/mixing workspaces (see my 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 that seem to be the most relevant for my work. Other than that, check out this community post with an 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 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).

Download

For later reference: This is the version I’m using the following version in this article:

MCUXpresso IDE V10.2.0 Build

MCUXpresso IDE V10.2.0 Build

The installer is available from the https://www.nxp.com/mcuxpresso/ide download section:

Product Downloads

Product Downloads

Better Quickstart Panel

Starting the new IDE, one thing to see right away is the updated quick start panel:

Quickstart Panel

Quickstart 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.

Force Probe Re-Discovery

Force Probe Re-Discovery

This will search for new probes attached to the host:

Automatic Probe Discovery

Automatic Probe Discovery

What is new is the ability to directly tigger actions from the drop-down for each probe (LinkServer, P&E, and SEGGER):

Debug Action

Debug Action

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 a single mouse click. I think that’s the easiest and simplest way I ever have seen.

Importing Projects With Drag and Drop

Something I have really missed from the ‘CodeWarrior time’ that is now available in the MCUXpresso IDE: A convenient way is to drag and drop projects into the Project Explorer view:

drag_and_drop

Drag and Drop

It will ask me if I want to link to that project or copy that project:

Project Import Dialog

Project Import Dialog

I can drag and drop one or multiple projects and import them that way. It works the same way with ZIP files too. Or I can drag and 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:

SDK Import Wizard

SDK Import Wizard

For new projects, I choose from the set of available drivers and middleware:

Configure the Project

Configure the Project

What I really like is that I can add/remove components for an existing project:

Manage SDK Components

Manage SDK Components

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:

Project Settings Node

Project Settings Node

Even better, I can use the context menu to change settings that way too:

Context Menu on Project Settinigs

Context Menu on Project Settings

Faster Build Time

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 (a 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:

Placing variables into memory sections

Placing variables into memory 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.

Terminal View

Terminal View

GUI Flash Tool Extended for P&E and SEGGER

The GUI Flash Tool previously was only for LinkServer (or LPC-Link2) connections.

GUI Flash Tool

GUI Flash Tool

Now it supports all debug probe connections, including P&E and SEGGER, and I can program, erase, or even resurrect a ‘bricked’ Kinetis device:

LinkServer GUI Flash Tool

LinkServer GUI Flash Tool

PEMicro GUI Flash Tool

PEMicro GUI Flash Tool

Segger GUI Flash Tool

Segger GUI Flash Tool

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:

Running GUI Flash Programmer from Launch Configuration

Running GUI Flash Programmer from Launch Configuration

The operation executed is logged in the Console View:

GUI Flash Tool Console Output

GUI Flash Tool Console Output

MCUXpresso SDKs

As in the previous version, I can manage my SDKs inside the IDE and jump to the SDK Web page to download packages:

MCUXpresso SDK Builder

MCUXpresso SDK Builder

Jump to SDK Documentation

What is new is that I can directly access the documentation provided in the SDK:

SDK Documentation

SDK Documentation

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:

SDK Documentation

SDK Documentation

‘Portable’ SDK Projects

Previously, when I wanted to pass an 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:

Add SDK Part Support

Add SDK Part Support

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 it 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:

SDK Part Support Added

SDK Part Support Added

MCUXpresso Configuration Tools

As in 10.1, the IDE comes with the MCUXpresso Configuration tools integrated. They have now an ‘overview’ menu item:

Config Tools Overview

Config Tools Overview

This shows a dashboard of the current configuration tool status (Pins, Clocks, and Peripherals):

Config Tools Overview Dashboard

Config Tools Overview Dashboard

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 is the Pins perspective to manage the pins and muxing:

Pins View

Pins View

With the Clocks perspective, I can manage all the system clocks and clock settings:

Clocks View

And in the Peripherals view, I can manage the peripheral drivers:

Peripherals View

Peripherals View

Instruction Trace

Now this is really cool: Instruction tracing 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 an instruction trace: From the Instruction Trace view, open the configuration view:

Instruction Trace View

Instruction Trace View

Enable trace and press apply:

enabling instruction trace

Enabling instruction trace

In the Instruction Trace view, turn on ‘Record continuously’:

Record Continously

Record Continuously

Run the target, stop it, and then load the instruction trace data:

Get Instruction Trace Data

Get Instruction Trace Data

Instruction trace markers are shown in the source view:

Instruction Trace Markers in Source View

Instruction Trace Markers in Source View

For more information, see the IDE Instruction Trace Guide (by the way, the documentation has been updated too and is worth a read):

Instruction Trace Guide

Instruction Trace Guide

SWO Features

Now 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:

SWO Interrupt Status

SWO Interrupt Status

The same for the SWO Profiler which is only available for the LPCLink2/LinkServer connection:

SWO Profile

SWO Profile

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:

Plot Variables over Time

Plot 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:

Redlib Semihost with message buffers

Redlib Semihosting libraries

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 have a chance to try this out, but as I’m using semihosting with file I/O using the GNU coverage (gcov), and any performance improvement will be more than welcome. So once I have this working, I'll 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 using 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 delete 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.

Summary

I have been very happy with the v10.1, but this new MCUXpresso IDE v10.2 tops it. I like the new views and features. I have missed that drag and drop project import for a long time, and 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 option.

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 have been maintained and 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!

LINKS

PS: Oh, look what I have found under ‘additional resources’

Additional Resources

Additional Resources

PS2: if you are still interested in BBQ ribs, post a comment and I see what I can show

Topics:
iot ,embedded development ,mcuxpresso ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}