element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Documents mbed Review for FRDM-KL25Z: a complete and free online tool for the Freescale Freedom Board
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: FreescaleTools_and_Software
  • Date Created: 12 Mar 2013 8:22 PM Date Created
  • Last Updated Last Updated: 8 Oct 2021 5:24 AM
  • Views 719 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

mbed Review for FRDM-KL25Z: a complete and free online tool for the Freescale Freedom Board

This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.

image image

   

I knew about mbed already for some time: watching students using it for an NXP enabled board. Pretty cool stuff: mbed is an online IDE and compiler with tons of software libraries for the supported platform.

  

So I was dreaming to have something like this for my own boards like the Freedom board. But because mbed only supported two dedicated NXP boards, that was a road block.

 

But then mbed announced recently that the mbed SDK is open source. Wow, that is interesting! And finally the announcement last week: mbed supports the KL25Z Freedom Board. Now they have my attention :-) .
 

 

 

In a few words: mbed is a ‘cloud’ implementation of development tools and software libraries. As with any ‘cloud’ application, there are pros and cons:

 

  1. This is a online IDE with compiler: so no long download and installation needed :-)
  2. Everything is online, as well the provided libraries/SDK: so if there is a bug fix or update, it is there already there, no need to download and update software tools :-) .
  3. The IDE runs in a web browser (so I need access to the internet, ok, that’s something to consider as I’m travelling a lot)
  4. It comes for free :-)
  5. It has a version control system integrated :-)

    

So this sounds really exciting. Well, as with anything, there are pros and cons. I come to the cons at the end. The good thing is: it is really, really easy to use. I wish all other tool chains I use would be so easy. I explain this with the steps to create and download a program to the FRDM-KL25Z board with mbed.

 

     

Getting Started

  

Getting started only takes a few minutes, and registration is free of charge.

 

  1. Signup for an account at mbed.org.
  2. Read the KL25Z Getting Started guide here.

  

 

Programming the mbed Firmware

    

In order to download (not debug!) a program to the KL25Z board, the mbed S19 application needs to be programmed to the board using the OpenSDA bootloader. The detailed steps are explained in the Getting Started Guide here. Freedom Board users are familiar with the bootloader steps: 

 

  1. Enter Bootloader mode
  2. Copy the mbed firmware file to the board
  3. Re-Power the board. Now it should enumerate as ‘MBED’ device

 

:idea: If using a file manager/extension under Windows, or if there are troubles to get the firmware file copied to the Freedom board: use the DOS shell/cmd to copy the file to the device.

  

   

Downloading an mbed Program

 

On http://mbed.org/handbook/mbed-FRDM-KL25Z-Downloading there is already a .bin file available to download with the steps how to do this. Basically it works the same as programming S19 files with the normal OpenSDA bootloader:

  1. Download the file
  2. copy it to the MBED device
  3. Reset/repower the board

 

 

Creating a Program

 

The page at http://mbed.org/handbook/Creating-a-program explains how to create a program. First I click on the ‘Compiler’ button (top right corner of the web page):

 

mbed Compiler

mbed Compiler

  

  

:idea: With ‘compiler’ mbed means the IDE+compiler+linker. Everything I need to build my application.

 

 

With ‘New Program’ I create a new one:

 

New mbed Program 

New mbed Program

 

 

Next, I provide a name:

 

Create new program

Create new program

 

 

This creates my project files:

 

mbed Project Files

mbed Project Files

 

 

Double clicking on main.cpp opens the main() routine which toggles the RGB LED on the Freedom board:

 

Toggling LED Code

Toggling LED Code

 

 

With the ‘Compile’ button I build my application:

 

Compile the project

Compile the project

  

 

Similar to Eclipse, an output pane at the bottom of the window shows errors or if I was able to successfully build it:

 

Compiler/Build Output Pane

Compiler/Build Output Pane

 

 

On the right side the Program Details inform about the code/data size:

 

Program Details

Program Details

 

 

After building, opens a dialog from my web browser to download the program:

 

Download dialog

Download dialog

 

 

After downloading it, I can copy the file the MBED Freedom device.

 

 

Importing

 

The cool thing with a web based IDE like mbed is that you can share and use code and libraries. To import an existing program, I use the Import button:

 

Import

Import

 

 

Then I can filter and search for programs I’m interested in:

 

Importing a Program

Importing a Program

 

 

The easiest way to import it then is to drag&drop it the program workspace on the left hand side.

The really cool feature of mbed is that it comes with libraries and class description:

 

Class Reference

Class Reference

 

 

Exporting

 

It is possible to Export a program. This functionality is somewhat hidden behind a context menu:

 

Exporting

Exporting

   

   

This opens an Export Dialog:

 

Export Dialog

Export Dialog

 

 

I clicked the drop down:

 

Exporting Program IDE Selection

Exporting Program IDE Selection

 

 

And here the first disappointment: no CodeWarrior support :-( .

But what about the ARM Embedded one, as CodeWarrior supports this? But this does not work neither:

   

No ARM Gcc

No ARM Gcc

 

 

I tried Code_Red, as this is Eclipse based and I have it on my machine installed. But it gave me:

 

sorry, no Code_Red

sorry, no Code_Red

 

 

Ok, but I do have IAR for Kinetis-L, so hopefully I’m lucky here. But again:

 

Sorry, no IAR

Sorry, no IAR

 

Same for CodeSourcery gcc :-(

 

What worked was to export to Keil (but here my Keil IDE expired :-( ).

What worked was exporting as zip file:

 

Exporting as Zip file

Exporting as Zip file

 

 

That’s at least something. But it had only my source file in it, and not all the other libraries.

 

 

Freedom Board Examples

 

The mbed Freedom support and community is growing, and there are already multiple Freedom board examples available with this link.

 

 

Summary

 

With mbed, it is possible to build and download a program to my Freedom board in a few minutes. Installing a typically IDE takes longer than this :-) . The great part with mbed is that it has a big community (at least for the other platforms), with a rich software library behind it.

But it is not possible to debug the application on the board, at least I have not found a way to do it. This makes mbed limited a not very well suited for a typical embedded programming process in my view. Great for exploring things, but not for doing a real project? I have seen that there is a beta CMSIS-DAP mbed debug connection available for the NXP board, so hopefully this will exist for the Freedom board too?

That would be mitigated if it would be possible to export the projects to other IDE’s. I think CodeWarrior support or at least IAR would be needed. Otherwise I feel mbed is like a ‘golden jail’. And it is unclear to me how I could use mbed for a different Kinetis than the KL25Z board or for my custom board (as it requires a special bootloader).

But it is a great thing to start with a new board and to explore things, without investing into a tool chain. As for everything, there is a learning curve, and I just started exploring things. So if you know how to debug with mbed, or how to export things to Eclipse/CodeWarrior, post a comment!

  

Happy mbeding :-)

  • 32bit
  • avr
  • microchip
  • cortex-m0+
  • kl25
  • freescale
  • Cortex-M
  • kinetis
  • cortex
  • stm32
  • mbed
  • kinetis-l
  • cloud
  • xpresso
  • microcontroller
  • mcu
  • cortex-m0
  • msp430
  • nxp
  • st
  • arm
  • freedom
  • pic
  • atmel
  • ti
  • lpc
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube