Skip to content
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: Fix debug failure in Mbed Studio #15427

Conversation

ccli8
Copy link
Contributor

@ccli8 ccli8 commented May 26, 2023

Summary of changes

This PR updates TF-M import assets and post-build script to enable debugging M2354 on Mbed Studio/pyOCD, which requires Mbed OS application program starting on the sector boundary.

Modification list:

  1. Update TF-M import assets with MCUboot header size enlarged to be sector aligned
  2. Following above, change header size argument (-H) in wrapper.py command line
  3. Fix min-write-size (--align) to 4 (per flash_area_align() on TF-M ) in wrapper.py command line
    https://docs.mcuboot.com/design.html#image-trailer

Related issue: #15417

Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

@ccli8 ccli8 force-pushed the nuvoton_m2354_mcuboot_header_sector_boundary branch from d5690ef to c511827 Compare May 30, 2023 07:28
@0xc0170 0xc0170 added needs: review release-type: patch Indentifies a PR as containing just a patch labels May 30, 2023
@ccli8
Copy link
Contributor Author

ccli8 commented May 30, 2023

About frozen-tools-check failure. This PR changes bootloader header size and post-build script must change accordingly. For Mbed CLI 1, this needs to update frozen python script tools/targets/NU_M2354.py.

@0xc0170
Copy link
Contributor

0xc0170 commented May 30, 2023

I'll need to check what has changed with scancode, it errors with --reindex-licenses not valid argument.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 1, 2023

I created #15430 for license issue fix (once merged, this will need to be rebased)

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 1, 2023

I created #15430 for license issue fix (once merged, this will need to be rebased)

Merged, please rebase

In Mbed Studio, debugging, based on pyOCD, requires Mbed OS application code starting on the sector boundary.

Modification list:
1.  Update TF-M import assets with MCUboot header padding to sector aligned
2.  Following above, change header size argument (-H) in wrapper.py command line
3.  Following below, fix min-write-size (--align) to 4 (per flash_area_align()) in wrapper.py command line
    https://docs.mcuboot.com/design.html#image-trailer

Related issue:
ARMmbed#15417
@ccli8 ccli8 force-pushed the nuvoton_m2354_mcuboot_header_sector_boundary branch from c511827 to 8b69a94 Compare June 2, 2023 01:18
@ccli8
Copy link
Contributor Author

ccli8 commented Jun 2, 2023

Merged, please rebase

Rebase done

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 5, 2023

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 5, 2023

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@saheerb saheerb merged commit 3b07e53 into ARMmbed:master Jun 7, 2023
@ccli8 ccli8 deleted the nuvoton_m2354_mcuboot_header_sector_boundary branch June 8, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: review release-type: patch Indentifies a PR as containing just a patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants