6 years, 4 months ago.

mbed OS version: unknown

what do i need to in order to specify "mbed OS version" which is just under title of imported library?

Question relating to:

1 Answer

6 years, 4 months ago.

Hi Pavel,

The Mbed OS version of a program is specified in the link of the Mbed OS repository in the mbed-os.lib file. So for example, I import mbed-os-example-blinky onto my computer or into the Online Compiler. I look in the mbed-os.lib file and I see a link to the Mbed OS GitHub repository. The long strand of numbers following the "#" in the URL signifies which version of the Mbed OS repo the program is using. I can then match up that string to a revision number associated with a release tag here: https://github.com/ARMmbed/mbed-os/releases

If you are using the Mbed CLI you can find the version number of the Mbed OS library with the following commands:

cd [Your Project Folder]
cd mbed-os
git branch

And this should print out the full version number of the Mbed OS library you are using (i.e. mbed-os-5.9.1).

You can also print out the version numbers of your Mbed OS library within your application code by using the following printf statment:

printf("mbed-os version: %d.%d.%d\tlibrary version: %d\r\n", 
       MBED_MAJOR_VERSION, MBED_MINOR_VERSION, 
       MBED_PATCH_VERSION, MBED_LIBRARY_VERSION);

Please let me know if you have any questions!

- Jenny, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

Accepted Answer