3 years, 12 months ago.

Bootloader/debug files required for FRDM-KL25Z variant

Hello everyone,

We have designed a board similar to the FRDM-KL25Z with the following Freescale microcontrollers


and are trying to make it mbed compatible but also able to develop target applications using Freescale Kinetis Design Studio (according to

The bootloader and debug files we use are stored in

This setup although appears with an mbed serial port and an mbed filesystem under windows, cannot connect with Freescale Kinetis Design Studio for application development/debug.

Anybody could send me the correct files to program the bootloader properly?

Thank you all in advance, Kind regards, Demos

Question relating to:

The FRDM-KL25Z is an ultra-low-cost development platform for Kinetis L Series KL1x (KL14/15) and KL2x (KL24/25) MCUs built on ARM® Cortex™-M0+ processor. Features include easy access to MCU I/O, battery-ready, ...

OpenOCD produces the following

C:\Freescale\KDS_3.0.0\openocd\bin>openocd -f kinetis.cfg Open On-Chip Debugger 0.8.0-dev (2015-01-09-16:22) Licensed under GNU GPL v2 For bug reports, read Info : only one transport option; autoselect 'cmsis-dap' Info : CMSIS-DAP: SWD Supported Info : CMSIS-DAP: Interface Initialised (SWD) Info : add flash_bank kinetis kinetis.flash cortex_m reset_config sysresetreq adapter speed: 1000 kHz Info : CMSIS-DAP: FW Version = 1.0 Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1 Info : DAP_SWJ Sequence (reset: 50+ '1' followed by 0) in procedure 'init'


posted by Demos DOUMENIS 24 Jul 2015
Comment on this question

2 Answers

3 years, 12 months ago.

If the hardware configuration is same (or quite close) with FRDM-KL25Z, how about trying OpenSDA Firmware (MSD & Debug) from P&E Micro?

Download Firmware and after unzip it and try MSD-DEBUG-FRDM-KL25Z_Pemicro_v114.sda

This one works for both mbed and KDS for me with FRDM-KL25Z. (USB serial driver can be downloaded from same page)

Hello and thanks for your answer.

The FRDM-KL25Z has an OpenSDAv1 bootloader which is proprietary to PEMicro and "burnt" into the PK20 chips that are soldered to these boards (and can decode .sda files). Generic MK20 chips that one can buy from Freescale do not have this functionality and hence OpenSDAv2 (which is open-source) was developed. Hence alternative bootloaders in the form of Keil uvision .axf files are needed for this and are programmed via a JTAG cable (the equivalent of J8 header on the FRDM-KL25Z). Any such files (bootloader/axf + debug/bin files would be great to have as the ones I mentioned above cannot connect to my Freescale KDS debugger via CMSIS-DAP.

posted by Demos DOUMENIS 24 Jul 2015

Oh, I see your point!

In the freescale kinetis community site I could find following page, it seems there are ones for FRDM-K64F and FRDM-K22F but I wonder if one for FRDM-KL25Z could be found.

posted by Motoo Tanaka 24 Jul 2015
3 years, 12 months ago.

Check out the description here on how to bring up the MK20 as a debugger- not sure the instructions are clear, but here it is

Thanks for the comprehensive response. I have looked at the documents you mentioned and I have bootloader+debug files (see box directory link above) that can "see" both the host and the target chips on Keil uvision under the CMSIS-DAP debugger, so the files and the card must be OK. My board can enter "bootloader" mode with the reset button presses, otherwise it appears as "mbed" with an mbed serial port present. I could think of the following "problem" which explains why the files work on genuine Freescale boards but have issues with user developped ones?

See below:

Same applies to KEIL that recognizes target but refuses to program or enter debug mode . We suspect some sort of special permission as we checked file board.c( It seem to ask a BOARD_ID and BOARD_SECRET for our custom hardware as the code produces an error message /* Each board should have a unique ID and secret. For information

  • about obtaining a secret contact
  • /
  1. include "board.h" /* Each board should have a unique ID and secret. For information
  • about obtaining a secret contact
  • /
  1. if defined (BOARD_FRDM_KL25Z) || defined (BOARD_TWR_KL25Z48M)
  2. define BOARD_ID "0200"
  3. define BOARD_SECRET "xxxxxxxx"
  4. elif defined (BOARD_FRDM_KL05Z)
  5. define BOARD_ID "0210"
  6. define BOARD_SECRET "xxxxxxxx"

Under Freescale KDS I get the following error /media/uploads/ddoumenis/error1.jpg

Could someone explain if this is the case? Thanks again Demos

posted by Demos DOUMENIS 25 Jul 2015

You need to log in to post a question