SWO with ARM Cortex-M33

One major concern of embedded system development is performance. Microcontroller have more MHz than in the past, but embedded applications are all about timing and real-time aspects.

The challenge is: how to get data off the target in realtime? SWO can help with this….

Continue reading

Recovering Cortex-M Microcontroller with a Power Glitch

If a Cortex microcontroller is unresponsive to a debug connection for various reasons, then this trick might help to recover that device for you. All you need is a debug probe from PEMICRO and a utility.

Continue reading

OpenOCD with MCU-Link

The NXP MCU-Link is a powerful $10 debug probe for ARM Cortex-M devices and works with the NXP LinkServer for debugging. The LinkServer does not an implement a gdb server, so it limits its usage e.g. for scripting or command line debugging. But as MCU-Link is also a CMSIS-DAP compatible debug probe, I can use it with OpenOCD which is open source and implements a GDB server. This article shows how I can use it with the MCU-Link.

Debugging FRDM-KL25Z with MCU-Link

Debugging FRDM-KL25Z with MCU-Link

Continue reading

Debugging Bootloader and Application with one Debug Session

If having a boot loader running on a micro-controller, it is very useful if both the boot loader and the loaded application can be debugged together:

Bootloader with Application Code

Bootloader with Application Code

Continue reading

Optimized and Easy-to-Use Eclipse Toolbars and Menus

I love Eclipse because as an IDE it can do pretty much everything. Up to the point that some call it an ‘Eierlegende Wollmilchsau‘: something which can do anything. But with all the tools, menus and features, it can be daunting for a someone new to Eclipse. But the good news is: Eclipse is very versatile and can be customized to make it easier and simpler to use too. In this article I show how I’m tweaking it the way I want it, with just the menus and buttons I need:

Eclipse Optimized Menus and Toolbars

Eclipse Optimized Menus and Toolbars

Continue reading

Tutorial: How to Optimize Code and RAM Size

It is great if vendors provide a starting point for my own projects. A working ‘blinky’ is always a great starter. Convenience always has a price, and with a ‘blinky’ it is that the code size for just ‘toggling a GPIO pin’ is exaggerated. For a device with a tiny amount of RAM and FLASH this can be concerning: will my application ever fit to that device if a ‘blinky’ takes that much? Don’t worry: a blinky (or any other project) can be easily trimmed down.

Binky on NXP LPC845-BRK Board

Binky on NXP LPC845-BRK Board

I use a ‘blinky’ project here just as an example: the trimming tips can apply to any other kind of projects too.

Continue reading

Using a Custom Debug Perspective in Eclipse

The MCUXpresso IDE comes with a ‘Develop’ perspective which combines the usual C/C++ and the Debug perspective in one:

MCUXpresso Develop Perspective

MCUXpresso Develop Perspective

Continue reading

Modifying the Teensy 3.5 and 3.6 for ARM SWD Debugging

Looking for a small, inexpensive ($25-30) ARM development board (say 120-180 MHz ARM Cortex-M4 with FPU, 512kB-1MB of FLASH and 256 KByte of RAM? Then have a look at the Teensy 3.5 and Teensy 3.6 by PJRC/Paul Stoffregen:

Teensy 3.6 with NXP K64

Teensy 3.5 with NXP K64F ARM Cortex-M4F

The only problem? it is not possible to debug it :-(. At least not in the traditional sense. This article is about how to change the board to use it with any normal SWD debugging tool e.g. Eclipse and the Segger J-Link :-).

Continue reading

What is “Realtime Debugging”?

Questions from students or readers of my articles are a great source for all kind of articles. And here is the ‘question of this week’: “What is realtime debugging”?

It’s a good question because the topic of ‘realtime’ and ‘debugging’ was a topic in the lectures this week. So this question gives me the opportunity to combine the two things of ‘realtime’ and ‘debugging’, I love it :-).

Debugging Setup

Debugging Setup

Continue reading