I recently came across mbed.org, an online toolchain for ARM parts. The first thing that I noticed was that they claimed to support the Freedom-KL25z, so I thought I would put that to the test.
The setup was not quite as effortless as I expected.
The first step was updating the bootloader by following this procedure:
- Update the bootloader firmware from a Windows system. I attempted this from both Linux & Mac without success (this was the most frustrating part)
- Dowload the firmware updates from PE Micro (here)
- Unpack the file Pemicro_OpenSDA_Debug_MSD_Update_Apps_2013_01_07.zip to a convenient location.
- Follow the instructions contained in the BOOTUPDATEAPP_release_notes.txt file.
- Create an account on mbed.org
- Install the mbed firmware by following this procedure
Once all of that has been completed, you should have a USB disk titled "MBED" available; mount this disk as required for your operating system.
The rest is just plain fun. Using the mbed compiler, The "HelloWorld" application that I created compiled and ran without any changes. Compliing a program from the online compiler results in a downloaded ".bin" file, which is then copied to the USB drive. Hit the reset button on the Freedom board and voila, your program is running!
I tested both the default (gpio) demo and a serial demo. Both compiled exactly as expected, downloaded without problems, and ran immediately.
If you want to do very much, you will probably want to replace the precompiled library with the source library. I had to do this to find out what mbed was calling the pins. The procedure is simple; delete the default "mded" lib and import the source libraries from the mbed SDK (here). You will need to import both the mbed-src lib and the mbed-Freescale lib. The pin names are (surprisingly) in the file "PinNames.h" under "mbed-Freescale/capi/KL25Z",
All in all, I was impressed with the mbed tools; other than the confusion regarding the requirement for the bootloader upgrade to be performed from Windows, getting started with mbed.org was faster than downloading and installing native tools. The library routines worked as expected and the documentation for both the library and compiler are both excellent. In addition, I do not believe that mbed has any code-size restrictions. There are provisions to export your project to several other formats:
I would say that this is a definite "win" ..