In “Unboxing the Freescale FRDM-KL43Z Board” I was using the FRDM-KL43Z board the first time. The FRDM-KL43Z board has an on-board debug interface (Kinetis K20, OpenSDA). In this post I show how to use the FRDM-KL43Z board to debug another ARM board.
In this post I show how to use a normal Freescale Freedom (FRDM) board into a SWD (Single Wire Debug) debugging probe to potentially debug any other ARM Cortex core supporting SWD. I’m using here the FRDM-KL43Z board, but the other Freescale Freedom boards are very similar.
There are two things involved to use the board as a debugging probe:
- J18: This is a header to separate the trace between the OpenSDA/K20.
- J11: This is a 2×5 SWD header for standard ARM 10pin
Both J11 and J18 are *not* populated on the board.
I need to have the following available parts:
- 1×2 Jumper and Header for J18 (you probably have a few on your desk?)
- 2×5 SWD Header for J11 (SAMTEC – FTS-105-01-L-D, e.g. 1667728)
- Standard ARM SWD/JTAG cable (e.g. 1667659), or borrow it from a P&E Multilink or Segger J-Link
Beside of that: a sharp knife and a soldering iron (small soldering tip) with solder wire 🙂
Use a sharp knife to cut the trace on the backside of J18:
Solder the 1×2 header on J18:
Solder the 2×5 SWD/JTAG header on J11:
To debug another board, install the 10pin flat cable (Pin 1 of J11 matching the red cable) and have the jumper on J18 removed ( J18 is open):
Connect the other side of the cable to the target board:
OpenSDA Debug Firmware
With the default (P&E) firmware on the FRDM-KL43Z it is *not* possible to debug another processor, except the device on the FRDM board itself.
Instructions how to update the firmware are explained here: “Illustrated Step-by-Step Instructions: Updating the Freescale Freedom Board Firmware”
There are the following other debug firmware files available for OpenSDA (with links to articles and firmware files):
- Segger J-Link, see “Freedom Board with Segger OpenSDA Debug Firmware“
- CMSIS-DAP with OpenOCD: see “CMSIS-DAP with IAR and the KL25Z Freedom Board“
- USBDM: see “Debug External Processors with USBDM and Freedom Board“
So I can use it to debug another FRDM Board:
Updating the OpenSDA Firmware
💡 In case you want to use the board with Windows 8, 10 or Mac, you need to have first a Windows 7 machine to update the bootloader. See “Illustrated Step-by-Step Instructions: Updating the Freescale Freedom Board Firmware“.
To update the OpenSDA firmware of the FRDM board:
- Power the board through the USB port labeled ‘SDA’, while having the Reset (RST) button pressed.
- Green LED near K20/USB port blinks with about 2 Hz
- The board enumerates as ‘BOOTLOADER’ device (MSD, disk drive) on the host.
- Copy the firmware file to the BOOTLOADER device.
- Repower the board normally.
💡 If the ‘copy’ operation fails or does not work: use the command prompt, additionally make sure you don’t have an issue with firewalls or virus scanners.
With that, the FRDM board is like a normal debug probe and can be used as such.
It requires some soldering skills, a little extra hardware and a firmware file to turn a FRDM board into a normal debugging probe. I still recommend to use normal SWD/JTAG debug probes e.g. from Segger or P&E, as they were able to recover and work with all of my boards (especially unsecuring devices), while the FRDM board solution works, it is not that powerful. But as a quick and cheap solution it works fine.
Happy Debugging 🙂