Supported examples and libs/utils?

04 Apr 2017

Expanding upon the discussion at https://forums.mbed.com/t/usbdevice-in-mbed-os-5/2179...

I'm trying to see if there is interest in gathering a set of supported libraries and examples into a couple of repos (or perhaps subdirectories under mbed-os):

  • One repo for core libs/utils to support stepper motors, etc., common I2C/SPC devices, etc. This would include Doxygen docs and the code would match/promote the mbed coding style and idiomatic use of mbed.
  • Another repo chock full of main.cpp's that demonstrate various usages of both mbed API and the core libraries above. Similarly, these would match/promote the mbed coding style and idiomatic use of mbed.

Having said that, there are some great examples of code at https://developer.mbed.org/cookbook/mbed-application-board, some of which refer to various libraries for the LCD display, accelerometer, etc. A lot of these seem spread out over several repos, and some seem to contain different versions of the same thing.

The mbed-os repo also has some core forms of both the libraries and examples under features/unsupported, albeit the main.cpp files are intended to be tests and are thus peppered with MBED_HOSTTEST macros. I possibly could see these tests serving as examples if the MBED_HOSTTEST macros were defined to be noops and the tests were restructured appropriately - but, that could make for some very noisy example code for newcomers to sift through.

My main motivation is that these things may feel more "official" and thus more trustworthy than picking up some Joe Random code from somewhere. I'm also being somewhat 'lazy' in that I'd like one-stop shopping to get a large number of libraries vs. getting each library piecemeal and filling the top level of my source repos up with *.lib files (unless perhaps there's a way to conflate a bunch of *.lib files into one file that I'm not aware of?).

In any case, getting the libraries out of "unsupported" and getting some more formal source code control around the examples might be all I'm asking for. I'm curious what that might take.

Thoughts?

Will

05 Apr 2017

Hey there,

You might find these teams useful - https://developer.mbed.org/teams/mbed-os-examples/ and https://developer.mbed.org/teams/mbed_example/.

The examples in this repository are mostly there to be linked to from our new docs - https://docs.mbed.com/. But they might be considered the cache of examples you are hoping to find! Let me know what you think.

Cheers, Sarah