Mbed Blog

Compiler Update - API Documentation!

The mbed Compiler just got some updates! There were a collection of fixes to squish some corner case bugs, but also a brand new feature...

You can now expand any libraries in your projects, and the compiler will render the api documentation within them. A picture says a thousand words, so here you go:

This works not only for the core mbed libraries, but also any other libraries people post if they are marked up with the "natural docs" auto-documentation markup.

Hope you like it!

A new approach to embedded programming!

Check it out! Tom Cantrell of Circuit Cellar got hold of one of our prototype mbed Microcontrollers, and he has written an article! It is called Easy (E)mbed - An Alternative Approach to Embedded Programming. That means mbed is in print!

UPDATE: It is in the June #227 issue, which you can buy online at http://www.mygazines.com/issue/988. You can also read just this article if you go to the bottom of http://www.circuitcellar.com/magazine/, where there is a pdf with corrections from the printed article.

Looks like it might be time to start openning up the mbed Beta :) If you know people who might be interested in getting involved, you can now point them at http://mbed.co.uk/beta.

Great stuff!

Compiler Update - Fixes & Features

Just to let you know, the compiler has just undergone some updates... 

Most notably, this should fix a bug we've seen a few of you report around reliability of the compile/download button. This was causing the compiler to intermittently hang, which is really bad news! This should now have been squished! If you do find any reliability problems, especially compiler hangs or failed download, please make sure you tell us! This is not acceptable behaviour so we want to know if it happens. Thank you to those who reported the previous bug, and hopefully you will no longer see these problems. 

Also in this update: 

  • "Find" within a file (click the find button, or hit ctrl-F) 
  • "Clone" projects and "Save As.." files (i.e. replicate them) 
  • Increased file import size limit (was causing things to fail to import)
  • A few other fixes to make things run more smoothly 

Hope you enjoy it :) Any feedback welcome... 

Have fun! 
Simon 

 

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! 
Simon

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!

Thanks, 
Simon

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.

Simon

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: 

http://mbed.co.uk/projects/libraries/api/mbed/trunk/LocalFileSystem 

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!
Simon

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! 
Simon

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. 

You need to log in to post a reply