About mbed
mbed is a tool for Rapid Prototyping with microcontrollers.
Take the tour...
Back to blog

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

Comments

22 May 2009 . Edited: 22 May 2009

Simon, my program exits via exit(0); but I can't recognize the drive without holding down the reset button.  Are you sure the drive should come back  if the program exits?  Can this behavior of the drive disconnecting/reconnecting when doing file I/O be changed? 

Thanks BTW for implementing the file I/O, just what I've been waiting for... 

22 May 2009

Hi, 

my program exits via exit(0); but I can't recognize the drive without holding down the reset button.  Are you sure the drive should come back  if the program exits? 

Pretty sure, but that is what testing is for :) 

I've added an example program on http://mbed.co.uk/handbook/LocalFileSystem for testing this behaviour. I just tested it on Windows Vista, with firmware version 14366. I pulled up the terminal next to the "Computer" pane showing the drives, and saw the mbed drive changing between "MBED (F:)" and "Removable Disk (F:)" and then back at the expected times. 

Please test this on your setup and see if the reuslts are the same. 

Can this behavior of the drive disconnecting/reconnecting when doing file I/O be changed? 

No, not at the moment. It is a bit of a tricky one as their are two hosts. We'll see if we can make it more slick in the future, but I don't plan to change it for now unless it has problems. 

Thanks BTW for implementing the file I/O, just what I've been waiting for... 

Excellent. Keep us posted... 

Simon

22 May 2009 . Edited: 22 May 2009

my program exits via exit(0); but I can't recognize the drive without holding down the reset button.  Are you sure the drive should come back  if the program exits? 

Pretty sure, but that is what testing is for :) 

Found the problem, was missing an fclose prior to calling exit. 

Please log in to post a comment.