Mbed Blog

Compiler Update - Download Button, Minor Improvements

The compiler has just had some minor updates... 

As requested by a few people, the compiler now supports a "Compile-And-Download" button. It should help make things a little more clear, and combined with the fact we've added keyboard shortcuts, a little faster too (e.g. Ctrl-D). 

We've also removed a bottleneck that was causing saves to be sluggish, improved some of the import support, and added a few other features and fixes. 

If you see any bad behaviour or bugs, please make sure you email us at support@mbed.co.uk. 

Library Update - Features and Fixes

edit: updated to newer syntax

I said in the last library update that we were spending a lot of time (John in particular!) working on getting the foundations right. Well, it wasn't an excuse, and it is starting to pay off :) Here comes v6...

And yes, we now have RPC! This is an idea i've had floating around a long time, and in many prototypes, but is finally here in it's first official form...


#include "mbed.h" 
DigitalOut led(p1, "led"); 
int main() { 
        char result[64]; 
        rpc("/led/write,p1", result); 
        printf("%s\n", result); 
        rpc("/led/read", result); 
        printf("%s\n", result); 

Remote-procedure call of mbed Interfaces! Of course, the fun part is that what generates the rpc strings is totally flexible. Hopefully there is much fun to be had here! In particular, the plan is to use the RPC to be able to control the mbed over any transport mechanism (serial, http, bluetooth, ...) form any language (python, javascript, teraterm, ...).

It is built so you can create objects remotely too (new/delete), and even make your own classes that plug in to the RPC :) I'll put more on http://mbed.co.uk/projects/cookbook/wiki/RPC.

But there is other stuff too! Here are the other things that made it in this release:

The Real-Time Clock is now functioning, and will run as long as there is power connected, either through one of the main power supplies, or through the 3.3v VB (Battery Backup) input, designed for a coin-cell battery. The standard C functions time() and friends work, and there are a couple of helper functions to simplify things; set_time() allows you to set it, and time_str() returns a string with a human readable time. Look in the api under RTC, and we'll also aim to put up some examples in the Cookbook.

AnalogIn and AnalogOut now support read_u16() and write_u16() methods. This should give a natural way to access analog interfaces when dealing with samples, and be faster. We haven't done any optimisation yet, so they will likely get even faster in time too...

