mbed: A strange IDE - Embedded.com

mbed: A strange IDE

IDEs are all pretty much the same. Sure, an IDE may be based on Eclipse, or could be proprietary, but basically they all consist of an enormous installable that gobbles as many resources as possible on your PC. In the embedded world most are PC centric, though a few do support Linux or the Mac. In general these tools offer a huge wealth of resources for building and debugging firmware.

Then there’s the mbed IDE.

The Cortex M0 mbed board

mbed is an ARM-sponsored outfit that sells a couple of low-cost development boards based on ARM cores from NXP. One uses a Cortex-M0 (Figure above ); the other an M3 (Figure below ), and they cost $45 to $60 or so.

As is common today these cores have gobs of I/O ranging from simple analog to USB and Ethernet (depending on the board). Both are the size of a 40 pin DIP and have a DIP pinout, which makes it easy to use these on solderless breadboards. And they’ll connect to the development host via a USB cable which also provides power.

But they won’t sell you an IDE.

Instead, the compiler et. al. are web-hosted and access to the environment is free.

The Cortex M3 mbed board

Unpack the board and connect it to your computer. The thing looks just like a USB flash drive; click on the file named MBED.HTM and it will take your browser to their site. You’ll have to register, but this gives you your own sandbox for storing code. Go to the compiler window, cut and paste one of their many examples and press “compile.” Save the binary to the mbed board pseudo-drive and hit the reset on the board.

That’s it. Your program is now running on the Cortex CPU.

Figure on ten minutes, tops, to get your first program going. I have never experienced such an easy-to-use development environment.

Being web-hosted the tools don’t care what sort of host computer you’re using. PC, Linux, Mac, heck, I imagine they’d run fine on a VAX if it had a web browser.

The tools aren’t toys; that web interface is connected to the full suite of ARM tools.

Debugging resources are just about non-existent. Don’t count on trace or complex breakpoints. Your code can toggle the board’s LEDs to provide some debugging feedback, or you can use printfs. Formatted output goes back up the USB link to a terminal window, and works surprisingly well.

I don’t know about you, but I hate digging through the CPU’s manual to figure out how to configure all of the peripheral’s registers. Sure, some vendors have tools that will automatically generate the interface code, but that’s never a painless process. On the mbed board all of that goes away. They have resources predefined to drive devices. So, to toggle a pin one might write:

That’s it – the tools will do all of the work to properly multiplex and configure the pin.

All of the headaches of doing embedded work disappear. There’s no obvious link process, no memory maps to puzzle out, and no I/O configuration. Interrupts are supported but you don’t have to set up the vectors, NVIC, and all of that.

There’s the old joke that one wants to avoid writing comments because if they can understand how the system works, they won’t need you any more. Well, the mbed board’s automation of all of the usual embedded problems almost makes me fear that they won’t need us deeply embedded people any more.

This is a fantastic resource for kids and others who want to get acquainted with embedded programming. I plan to keep the board around for those times when I want to quickly play with a little embedded problem and don’t want to relearn and struggle with a big, complex IDE.

mbed’s web site is mbed.org. There you’ll also find a ton of code, all ready to go.

Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges. Contact him at . His website is .

8 thoughts on “mbed: A strange IDE

  1. The problem with any web based tool is that

    A) It assumes you have a fast reliable Internet.

    B) Will that web site work in five years when the customer wants a code change? How do you archive the tools with the project?

    C) It assumes your IT departme

    Log in to Reply
  2. The mbed rapid prototyping platform is an interesting experiment in the embedded development “on the Cloud”. The strength of the system comes from the online repository of code and the online community. Indeed, the system is specifically designed for easy

    Log in to Reply
  3. Thanks for that in depth analysis.

    The only benefit of mbed seems to be how easy it is to get going and that is nowhere near as important as it used to be. While it might have been a big deal to get an IDE up and running in the Bad Old Days that is no lon

    Log in to Reply
  4. I can confirm this is an excellent beginner's board for kids, becauses of the simple way they can take cookbook code and modify it. We've got a couple at home, and my 12 & 13 year olds picked them up and just got going with them (they were 10 & 11 when the

    Log in to Reply
  5. The other nice set that will let you going in no time:

    Embedded Artists LPC1769 LPCXpresso board with NXP's ARM Cortex M3 microcontroller. Very similar to MBED's NXP LPC1768. LPCXpresso web-site providesmany examples including an example to run FreeRTOS

    Log in to Reply
  6. The online IDE has no debugger, but you can export your project to an offline IDE and use the CMSIS-DAP debugger interface. I'm using LPCXpresso Pro ($$) and the debugger works fine with an mbed module.

    Log in to Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.