NXP MCU-Link for Rust with probe-rs

The Rust programming language is making its way into the embedded world, and getting more and more popular and not only at the Lucerne University. With Rust, the probe-rs is one of the popular debug choices, as it nicely comes with cargo. On the hardware side, the NXP MCU-Link is $15 debug probe hardware I use for many targets. Why not using the MCU-Link with probe-rs and Rust?

MCU-Link Board Top Side
MCU-Link Board Top Side
Continue reading

Binary, do you use Hard-Float or Soft-Float?

Many cost-sensitive ARM Cortex-M devices like the M0+ do not have a hardware floating point unit, and some like the M4 only has an optional single-precision floating point unit (FPU). As outlined in “Be aware: Floating Point Operations on ARM Cortex-M4F“, using floating point operations without a hardware unit can be costly.

Looking at the disassembly for sure will tell you if the hardware is handling the float or double operation or not:

Disassembly showing runtime routines

But who wants check the all the disassembly? With the GNU tools there is an easier way: readelf.

Continue reading

Processor Expert Components: 24-Dec-2023 Release

The new year 2024 is coming, so time to close the current year with a new release: I’m pleased to announce a new release of the Processor Expert components, available on SourceForge and GitHub.

Processor Expert Components in Eclipse (KDS)

Continue reading

GNU Coverage (gcov) for an Embedded Target with VS Code

An important part of every CI/CD pipeline is having a testing phase. In this article I show how to use GNU gcov (coverage) with an embedded target, using Visual Studio Code as front end:

GNU gcov with VS Code

With this, I can run the code on the embedded target which stores the coverage data on the host.

Continue reading

Semihosting with VS Code on RP2040

With semihosting I can use standard I/O function like printf() and I can read and write data on the host through the debug connection. If used with care, this is a great feature especially for unit testing.

Raspberry Pi Pico-W (RP2040) board
Continue reading

Using Legacy Devices with LinkServer

The Freescale K20DX128 MCU was one of the first ARM Cortex-M devices of that company (now NXP) back in 2012, and the FRDM-K20D50M board was the first ‘FRDM‘ board of a long and successful series of boards, starting back in 2013. I still have the K20 present in many of my designs. The challenge with ‘early’ or ‘legacy’ devices is that after a while, they are ‘not recommended’ any more, and it is hard to get support for them. So for example in newer tooling and software from NXP, there is no support for the K20.

MCU-Link (NXP, left) debugging FRDM-K20 (Freescale, right) board

So if you still have the K20 around, and need some newer tooling, then I have good news for you: It is possible to add that good-old-Kinetis to the list of supported LinkServer devices, so you are not stuck and can use newer debugging solutions for the K20.

Continue reading

LittleFS File System with MCU Internal FLASH Memory

In many of my embedded projects I need persistent data or storage for settings. If using an SD card, then FatFS is usually my choice for the file system. But if using an external FLASH memory device, then my preferred choice is usually LittleFS: it is a little fail-safe filesystem, designed for micro-controllers, which I’m using with external flash memory devices.

In the case where there is enough MCU flash, or if there is no external FLASH device available in a design, it can use the MCU internal FLASH as storage storage too. This is the topic of this article:

LittleFS File System Data
Continue reading

LinkServer for Microcontrollers

GDB is the de-facto debugging engine and debug connection for micro-controllers these days: it is versatile and with its client-server architecture very flexible and powerful, and pretty much every debug probe and vendor (PEMICRO, SEGGER, OpenOCD, pyOCD, …) offers it. But a GDB server or command line implementation was not available for the NXP LinkServer family of debug probes (LPC-Link, MCU-Link, MCU-Link Pro). This has changed now: LinkServer is available as command line tool and can be used as GDB Server:

LinkServer as GDB Server with Eclipse

With the new LinkServer package I do not only get a gdb server implementation: I have now a command line tool I can use for automation and all kind of different things: programming boards, erasing flash, and so on.

Continue reading

Booting J-Link as CMSIS-DAP Debug Probe

Mostly unnoticed (at least for myself), SEGGER has enabled some of the J-Link debug probes to support the CMSIS-DAP debug protocol.

SEGGER J-Link as CMSIS-DAP Debug Probe

This greatly enhances the use of J-Link debug probes for CMSIS-DAP based tools.

Continue reading

Open Source picoLink: Raspberry Pi RP2040 CMSIS-DAP Debug Probe

One essential part of embedded development is the ability to debug the target application. The good thing with the Raspberry Pi Pico RP2040 Eco-system is: One can use another RP2040 Pico board as a debug probe to debug other ARM Cortex-M devices.

But instead using a Raspberry Pi Pico board with some wires, why not building a dedicated board? The result is a small, versatile and open source debugging probe which virtually can debug any ARM Cortex-M device as a standard ARM CMSIS-DAP probe:

picoLink Debug Probe debugging a Raspberry Pi Pico Board
Continue reading