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.
Continue readingCategory Archives: MCU-Link
Versatile OSHW Mini MCU-Link Debug Probe: External, On-Board, or Embedded
Who needs a debug probe, if you have printf()? If doing serious development, you most likely want a hardware debug probe. We at the HSLU IET use different hardware, boards and kits, and for many of the classroom equipment it is very useful to have the debug probe embedded on the target board: less cables, easier to use. For this we have developed a new Open Source Hardware (OSHW) debug probe in KiCad which can used in different ways: as external debug probe, integrated and soldered on top of the target board, or fully integrated and embedded into a custom design.
Continue readingPower Measurement with INA260 Sensor
For a research project and demonstrator at HSLU university I have to measure voltage a DC voltage and current. For this I’m planning to use the Texas Instrument Texas Instruments INA260, so I had to quickly develop a software driver for it.
Continue readingMCU-Link with Cortex-Debug and LinkServer
The MCU-Link is a small and inexpensive $10 CMSIS-DAP debug probe from NXP. It can work with OpenOCD, but has better target support using the NXP LinkServer which implements a gdb server. This makes it an ideal combination for scripting or automated testing.
Continue readingAssigning Nicknames to Debug Probes
Dealing with and debugging distributed systems, I end up with multiple debug probes and target boards on my desk. When starting a debugging session, it can be hard to identify a debug probe by its serial number. What I do in such a situation: put a color stick on the debug probe and have it assigned a nickname.
That nickname then shows up during the debug connection, and I’m sure I connect to the right probe and board that way.
Continue readingConsolidating with VS Code
It is August 1st, and Switzerland is celebrating its National Holiday. Rather cold and rainy, so this gets me some time to catch up on things. The preparation for the coming university semester in September is in full swing, and I have the honor to take over building up a new Master of Science in Engineering education module. In the existing courses I teach on the topic of embedded systems, I do use devices and MCUs from vendors like Broadcom, NXP, STM, Nordic, Raspberry Pi and Espressif. This not only means different SDKs, but different IDEs with different debug probes.
Eclipse has been the common factor in the mix with all these, and with all the pros and cons, it worked very well. With NXP having released support for Visual Studio Code, adding an announcement, and other vendors going into the same direction, I took the decision that I want to migrate my lab and lecture infrastructure to VS Code.
Continue readingUsing 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.
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 readingData Converter for MCUXpresso Energy Measurement Data
The combination of the NXP MCUXpresso IDE with the NXP MCU-Link Pro debug probe implements a nifty power and energy measurement tool (see New “MCU-Link Pro”: Debug Probe with Energy Measurement). The eclipse based IDE provides a dedicated view to inspect the data collected. It can export and import data, but it is in a binary format. In this article I present a way to export and then convert the data into .csv
or any other format for processing or visualizing it in different ways.
Using an open source command line tool, the binary data gets converted into a csv
format, which then can be consumed by many tools, e.g. gnuplot.
Catchpoints: Unlimited Number of FLASH Breakpoints with GDB
Embedded hardware comes with limitations, and one if it is the given number of hardware breakpoints. Depending on your MCU, 4 or only 2 hardware breakpoints are available, making debugging and stepping in read-only memory (FLASH) a challenge.
Did you know that one can have ‘unlimited’ number of breakpoints in FLASH, with the help of GDB? This is very useful for extended debugging, or if you want to use breakpoints for testing?
Continue readingLinkServer 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:
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