5 years, 9 months ago.

Error importing old version of mbed-os from Github

Multitech's "Dot-AT-Firmware" depends on libMdot-mbed5 which, in turn, depends on mbed-os 5.4.7. As so many versions of mbed-os have now been released since 5.4.7, it no longer comes up as an option on the revision history mor the mbed-os library.

When trying to import this old version of mbed-os directly into the online compiler with the Import Wizard from Github using the URL (https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.4.7), I get an error "Invalid Clone URL: ..." Similarly, when I try to add the repository to my profile (https://os.mbed.com/code/add/) using the github URL, I get an error "Badly formatted repo URL - must be full URL to repo."

How do I get this old version of the mbed-os library into my project online so that it compiles properly?

Question relating to:

1 Answer

5 years, 9 months ago.

Hi John,

Please try deleting your mbed-os library from your program (right click on mbed-os and click "Delete...") then right click on your program's name and hover over "Import Library..." then select "From URL ...".

Then import the Mbed OS library version 5.4.7 by copying and pasting the following URL: https://github.com/ARMmbed/mbed-os/commit/fc1836545dcc2fc86f03b01292b62bf2089f67c3

Then click "Import". This should successfully import the Mbed OS 5.4.7 library into your program.

I found the URL for the 5.4.7 Mbed OS release by looking under the "Releases" tab on the Mbed OS GitHub repository here: https://github.com/ARMmbed/mbed-os/releases/tag/mbed-os-5.4.7 and then clicking on the version number string beneath the "mbed-os-5.4.7" tag on the left sidebar.

The online compiler team is aware of the issue regarding the Mbed OS revisions list/history not extending past 5.5.2 in the online compiler.

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

Revisiting this issue, Jenny, as I was able to implement your resolution but am now trying to do everything directly from a Windows terminal (ie, directly with mbed cli rather than the Mbed online compiler). I am running into problems adding the mbed-os-5.7.7 to my project folder, though.

Trying both "mbed add" and "mbed import" (I am a little unclear as to the difference) generated the same error:

PS Z:\VoBoNode_fota> mbed add https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf [mbed] Adding library "16bac101a6b7b4724023dcf86ece1548e3a23cbf" from "https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf" at latest revision in the current branch [mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf/)

PS Z:\VoBoNode_fota> mbed import https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf [mbed] Importing program "16bac101a6b7b4724023dcf86ece1548e3a23cbf" from "https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf" at latest revision in the current branch [mbed] ERROR: Unable to clone repository (https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf)

Any ideas?

UPDATE: Looks like I had a few things wrong: 1) I needed to use the truncated version of the github "tag" 2) I might have needed a "#" and/or remove "commit" from the URL

So, "mbed add https://github.com/ARMmbed/mbed-os/#16bac10" added the library to my project successfully. Apologies for the false alarm.

posted by John Greene 18 Oct 2018

@jplunkett - how do I find the tag and/or OS correspoding to a particular lib version? We are having a problem with getting code written on lib144/os-5.4.7 to work on lib160/os-5.7.7 and can't figure out exactly what is breaking. So, we would like to do a couple mbed-cli builds with lib147 and lib155. I can not figure out, though, how to get the hash corresponding to these libs so I can update my mbed-os.lib.

In a nutshell: what is the best way to find the equivalent of " https://github.com/ARMmbed/mbed-os/commit/16bac101a6b7b4724023dcf86ece1548e3a23cbf" for lib147 and lib155?

posted by John Greene 07 Nov 2018