In “Cycle Counting on ARM Cortex-M with DWT” I have used the ARM DWT register to count the executed cycles. With the MCUXpresso IDE comes with a very useful feature: it can capture the ARM SWO (Single Wire Output) trace data. One special kind of trace data is the ‘cycle counter’ information which is sent through SWO.
During Embedded World 2017 in Nürnberg I was lucky to get a handful LPC800-DIP boards. To get all students who were lucky to get one, here is a tutorial to make that very exciting ‘blinky’ application on that board:
Eclipse for C/C++ (CDT) offers two different ways to get out of a debug session: Terminate and Disconnect:
Terminate and Disconnect
The terminate and disconnect behaviour is not standardized, and varies between Eclipse distributions and debug connection. This article is about how things are handled in MCUXpresso IDE, and how I can influence the behaviour.
I’m using Eclipse based IDE’s to develop and debug my embedded applications. This works great, as Eclipse has all the necessary tools to edit, build and debug it. But when it comes just to download/flash a binary to the board, then things are pretty much specific to the tools used. With the advent of the new MCUXpresso IDE, here is how that Eclipse IDE can be used for this.
The MCUXpresso IDE (see “MCUXpresso IDE: Unified Eclipse IDE for NXPs ARM Cortex-M Microcontrollers“) has one great feature: it includes debug support for the popular LPC-Link2 debug probes. That way I have yet another powerful debug probe with extra features for ARM based boards. That LPC-Link2 circuit is present on many LPCXpresso boards from NXP. So why not using it to debug it my custom hardware?
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.
For me, the available software and tools are the primary key decision factor why I select a particular silicon vendor. Without good software and tools, a microcontroller only ‘sand in plastic case’, even if it is the best microcontroller in the world. I do have several probably excellent microcontroller boards, and they are only getting touched by more durst over the months and years.
The ‘traditional’ approach to install Eclipse plugins is using the menu Help > Install New Software. Using that approach, I have to use or enter an Eclipse update site. An easier way is to use the Eclipse Marketplace plugin which allows me to search and browse for plugins and simplifies installation of it. But as this one does not come installed by default with MCUXpresso. But it is my preferred way to browse and install plugins into Eclipse:
Eclipse Marketplace under Eclipse Neon and MCUXpresso IDE
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.
With debugging FreeRTOS applications in Eclipse, it is a big to have views available showing all the threads, queues, timers and heap memory allocation. One of the best Eclipse plugins are the one NXP provides for FreeRTOS: they are free of charge and give me pretty much everything I need. However, if you are not that familiar with FreeRTOS itself, here are a few tips to get more out of the plugins.
Some ARM Cortex-M have a DWT (Data Watchpoint and Trace) unit implemented, and it has a nice feature in that unit which counts the execution cycles. The DWT is usually implemented on most Cortex-M3, M4 and M7 devices, including e.g. the NXP Kinetis or LPC devices.
As a standard procedure, I add some console functionality to my embedded applications. That way I have a command line interface and can inspect and influence the target system. One interesting hardware feature of ARM Cortex-M is Single Wire Output (SWO): it allows to send out data (e.g. strings) over up to 32 different stimulus ports, over a single wire.
This is the third part about ARM Cortex-M and how the interrupts are used. In Part 1 I discussed the Cortex-M interrupt system and in Part 2 I showed nested interrupt examples. This part is about FreeRTOS and how it uses the Cortex-M interrupt system.
In “ARM Cortex-M, Interrupts and FreeRTOS: Part 1” I started with the ARM Cortex-M interrupt system. Because the ARM implementation cann be very confusing, I confused myself and had to fix and extend the description in Part 1 :-). Thank for all the feedback and comments!
Originally I wanted to cover FreeRTOS in Part 2. Based on the questions and discussions in Part 1 I thought it might be a good idea to provide visual examples.