The multiplier that Ticker and Timeout intervals were seeing of ~105% has now been fixed. I have a photo of a frequency generator to prove it! (but google doesn't let you attach them easily). They should now actually be able to time :)

A new function, mbedinfo(), can be called at any point and will dump out memory stats and other such stuff to stdout (USB serial port). This is useful just to check the state of memory etc, and is meant to be a similar dumping ground to how PHP uses phpinfo().

For debugging and error reporting, we'll be moving to using error(), and plain old printf(). For the techies, error() goes to stderr and then dies, and printf() goes to stdout, which in the default case means it appears on the USB serial. We'll be depricating the ugly DEBUG() and ERROR() functions.

And for completeness, here are the other notable features and fixes:

  • DigitalIn rise and fall interrupts can now attach object methods as well as static functions
  • Serial and SPI interfaces support specifying "Not Connected" (NC) on selected pins
  • p1-p4 now map to LED1-LED4, so you can just do "DigitalOut led(p1);" now
  • The Timer object was not reseting when reset() was called while running - FIXED
  • SPI format now uses a single mode parameter rather than seperate pol and pha
  • A prototype SPI3 class has crept in, which supports devices with a single bi-directional data pin

When you start a new project, you will automatically pull in the new mbed Library. For existing projects, clicking on the mbed library in your file tree should provide you with an "update" button. As ever, please bring to our attention any problems, questions or suggestions you have.

Have Fun! 

Compiler Update - Improved Import, Improved Response

We have just put some new compiler enhancements live. Hope you like them....

The compiler importing functionality has been respun. Apart from being much more stable, you can now import programs and files from both your desktop and from subversion repository, making it easy to pull in other peoples published examples. As before, libraries can also be pulled in from subversion, making it easy to share more stable code bundles as libraries.

The compiler framework and infrastructure have also been enhanced under the hood; you should see the interface giving you a lot more feedback while compiling, and a bottleneck has been removed so it should be consistently more responsive too. We've folded in some other fixes too, so we're hoping this is all good news! But if you do see any bad behaviour or bugs, please make sure you email us at support@mbed.co.uk.

Thinking about it, it'd also be good to hear reports of things that work better :) The bugs are most important to catch, but knowing things that have worked out will help check we're moving in the right direction!


Firmware Update - Support for Local File System

We've just released an mbed Microcontroller firmware update (v14366).

This release supports the new LocalFileSystem, and makes a few other minor improvements.

To update your Firmware, open the MBED.HTM file on your mbed, click "check for firmware updates", and follow the instructions. Please tell us if you have any trouble updating.


Library Update - Build your house upon rocks, not sand

After a lot of work, we've just released a major update to the libraries (v5). Hopefully, you'll hardly notice... 

The majority of this upgrade is totally behind the scenes, getting the core robust and ready for the things we want to do with the API now and in the future. Whilst it shouldn't really be visible, please tell us if we break any of your code when you upgrade! Our next focus with the Libraries will be on the API itself, so expect some slightly more invasive improvements then. And some of the new tricks to come to light :) 

...but we couldn't do an update without giving you something new! So in addition to the new Ticker and Timeout classes, we've added file system access to the USB drive. No documentation yet, but the API page should give you a clue: 


We think this might find some good applications, so we're interested to hear how you use it. 

When you start a new project, you will automatically pull in the new v5 mbed Library. For existing projects, clicking on the mbed library in your file tree should provide you with an "update" button. 

As ever, please bring to our attention any problems or questions you have. 

Have Fun!

Compiler Update - More Browsers, More Robust

Some compiler updates for you for your programming pleasure... 

The compiler now has a first cut of support for Google Chrome on Windows, and Safari on Mac OS X. Whilst there are still a few rough edges, I hope you'll have fun with your new freedom! As always, please shout if you spot any problems. 

We've also implemented a basic retry mechanism in the compiler, with the aim of coping with any internet glitches. If something does go wrong on a communication, you should be given the option to "retry", and everything should spring back in to life. We've made it intentionally invasive at the moment so it is obvious a retry has occurred; please report if this happens (as with any bugs), as well as whether you were able to continue as normal after retrying. 

Have Fun! 

Website Update - Handbook, Cookbook and APIs!

Whilst we've introduced most of these updates in stages over the last few weeks, I thought it'd be worth making them official! 

The basics of the Handbook are in place now at http://mbed.co.uk/handbook. This is going to be the main guide for the introductions and core mbed apis/features. Hopefully the introductions are good to get people started, and we'll be concentrating on where you go next; any suggestions for what you'd like to see welcome! 

We moved over to a "Cookbook" area which is open for anyone to add to. It has a wiki and code repository, and we'd encourage people to share projects and notes, especially the process you go through making them. We've noticed the blog-like style works well as not only does it show the answer, but also how you got there. This seems a great way to help others learn, get suggestions, etc. Go nuts! 

We've also implemented auto-documentation for our libraries (using the very elegant NaturalDocs). Still some integration improvements that haven't quite made it in yet, but getting it in there means we can start worrying about improving the documentation. And we thought it might be useful to others too, so it is also available in the Cookbook. Any code checked in to the cookbook repository gets documentation generated from it if present, so feel free to experiment yourself with your own code. 

Firmware Update - Improved Support for Serial Port

A new release of the mbed Microcontroller Firmware is available (14129). 

This release provides: 

  • Support for both Mac and Linux USB Serial Port connections by default 
  • An improved Windows Serial Port and Driver to replace the buggy Windows default serial drivers. 

Please could all beta testers update to and test this new firmware, directing any feedback about the Firmware Upgrade process and new Firmware itself back to this forum thread. To upgrade your firmware, click on the appropriate link from your mbed Microcontroller MBED.HTM file, or go directly to http://mbed.co.uk/handbook/Firmware

Instructions for using the Serial Port aspects of this new firmware can be found under "Serial Communication with a PC" in the Handbook. 

Any problems, please let us know. 


Compiler Update - Support for FF3 and IE7/Vista

Just a note to say the compiler has had some updates which include a platform support upgrade! 

Revised Platform Support: 

  • Firefox 2 and 3 on Windows XP, Windows Vista, Mac OS X and Linux 
  • Internet Explorer 6 and 7 on Windows XP and Windows Vista 

So, go nuts with your new found freedom! And please tell us if you find bugs/problems/things not working how you'd expect :) 

Hope you like it.

mbed Microcontroller Beta Launch!

We decided the best way to launch something was to put it in a rocket…

Continue reading »

You need to log in to post a reply