-
Notifications
You must be signed in to change notification settings - Fork 11
Support Mbed CLI 2 #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
global TC_DICT | ||
if not TOOLCHAIN_CLASSES[TC_DICT.get(tc)].check_executable(): | ||
msg = "Toolchain %s was not found in PATH" % tc | ||
raise Exception(msg) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are removing the toolchain check, because this PR changes "ARMC6" to "ARM" as required by mbed-tools
, but check_executable()
still assumes "ARM" to be Arm Compiler 5 (armcc
instead of armclang
).
@ARMmbed/mbed-b-tools Is there a plan to update check_executable()
? Or is it for the legacy tools only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
83bfb73
to
ddfefa8
Compare
This commit * adds `CMakeLists.txt` to support Mbed CLI 2 * adds an option `--cli=[1|2]` to `test_psa_target.py` to select the Mbed CLI version * updates `README.md` to document this Mbed CLI 2 is the default build tool. Note: In the scripts, the Arm toolchain name has been changed from `ARMC6` to ARM because `mbed-tools` (Mbed CLI 2) does not recognize `-t ARMC6`. However, the legacy toolchain script from Mbed OS TOOLCHAIN_CLASSES["ARM"].check_executable() still assumes "ARM" to be Arm Compiler 5 and reports a failure, so we have to remove the check from our script, and rely on the TF-M and Mbed OS build systems to do the check.
As Mbed CLI 2 + CMake is supported now, this PR switches Travis to test Mbed CLI 2 only. This aligns with all Mbed official examples.
d99da0a
to
7befa8e
Compare
Sorry for the force pushes. Now both Travis and CircleCI are building. This PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@hugueskamba or @0xc0170 Could one of you review the cmake additions? Thanks |
To use Mbed CLI 2, the python package `mbed-tools` is required, and the version of CMake needs to be at least 3.19 so we fetch the latest from the offical PPA.
I've just added a commit to update Vagrant scripts to support Mbed CLI 2. |
Merging this as the post binary hook has been merged to Mbed OS |
This PR
CMakeLists.txt
to support Mbed CLI 2--cli=[1|2]
totest_psa_target.py
to select the Mbed CLI version (defaults to 2 if unspecified)README.md
to document the use of Mbed CLI 2Note: This PR is able to compile on its own. To be able to run it on an actual target, your check-out of mbed-os needs to have ARMmbed/mbed-os#14361.