Tag Archives: mbed

Freescale FRDM-KL25Z, Ubuntu, and mbed

Recently picked up a Freescale FRDM-KL25Z dev board from Mouser – it’s a really inexpensive way to dip a toe into the whole mbed/cloud compiler ecosystem.  It’s a lot of dev board for the price – $14USD buys a Kinetis L series KL2 microcontroller (ARM Cortex M0+ MCU at 48 MHz, 128K flash, 16K SRAM), Capacitive touch slider, MMA8451Q accelerometer, tri-color LED, and OpenSDA debugging.  There’s a lot to like about this board beyond the price – Programming and firmware updates via a simple USB storage interface, Arduino-compatible I/O footprint, and lots of free online resources.

My primary development machine at home is a Gazelle Professional i7 laptop from System76 running Ubuntu 13.04 (x86-64).  The FRDM dev board was immediately recognized when it was plugged in to the laptop.  Since I purchased the board to experiment with mbed, I followed the relevant instructions at mbed.org to upload the mbed firmware.  Plug mini-USB cable into the openSDA port of the dev board, hold down the reset button and plug the USB cable into the laptop.  So far so good – Ubuntu mounted the BOOTLOADER partition as expected.  Copy the specified firmware to the BOOTLOADER partition – check.  Directory listing showed that the file was there.

According to the instructions, the next step is to simply unplug the device from the laptop and plug it back in; the device should automatically boot into the MBED partition.  This, unfortunately, is not what happened; the device booted into the default TOOLS mode.  I assumed that I had done something wrong – maybe I didn’t wait long enough for the firmware to be programmed.  Lather, rinse, repeat – no dice.

Finally, out of frustration, I (shudder) booted up a Windows XP virtual machine and repeated the procedure.  And…it worked.  From this point forward, mbed worked just fine from Linux; copying files to the MBED mount resulted in the app successfully being loaded.

I found several threads on the mbed forums from the developers indicating that there are issues with the initial mbed installation procedure under Linux, but I saw no resolution other than “use Windows”.  A bit more digging turned up a solution from the fine folks at Rowley Crossworks: this thread discusses the issue and how to fix it.  Unfortunately I had already installed the mbed firmware using (shudder) Windows XP so I was unable to try the fix.

So, long story short, the device cannot be updated to use the mbed firmware under Linux without a bit of manual work first.  Or just put up with Windows briefly to update the device and move on.