mbed Blog RSS Feed

New Editor features - Now live

After the release of the Pull requests feature, the focus with the mbed Compiler has shifted towards improving the code editing experience. We are happy to announce a new set of features aimed at enhancing the Editor capabilities in the mbed Compiler. These features are now live.

Here is a sneak peek of the main feature:

/media/uploads/screamer/interactive-editor-2.png

Interactive mode

The Interactive mode is a new way to interact with the mbed Editor for easy and quick information lookup about a code element. The mode is triggered by tapping and holding the Ctrl key (Command key on Mac) and moving the mouse cursor over text elements like words, numbers, hexadecimals or even URLs. Valid elements will be underlined when hovered and can be clicked. Depending the element type the Editor will respond differently:

  • If you click a word, the Editor will perform a case-sensitive definition lookup for that word and display up to ten results in a tooltip (like shown on the image above). On top of every result is the definition name and type. Under that is the definition parent, which can also be clicked to perform definition lookup based on the parent name. If an API documentation is present for the the defined element or its parent, then the tooltip will contain a link that opens the API documentation inside the mbed Compiler. Last is the link to the declaration at file:line with a snippet of the declaration code that lets you quickly check the parameters and return type (if any).
  • If you click a number or hex it will display a base convertor for decimal, hexadecimal and binary representation in 1, 2 and 4 byte storage (8, 16 and 32 bits).
  • If you click a URL it will open it in a new browser tab.

The feature shows results based on the existing code saved in your workspace, meaning that the definition results may not reflect the contents of any unsaved files.

To exit the Interactive mode simply release the Ctrl key (Command key on Mac).

Other Editor features

  • Functions defined in stdlib, stdio, math, string and strings libraries will now be colored in dark blue. They will also have description and definition when clicked in Interactive Editor mode.
  • The Editor tabs are now grouped and subtly coloured based on the program each file belongs to, allowing you to navigate easily between files across multiple programs. The Editor will also open new files as last tab in the program group if exists.
  • The Editor tabs now have context menus that let you invoke common operations on them without the need to focus the tab/file.
  • Improved Editor rendering speed when typing and scrolling by 15% to 200%, and by over 260% when doing text selections! It's now possible to edit huge 100k lines files on modern browsers.

Other features in beta

  • The board selection in the mbed Online Compiler has been completely redesigned to a fully featured dialog that gives a detailed information about the platform you are compiling for, including a photo, description and even pinout!
  • The compile progress has been redesigned to reflect the board selection enhancement.
  • The compilation times and the binary sizes have been reduced for large programs.
  • It is now possible to create and edit files with .txt extensions in your workspace. Note that once created these files will become part of your repository.
  • Improved importing speed from 20% to over 300% for programs with more than one library. Especially noticeable when importing library-intensive programs like the Xively's jump start demo
  • URLs in source code on mbed website will now be recognized and turned to clickable links.
  • API Documentation source code will now be highlighted using the mbed code highlighting style. URL links to other API documentation resources will be highlighted as well.
  • Functions defined in stdlib, stdio, math, string and strings libraries will now be coloured in dark blue for all code resources on the mbed website - wiki pages, forums, api documentation, repositories, etc.

Update: Now released!

These changes have now been rolled out to all users.

Announcing the mbed Component Database!

The new mbed Component Database hosts reusable libraries for different hardware, middleware and IoT services that you can use with ARM Microcontrollers. These components can be used as building blocks for quickly developing prototypes and products.

Sensors in the Component Database

Components and the associated libraries, examples and documentation are created and added to the database by mbed developers, component manufacturers and service providers. The goal is to create a database of rock-solid code and resources for many components that can be used with ARM microcontrollers.

The component database can be found at http://mbed.org/components/.

Helping developers

The main benefit of the the Component Database for end users is to provide a reference point for the best available driver library for any supported hardware component.

If a component is in the component database, it should mean that:

1) The component has a library or hello world program available, which also has been tested to work to the degree indicated

2) Any updates or improvements to the software library will also be found in the same place

3) Discussion and questions relating to the component can happen on the component's entry in the database

4) All relevant documentation on the component is collated and linked to from the database entry

If you have created a library for a component, all mbed users are welcome to create an entry for the component, or add the library to an existing entry.

