-
Notifications
You must be signed in to change notification settings - Fork 3k
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
M2354: Support PSA Firmware Update #14972
Conversation
@ccli8, thank you for your changes. |
@LDong-Arm Same as #14441, this PR changes frozen |
1. Change from single image boot to multiple image boot 2. SDH is configured to Secure for placing update firmware. It becomes inaccessible to Mbed. 3. Post-build script supports both multiple image boot and single image boot 4. Update readme to reflect above change 5. Increase forced_reset_timeout due to longer booting time for Greentea test
e37d471
to
5114e4c
Compare
@ARMmbed/mbed-os-core Hopefully we get this in before TF-M v1.4 upgrade. |
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.
@ccli8 Thanks for the contribution, please see my comments.
Also, the Pull request type in the PR description should be "Feature update" as it adds a new feature.
```sh | ||
git clone https://github.com/OpenNuvoton/trusted-firmware-m -b nuvoton_mbed_m2354_tfm-1.3 | ||
``` | ||
$ git clone https://github.com/OpenNuvoton/trusted-firmware-m -b nuvoton_mbed_m2354_tfm-1.3 |
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.
This fork and branch doesn't seem to contain the Firmware Update changes in this PR? Do they come from somewhere else?
We will upgrade TF-M in Mbed OS to v1.4.0 soon, so it would be good to have all patches on one branch, making it easy to rebase them to TF-M v1.4.0 when we need to.
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.
Ah I can see your fork of mbed-os-tf-m-regression-tests points to your fork of trusted-firmware-m, which has branches for both TF-M v1.3 and v1.4 with all the Firmware Update patches. 👍
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 OpenNuvoton TF-M fork is the officially public one for users who want to re-build TF-M for M2354. As this PR lands, the nuvoton_mbed_m2354_tfm-1.3
branch will update accordingly. When TF-M 1.4 is supported in the near future, there will be nuvoton_mbed_m2354_tfm-1.4
created in OpenNuvoton TF-M fork also.
set(mcuboot_image_number 2) | ||
set(region_defs_h_path "${CMAKE_CURRENT_SOURCE_DIR}/partition/region_defs.h") | ||
set(update_stage_sdh true) | ||
set(update_stage_flash false) |
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.
Does it mean we support both single and multi image boots, and updating from SD card and flash? Have all of them been tested with Mbed OS? And how will users select which one to use (with both Mbed CLI 1 and 2)?
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.
Both from SD and from flash are supported and they are both verified with Mbed OS. But due to limited flash size 1MiB on M2354, from flash is not practical. From SD is the default and for public. From flash is for internal development/test.
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.
In principle, we can keep only the default/supported cased here, rather than having code for all cases. But I get the idea of making it flexible for internal development, so I'm personally fine with this.
@LDong-Arm Updated to "Feature update" |
@ccli8 We will start upgrading TF-M in Mbed OS to v1.4 soon. It would be really helpful if you could raise a PR to "upstream" your mbed-os-tf-m-regression-tests fork to our main repository please? It has just one commit on top of our main repo, so it would be a rather small PR. We can help with selecting different trusted-firmware-m repositories for different targets (i.e. upstream for Musca, Nuvoton fork for M2354) in python scripts during code review. Many thanks in advance! @Patater FYI |
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
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.
Approving tools changes, as the changes are at a low-risk of breaking other targets in the online compiler
CI Started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
@LDong-Arm I will evaluate upstream of M2354 to |
Thanks in advance! |
@LDong-Arm Please check the M2354 upstream to mbed-os-tf-m-regression-tests PR. |
Summary of changes
This PR tries to support PSA Firmware Update for M2354. It has the following major modifications:
forced_reset_timeout
(targets.json
) due to longer booting time for Greentea testImpact of changes
Pull request type