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.

6 thoughts on “Freescale FRDM-KL25Z, Ubuntu, and mbed”

  1. Other than the installation of mbed, how do you like this board?

    I’ve got one that came as part of the Freescale Cup smart car kit. I love the board, the KL25Z and mbed. I’ve gotten so excited about other projects that I’ve been ignoring the car…

    I just got an email that some 2″ square PCBs I made for the 64-QFP version of the KL25Z have been shipped back to me. I have so many different but related applications that I want to prototype each individually without having to buy a mess load of FRDM boards…

    1. It’s a nice little board, but I don’t yet have a good project for it – most of my projects fit comfortably in an 8-bit Atmel. It’s definitely a contender for when I need more horsepower. Have you published the design of your breakout board? It sounds like a neat application.

      1. Not yet – most of it is still in my head, which is why I wanted to prototype the different photography related functions individually. I eventually want to make a kitchen sink photo controller that does time lapse, various triggering, control a valve for liquid drop photography, measure shutter sync and open timing, flash duration timing, maybe even add an ambient and flash light meter function as well. Oh, and a flash trigger that responds to the wireless optical flashes sent out by Nikon flashes for remote control.

        Parts of those functions already exist but not all in one, with a hackable processor on the board. One of them is an Arduino shield (Trigger Trap https://triggertrap.com/), but it’s $49, through hole, and won’t do all I want it to do. I probably won’t end up building up a full ecosystem like they did. I can leverage off their cables, though. But that all assumes I actually complete it, document it, and successfully Kickstart it or something…

        I also drew up a 400 mil wide DIP converter for the 32-QFN variant of the KL25Z but I have not had any of those built yet. Those guys are a pain to hand solder. I soldered one down to an eBay DIP converter board – I had to use hot air as the fine tipped irons we have are not all that fine in comparison. After that, it seemed easier to just make a board and including what I wanted onto it with options for modification as opposed to point to point wiring.

        The reason for the DIP converter was because the University Relations person at Freescale that I know said that he gets requests from people for Kinetis boards that can be placed on a solderless breadboard. At 400 mils, the little board I drew up only takes up two holes on either side of the gutter instead of the normal 2 on one side and three on the other.

        I hope to put a blog post up with some results after I get at least one of these QFP boards up and running…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>