-
Notifications
You must be signed in to change notification settings - Fork 3k
LPC55S69_NS: Fix baremetal compilation error #11978
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
LPC55S69_NS: Fix baremetal compilation error #11978
Conversation
As the `psa` library is not included in the baremetal profile, perform a TFM system reset only if the `psa` library is included in the build otherwise perform a normal CMSIS system reset.
Started CI |
"name": "psa" | ||
"name": "psa", | ||
"config": { | ||
"present": 1 |
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.
Do we need this new present or could we use #ifdef TARGET_PSA
?
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.
The macro you mentioned is always present for a given target that supports PSA regardless of whether we build with or without baremetal as it is a property of the target.
What is added in this PR is to indicate the presence of the PSA library.
TARGET_PSA = Target supports PSA
MBED_CONF_PSA_PRESENT = The PSA library is included in the build
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.
Why not include PSA in bare metal? I don't see how this target is very useful without PSA.
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.
As per the baremetal documentation, (see PR description) PSA is not currently included in baremetal.
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.
Similar to mbedtls, we should review these and fix in the next release if possible.
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.
The documentation for PSA is not a specification, but just explanation of current state of things. I don't see anything preventing us having PSA in bare metal mode. Will this even work without the secure image present? Maybe it makes more sense to not build PSA targets in bare metal for now?
@maclobdell @mmahadevan108
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.
Bare metal mode is enabled by using "requires": ["bare-metal"]
and this turns the build system into an "opt-in" build system i.e. any library needed by the application needs to be listed in requires
. So there is probably nothing that prevents a PSA target to run in bare metal mode but it does not work out-of-the-box. Until we fix this and have a proper "bare metal mode" then we need to guard PSA code with a flag like MBED_CONF_PSA_PRESENT
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@Patater Shall this go in, could be in 5.15 today |
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.
OK to go in. Further work is needed to make baremetal on LPC55S69 useful.
Description
Summary of change
As the
psa
library is not included in the baremetal profile, performa TFM system reset only if the
psa
library is included inthe build otherwise perform a normal CMSIS system reset.
Documentation
https://os.mbed.com/docs/mbed-os/v5.14/reference/mbed-os-bare-metal.html
Pull request type
Test results
There is an on-going effort to enable automated CI testing for baremetal. Until then it can be tested by manually building
mbed-os-example-blinky-baremetal
with the following command:$ mbed compile -t gcc_arm -m lpc55s69_ns
Reviewers
@Patater @evedon
Release Notes
Summary of changes
Impact of changes
Migration actions required