Using the FRDM-KL25Z with CMSIS-DAP to program non-Freescale ARM Microcontrollers

Freescale might not have thought about this: how to use Freescale boards and silicon to develop for non-Freescale silicon? 😉

I tinkered around using the FRDM (e.g. FRDM-KL25Z) board as a general purpose programming or debugging device. See the links to the posts at the end of this article. I have used it to program and debug other Freescale ARM processors. It requires board changes and the usage of a different OpenSDA firmware which has its own limitations (no USB CDC serial bridge). But for about $15-20 I have a device to program my own external boards :-).

If you are using Keil tools, then the good news is: With CMSIS-DAP you can debug any other (even non-Freescale) ARM device as long it is supported by the IDE :mgreen:

FRDM-KL25Z debugging the nRF51422-DK (Source: Keith Wakeham)

FRDM-KL25Z debugging the nRF51422-DK (Source: Keith Wakeham)

Keith Wakeham is showing this with his article “Cheap Arm Programmer“. He uses the FRDM-KL25Z to debug and program a board with a Nordic Semiconductor nRF51422 on it. The nRF51422 is an ARM Cortex M0 with a built-in 2.4 GHz ANT receiver.

Keith has two kits: the nRF51422-EK has a built-in Segger J-Link-lite for debugging. But for the nRF51422-DK Keith would have to buy an extra J-Link (or any other SWD debugging device). Keith has found a way how to modify and use the FRDM-KL25Z to be used with the Keil tool chain to debug his board :-). He is using CMSIS-DAP for this. All the details in Keith’s article: “Cheap Arm Programmer“.

Keith is using Keil, but in my view the same thing would work with IAR too (I used IAR with CSMIS-DAP as well).

❗ The licensing terms of Segger J-Link Lite OpenSDA firmware explicitly forbid to use it outside of evaluation and for processors other than the resident one on the board. I have not seen anything which would (legally) prevent someone to use the FRDM board or OpenSDA to debug a non-resident processor. The original P&E firmware only allows to debug the resident processor (they seem to check the UID of the on board processor). But apart of that, the FRDM board can be used as general purpose programming and debugging pod after hardware and firmware modifications. Disclaimer: I’m NOT giving any legal advice here! 😉

Happy CMSIS-DAPing 🙂


  1. Using the Freedom Board as SWD Programmer
  2. Debug External Processors with USBDM and Freedom Board
  3. CMSIS-DAP with IAR and the KL25Z Freedom Board
  4. Freedom Board with Segger OpenSDA Debug Firmware

6 thoughts on “Using the FRDM-KL25Z with CMSIS-DAP to program non-Freescale ARM Microcontrollers

  1. That means K20 based Debugger will be available soon in the market, which switchable firmware for Keil/ARM CMSIS-DAP, Segger J-Link, PEmicro debugger as well gdbserver, and mBed firmware.

    Nice !


  2. Pingback: Kinetis Unique Identification Register | MCU on Eclipse

  3. I successfully program NXP LPC812 in Keil with FRDM-KL25Z and CMSIS-DAP firmware. However Keil reports DLL error when I tried to enter debug mode.

    Being a SWD debugger is good for KL, but not good enough for ISP enabled micro, since they can be programmed with USART anyway.


      • The error in Keil uVision (often indicates RDDI Error first) is because CMSIS-DAP will not work with JTAG but only SWD (Serial Wire Debug). SWD is a two pin alternative to JTAG – and works about the same.
        In uVision,
        1) Select Target Options (Project/Target Options) or (Alt-F7)
        2) Select the DEBUG tab.
        3) Select CMSIS-DAP, Make your connections to the board now.
        4) Select SWJ and in Port: select SW.
        CMSIS-DAP probe should be visible in the CMSIS-DAP JTAG/SW box.
        The Cortex Core should be visible in SW box now.
        5) Click OK twice and you are ready to enter Debug mode.



  4. Pingback: OpenOCD/CMSIS-DAP Debugging with Eclipse and without an IDE | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.