Helping component manufacturers and library developers

The component database is the place for mbed developers to find purchasing information, support links and product datasheets relating to a component.

If you are a component manufacturer, having a component supported in the database is a great way to ensure customers can confidently buy the component knowing that the minimum of time will be needed to integrate it into their design.

Maintaining an mbed library for component(s) can boost the visibility of a manufacturer within the mbed community. Developers then know that they can potentially talk to actual engineers at the manufacturer if needed, which increases the confidence the developer will have in integrating products. <anufacturers may also link to paid support options and contacts to help establish commercial relationships.

What it is, and what it isn't

The Component Database is a public database of components, libraries, and associated documentation. The entries in the database are maintained by component manufacturers and the mbed community.

It is the place to put schematics, pinout diagrams, datasheets, guides, and any other information which is useful to users of the component.

It is not an exhaustive list of all possible variations of a component. Nor is it intended to index 'passive' components such as switches, resistors, antennas, etc. As a guide, a component should only be in the component database if it requires a software library to operate. For example, octopart.com lists over 8 million discrete components. By contrast, the mbed component database is expected to cover more in the region of the low hundreds of components. It includes online services as well as hardware components.

It is not a marketplace for software. Every component can only have one library associated with it. It is up to the community to maintain that single library to be the best possible library serving the needs of the majority of people. This is intended to control fragmentation of libraries into several forks, each of which serve the needs of only a subset of users. We will shortly be adding features to help make this process easier, and welcome feedback in this area.

Adding a component

Anyone can add a component to the database, and edit existing components. Components are not 'owned' by individuals, instead the community is responsible for maintaining the database. A component however is linked to libraries which are owned by an individual, which is then in effect the official maintainer of the library for that component.

To add a component, simply navigate to the category you think the component should be in, and click the 'Add Component' button.

The future

The cookbook wiki will remain freely editable by any mbed developer. However we expect and encourage component support pages to migrate to the component database, providing that the library and documentation are tested, working, and suitable for inclusion in the database. If you migrate a component to the database, you may edit the cookbook page, pointing visitors to it's new home.

We hope the component database will grow to be useful and an important part of the mbed developer website. As always, if you have any questions, comments or suggestions, they are very welcome.

mbed Blog Roundup

A lot has been going on recently at mbed! Here is a roundup of what's been happening:

New Issue Trackers and Pull Requests!

We've been adding some features to make working together on mbed even easier!

You can now add an issue tracker to your repositories. We've already enabled it on the official mbed repositories. read more.

Pull Requests are now being built-in to the workflows and are available in mbed betamode. read more.

CMSIS-DAP debug on all mbed-enabled hardware!

CMSIS-DAP support has been added for all mbed board firmware, so you can now debug your mbed hardware using a range of well known toolchains. read more

We've also released an open source python interface to allow debugging Cortex-M microcontrollers using CMSIS-DAP, either using GDB or your own custom scripts. read more

Professional and Academic Microcontroller Training based on mbed!

Providers of embedded software training Feabhas have chosen mbed as a platform for their professional training courses. read more.

ARM is running a free of charge, one-day microcontroller workshop at the ARM headquarters in Cambridge for academic teaching staff. read more.

mbed Application Board on sale!

The mbed application board went on sale in March and is selling like hotcakes! The credit card size application board provides a variety of peripherals which there are libraries and example code for in the cookbook so it is a great self contained development or training companion. read more.

Xively collaboration for building the Internet of Things!

We've been working with xively (formerly Cosm/Pachube) to launch their new IoT platform and Xively Jumpstart kit so you can rapidly prototype connected devices and co-develop IoT solutions. read more

Pull Requests now in beta!

We are happy to announce that the Pull Requests feature is now in open beta. This also marks an important milestone – the mbed Online Tools is now offering a complete set of collaboration development models – the multiple authors (a.k.a. shared repository) model and the fork & pull model, where pull requests play major role as median between independent developers and repository authors.

Click to enlarge

But what is a pull request?

A pull request lets you tell others about changes you've added to a fork of their (or ancestor) repository, effectively granting them permission to include and use your code in their code base. Once the pull request is created, the other party can review, accept or reject the set of changes, discuss further modifications and even add follow-up changes or merges.

Think of pull requests as for simplified fork and update workflow, where the changes contributed by non-repository developers are being moderated by the repository author(s).

Most online services that offer source code and version control hosting let you review and merge pull requests.
We made a step further by letting you review, compile, test and add more changes if necessary before accepting a pull request by harnessing the power of the mbed Online Compiler.

More information on pull requests can be found here.

Other features in beta

  • Repository comparison mode that lets you compare a workspace repository with related published repository without permanently changing the URL.
  • Code highlighter improvements and correct line numbering for diff code examples in wiki pages, forums etc.
  • Redesigned repository home pages to accommodate more repository actions.
  • Improved IDE initialization and rendering.

Trying out the beta

Before you try out the beta, please be aware that:

  • You will be using a beta, which even though we consider stable and safe, have not been tested in larger scale. It is advised to use copies of workspace and published code.
  • Pull requests will be visible only in beta until the official release, though pull requests that you accept will immediately cause the accepted changes to be published to the live repository.

To try out the beta, visit http://mbed.org/betamode/ and click "Enable betamode".

Please let us know what you think on http://mbed.org/forum/bugs-suggestions.

mbed as a Professional Training Platform

This week we are glad to host a blog post from Niall Cooling (CEO of Feabhas Limited) about how the recent addition of offline development and debugging (through CMSIS-DAP) has allowed Feabhas to choose mbed as an ideal platform for their professional training courses:

Niall Cooling wrote:

/media/uploads/emilmont/feabhas_logo.png

As a company who’s been involved with training many thousands of embedded software engineers over the last 18 years (in technologies such as C, C++ and Real-Time Operating Systems) our goal was always to try and recreate an engineer’s everyday environment in the training courses. To this end we have always used embedded target boards on which an application is programmed. Initially we started with a Renesas SH-2 based system, but over a decade ago we switched to an ARM7TDMI (NXP LPC21xx) target.

However, with the announcement and release of the Cortex-M family of microcontrollers we made the decision to port our training to a Cortex-M3 based system. Ideally we like to use off-the-shelf hardware where possible, but have always struggled to find target system that fit our requirements. As we work very closely with ARM (as both a provider of training to ARM and an ARM Approved Training Center) we were made aware of the mbed in its very early days.

Initially we thought the concept of the mbed was a great idea, but unfortunately had to rule it out on a number of reasons:

  1. We need an offline IDE (e.g. Keil uVision or IAR EW) as when training on a customer site we cannot guarantee internet access - may sites, for security reasons, are locked down.
  2. As great as the mbed library is, it actually hides all the code we are teaching engineers to develop (e.g GPIO, programming UARTs, handling interrupts, fault handling, etc.)
  3. As a consequence of (2) we also need source level debugging (e.g. breakpoint, reading assembler, memory access, single-step, etc.) and visibility of the build process (e.g. what the compiler & linker are doing, memory maps, etc.)

Even though I was a fan of the mbed (I did some early work on MQTT with the mbed) we didn’t pursue it as a viable target, instead prototyping our own board deliberately based around the same core as the original mbed platform (NXP LPC17xx series). Students are always asking for hardware they can continue to experiment with after the course and by using the same core it allowed us to point them at the mbed. As an aside, in the Embedded C++ courses, we recommend students take a look at the mbed libraries to illustrate how well device drivers can be wrapped in C++ objects.

Luckily for us, before we’d gone into full production, ARM announced CMSIS-DAP and its support for the mbed. So recently we have spent some time experimenting with CMSIS-DAP using the mbed and the Keil uVision IDE. The details of which are:

  1. Native C/C++ Application development for the mbed using CMSIS-DAP
  2. User I/O from mbed with CMSIS-DAP
  3. Rehosting ARMCC for the mbed with CMSIS-DAP
  4. Test Driven Development (TDD) with the mbed

The great news is that mbed + CMSIS-DAP meet our needs and as such we are redesigning our training platform to be to accommodate an mbed rather than mounting the NXP LPC1768 directly. We also have a full TDD (Test Driven Development) setup using the mbed, the Unity TDD framework and a little bit of Python for use on our embedded software testing course.

You can find me at: https://mbed.org/users/feabhas/