Remote Debugging with DevContainer and VS Code

This is the second part describing how to use DevContainer for embedded applications with VS Code.

In Optimizing Embedded Development with VS Code and DevContainer I use VS Code with a docker ‘development’ container. The container is created with a recipe to install the development tools and SDK. With VS Code and DevContainer I have the same developer experience as I would develop locally on the host.

One thing not addressed in that earlier article is debugging. Using USB debug probes like a SEGGER J-Link or NXP MCU-Link is a challenge inside a container. This applies to any other debug probe as well.

The solution is to transform an USB based debug probe into one with a network connection:

VS Code DevContainer with Hardware Debugging
VS Code DevContainer with Hardware Debugging

In this article, I show how to do this.

Continue reading

Standalone Semihosting Host-Target Console with CI/CD Runner and CMSIS-DAP

NXP has released a new LinkServer software. It includes an interesting feature. The LinkServer test runner has been extended with a Semihosting console. This is not only very useful for on-target testing. With the Semihosting console, I have a bidirectional communication channel with the target. And I do not need any hardware pins or to run a debug session. All what I need is the CMSIS-DAP connection with the NXP LinkServer runner to have a command line shell:

Target Console with Semihosting
Target Console with Semihosting
Continue reading

Processor Expert Components: 24-Dec-2024 Release

The year 2024 is coming to its end, time for a Year-End-Processor-Expert-Component-Release.

Processor Expert Components in Eclipse (KDS)

Also, this is now the 10th anniversary of the releases on Sourceforge, starting with https://mcuoneclipse.com/2014/10/21/mcuoneclipse-releases-on-sourceforge/ back in 2014.

Continue reading

On-Target Testing with LinkServer Runner and VS Code

The release 24.9.75 of LinkServer software and tools includes interesting feature: the ability to use the debug probe for automated on-target testing. It includes a ‘runner’ which can program, launch and run the application on the target through a debug probe. While the target is running, it uses semihosting or UART for communication. This makes it a perfect tool for automated testing, especially in a CI/CD environment. One such environment is running automated tests with CMake and CTest in VS Code.

Automated on-target testing with VS Code and LinkServer
Continue reading

NXP LinkServer 24.9.75: New GUI for Flash Programming

NXP has released a new version of the LinkServer software. This is a utility for debugging and using scripting for a wide range of devices and debugging probes. It includes support for the MCU-Link, LPC-Link2, on-board and CMSIS-DAP based debug probes with the ‘LinkFlash’:

Programming with LinkFlash

With the new release, it includes a graphical user interface (GUI) for flash programming. It also includes erasing, verifying, recovery, and saving the memory to a file.

Continue reading

Automated On-Target Testing with J-Run’s –args Feature

SEGGER has released a new version of their J-Link tools suite. That suite includes the J-Run utility which loads, executes and monitors the output of the target. Output can be with RTT (Real-Time Transfer) or semihosting. This makes it useful for automated tests with CMake and CTest:

CTest with J-Run

What has been added from the V7.98g release is the ability to send arguments to the running application using the --args command, for example with CMake/CTest:

set (RUNNER_CTEST_COMMAND "$ENV{SEGGER_PATH}/JRun" --verbose --device LPC55S16 --silent --rtt -if SWD)

add_test(
NAME Led_1
COMMAND ${RUNNER_CTEST_COMMAND} --args "Led_1" ${TEST_EXECUTABLE}
)

Like applications running on the host, I can now pass arguments to the running application. This is useful to set up the target, or to tell which kind of tests to run.

Continue reading

MCUXpresso IDE v11.10: Easy MCU-Link Firmware Update with Eclipse

A new eclipse-based NXP MCUXpresso IDE v11.10 is available With this new release, it includes an even easier firmware update mechanism for the MCU-Link (LinkServer) debug probes.

MCU-Link based debug probes with a FRDM-K22F board
Continue reading

Low-Power Optimization Techniques for ARM Cortex-M Microcontrollers

Europe is currently facing an ‘Energy Crisis,’ and ‘Sustainability’ is a popular topic among companies. However, embedded engineers go beyond talking—they take action and make tangible changes in the world. With the increasing use of electronic devices, minimizing their energy and power consumption is crucial. Optimizing systems for deep low power or deep low energy is a challenging task. Nonetheless, as I will demonstrate in this article, it is possible to reduce energy consumption by a factor of 100 or more. This article provides a brief overview of the foundational concepts and then applies them step-by-step to an ARM Cortex microcontroller.

Measuring on-board LPC804 with MCU-Link Pro
Continue reading

MCU-Link-MR v0.2 Drone and Robot Debug Probe with UART-2-USB Bridge

This week I have received the new PCBs for the MCU-Link MR for drones and robots and have populated the parts on the PCB, and it works fine as UART bridge and debug probe for the PixHawk i.MX RT:

Continue reading

Updating MCU-Link CMSIS-DAP Debug Probe Firmware, Jumper-less

The MCU-Link debug probes are versatile and very useful debug probes from NXP. This article describes how to update the firmware on it, both the ‘traditional’ way with using the ISP jumper, and the new way using a command line script without the need to use a jumper.

MCU-Link Pro Debug Probe ISP Jumper
Continue reading