-
Notifications
You must be signed in to change notification settings - Fork 11
Update to TF-M v1.4.0 #127
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some file locations have changed in the latest development version of TF-M. Update the paths to the files we import.
LDong-Arm
reviewed
Sep 2, 2021
d14cc5c
to
906ff39
Compare
The latest TF-M has renamed the identifier of each test suite.
The path containing the library tfm_test_suite_fwu_ns has been moved in tf-m-tests.
Add a new test from the latest TF-M development branch. Remove deprecated library.
The Crypto suite was disabled due to crashes that made tests unable to continue. With the latest TF-M and psa-arch-tests, it doesn't crash anymore so we can re-enable it with updated number of expected failures.
tfm_ns_interface.c is intended to be overriden by clients to support different targets. We copy this file from upstream into the mbed-os platform library. We also have a specific "strong" overriden version for the NU_M2354 target, which is located in its target library. Previously the implementations in the platform library were decorated with __attribute__(weak), and we provided a strong definition for the NU_M2354 target. This worked fine because of weak linking, the linker will pick the first "strong" definition and use that, avoiding any ODR violations. However, upstream have removed __attribute__(weak) from the function definitions, which caused multiply defined symbol errors when trying to build the MU_2354 target. To work around the above issue, we remove the common definition in the platform library; instead we copy the file to the Musca B1 and Musca S1 target libaries. This means the appropriate tfm_ns_interface.c is only included in the build when compiling for the specific target which uses it.
We need to copy tfm_firmware_update_ipc.c for M2354 to fix a build error when compiling the firmware update test suite for this target.
906ff39
to
846937e
Compare
LDong-Arm
requested changes
Sep 13, 2021
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.
Looks really good, just one suggestion to cover ARMmbed/mbed-os#14762 too.
Previously we omitted region_defs.h and flash_layout.h from the import script for MUSCA targets, due to an issue with mbed-cli1 not recognising the BL2 macro defined in targets.json in mbed-os. We kept older patched versions of the headers in the mbed-os tree. Now we have another solution for the BL2 issue, which is to define it in the MUSCA target scatter files. This means we can import the latest headers from upstream.
LDong-Arm
approved these changes
Sep 14, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update TF-M to v1.4.0.
Note, this PR depends on ARMmbed/mbed-os#15050, as this PR removes the workaround for the directory change upstream for musca targets.