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

Compiler support for user libraries now on beta!

We've now made a major compiler and website update available for beta trials. The highlight of this update is support for developing and publishing your own libraries. Here are the details, along with the other features and updates we've added...

Library Publishing

Up until now, you could publish programs straight from the compiler to the mbed website. While this could be abused to share code usable as libraries, we've now taken this idea and built in a proper workflow to support native development and publishing of libraries. This should provide a great way to create and share reusable library components to drive peripherals etc, and help us all stop repeating ourselves and ultimately build our prototypes even faster!

When you've put together some ninja code, we want to make it easy for you to share your effort in a way that makes it easy for others to reuse. Plus, fold in fixes, improvements and documentation. To do this, you can now create a new library that is editable within the compiler. In the example below, a "Flasher" library has been created and is in active development:

Once you are happy, you can right click the library and publish it with descriptions and tags; it'll get posted to a new "libraries" section of your user account on the mbed website, and be converted to a proper published library within your program:

As this is now published, anyone can go to it on the website, and import it in to their programs by clicking on the link:

It is possible to edit the library and republish it, enabling a simple way to provide updates to libraries and allow them to improve and bugfix over time, taking advantage of the integrated one-click updates that have been supported by the mbed libraries, for any library.

And if you document your library with doxygen markup, you'll also get your documentation generated for you to make it even easier for users to make use of your hard work:

Have a play on beta and please tell us how you get on. For more details on libraries, see the full writeup in the cookbook:

Other Updates

A collection of other things have made it in:

The IDE now lets you manage your workspace, allowing you to easily search and select which projects are active in your workspace:

We've updated the underlying compiler engine:

  • Moved to the new RVDS 4.1 compiler engine
  • Added proper support for C as well as C++; you can now officially create and compile .c files!

The compiler IDE has had a load of minor improvements and fixes, including fixing the Mac copy/paste bugs that had been hanging around.

Finally, you can now add your geographic location and twitter/linkedin details to your profile:

I'm incredibly proud at how helpful, polite and supportive everyone who has gotten involved in our little community has been so far, and I'd really like to keep it that way. I'd really encourage you to upload a photo, set your location, and add a few words of who you are on your profile, as i'm convinced that will help as a reminder that we're all real people, and encourage the same respect as if you met in person; please help us keep mbed personal and supportive!

To test the beta mode, just use the floating betamode box on the front page, and tell us of any problems in the forum. Hope you enjoy the updates!

Comments

09 Sep 2010

Great Idea! Looks like it should be quite helpful, especially the added support for C.

07 Feb 2011

Hi Simon,

I would like a little bit more information about libraries.

I have just reorganised some of my projects into apps and libraries, which does make the structure of the projects better and I  understand that it does help with publishing code. But these libraries seem to be source code libararie sand as far as my own workspace is concerend I still have multiple copies of my source code in different projects only  it now has the name library.

I was hoping to create a system whereby I could have one source code library module and allow multiple projects to link to that library.

I beleive this wouldl be possible with your source code library concept but it needs to be tweaked. I envisage that the source would be published to a single repository from a single workspace location. Then when imported as libraries  into projects they would be linked in as READ ONLY and the complier makes a runtime reference to the repository when the source is needed during compilation. These  READ ONLY libraries would then not be editable within the context of an application project.  Changes could only be made in the original library source code and would then have to be republished to the same repository. Other people could share editiable versions ofthe library  library by importing them as source code into a library project where they could be changed BUT only re-published to a different location in the  repository. IE. a library file can only be changed/overwritten by its owner/creator.

This would presumably also save alot of space on the server.

Also

A extra tab on the library import page would be nice , one that shows your own uplished working libaries (now only available via ones own lib page) , this would make it easier to import unpublished libraries with fewer clicks. based on the idea that one uses ones own libraries more than those of someone else.

regards

Nick

Please log in to post a comment.