AnsweredAssumed Answered

Getting started: KBOOT MSC on KL25 questions

Question asked by Frank Van Hooft on Oct 6, 2016
Latest reply on Oct 21, 2016 by Frank Van Hooft

I'm using kboot 2.0 and KDS 3.2. I'm trying to get kboot running as a mass storage device on a MKL25Z128. So that I can plug the KL25 into a PC, have it appear as a drive, then drag&drop a firmware file onto it.

 

I've succeeded in building KBOOT and programming it into the KL25. I took the "freedom bootloader" project, and modified bootloader_config.h so that only MSC was selected.

 

#if !defined(BL_CONFIG_UART)
#define BL_CONFIG_UART (0)
#endif
#if !defined(BL_CONFIG_I2C)
#define BL_CONFIG_I2C (0)
#endif
#if !defined(BL_CONFIG_SPI)
#define BL_CONFIG_SPI (0)
#endif
#if !defined(BL_CONFIG_USB_HID)
#define BL_CONFIG_USB_HID (0)
#endif
#if !defined(BL_CONFIG_USB_MSC)
#define BL_CONFIG_USB_MSC (1)
#endif

When I plug the KL25 into a windows PC, a drive pops up! Amazing. What a good start. But I can't progress beyond this.

The "status.txt" file says "ready".  This is Info.txt:

Kinetis Bootloader K2.0.0

System device ID: 0x25152486
Flash size: 131072 bytes
Flash range: 0x00000000-0x0001ffff
Flash sector size: 1024 bytes
Flash blocks: 1
RAM size: 16384 bytes
RAM range: 0x1ffff000-0x20002fff
Reserved region 0: 0x00000000-0x000073ff
Reserved region 1: 0x1ffff000-0x2000111f
Verify writes: yes
Check reserved regions: yes
Boot config present: no
Peripheral detection timeout: 5000 ms
CPU clock: 48000000 Hz

To test the bootloader, I built the example project LED_demo_freedom_8000, then drag&dropped the resulting S-record file (named led_demo_freedom_8000.srec) into the drive. Nothing interesting happened, it appeared to be ignored, and the status.txt file continued to say "ready".  I also tried creating a "raw binary" .bin file instead of a .srec file, but the bootloader didn't appear interested in that file either.

 

Both the bootloader & the led_demo project were built as "release".

 

Any idea what's going on?  Why can't I drop the led_demo file into the KL25Z?

Many thanks for any suggestions!

Outcomes