Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 3 months ago.
mbed cli import a specific revision number
Dear team,
at the moment I'm experiencing with mbed cli and I use the following command:
mbed import <my-url>
it imports the latest revision for each library included in the project even if in the project I'm using an older revision. So at the moment I'm solving using this way out:
mbed ls // to check the library revision del <directory library name> mbed add <library url>#revision-number
Is there any better way to import directly the revision number I wish?
Thanks, Fabio
2 Answers
6 years, 3 months ago.
Hi Fabio,
You can alter your .lib file in the project (such as mbed-os.lib or a specific library <insert-approrate-library-name-her>.lib) to point to a particular version
For example: https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/ has a mbed-os.lib pointing to a particular commit.
Another example: mbed import https://os.mbed.com/users/mudassar0121/code/example-C030-out-of-box-demo/
$ mbed ls example-C030-out-of-box-demo (4d61a0f32573) |- battery-charger-bq24295 (2a758bf86bb7) |- gnss (56eda66d585b) `- mbed-os (569159b784f7)
Each of the above libraries are pointing the particular commits shown in the output of mbed ls command. Please try setting the revision appropriately and retry.
Hope that helps. Please let us know if you have any further question.
- Naveen, Team mbed.
Also, please try mbed deploy command. For more details refer https://github.com/ARMmbed/mbed-cli#importing-an-existing-program which may help.
posted by 20 Aug 20186 years, 3 months ago.
Hi Fabio,
Adding onto Naveen's comment, you can also use the Mbed CLI to update a library to a specific revision number or tag with the following commands:
For example, I want to update my existing copy of Mbed OS to the 5.9.4 release:
// within root project folder $ cd mbed-os $ mbed update mbed-os-5.9.4 //this "mbed-os-5.9.4" tag was found here: https://github.com/ARMmbed/mbed-os/releases [mbed] Updating library "mbed-os" to branch/tag "mbed-os-5.9.4" [mbed] Updating reference "mbed-os" -> "https://github.com/ARMmbed/mbed-os/#485bdeee150e2bc8ed75e27d936060fb63a7a7d1"
The mbed update
command can also be used with other libraries and their specific library/revision numbers. For example:
$ cd <library> $ mbed update <library revision/commit number>
Please let me know if you have any questions!
- Jenny, team Mbed