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

boards: frdm_mcxn947: Fix MCUBoot support. #73229

Merged

Conversation

butok
Copy link
Contributor

@butok butok commented May 23, 2024

  • Set MCUBoot "upgrade only" method, as the program size is 128B (>32B).
  • Set slot sizes to the same value, required by the MCUBoot "upgrade only" method.

danieldegrasse
danieldegrasse previously approved these changes May 23, 2024
Copy link
Collaborator

@danieldegrasse danieldegrasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set MCUBoot "upgrade only" method, as the program size is 128B (>32B).

Just to be clear, this is a case similar to the LPC55Sxx flash where the program size alignment is too large for MCUBoot to support swapping with upgrades?

- Set MCUBoot "upgrade only" method,
  as the program size is 128B (>32B).
- Set slot sizes to the same value,
  required by the MCUBoot "upgrade only" method.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
@butok
Copy link
Contributor Author

butok commented May 23, 2024

Set MCUBoot "upgrade only" method, as the program size is 128B (>32B).

Just to be clear, this is a case similar to the LPC55Sxx flash where the program size alignment is too large for MCUBoot to support swapping with upgrades?

Yes, this is the same case.

@mmahadevan108
Copy link
Collaborator

@butok , this flash supports 16 bytes write. Why do we need this change?

Copy link
Collaborator

@mmahadevan108 mmahadevan108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need clarification on this change.

@butok
Copy link
Contributor Author

butok commented May 24, 2024

@butok , this flash supports 16 bytes write. Why do we need this change?

Hi @mmahadevan108

The MCXN947 FLASH ROM API used by the Zephyr Flash driver does not support 16 byte writes.
It supports 128Bytes only (page size) checked by me on practiced and confirmed by the RM documentation.
That is why the MCUBoot firmware update does not work now. Also, it means that nobody tests FLASH and MCUBoot functionality for NPIs!
BTW: I have heard that the ROM API was fixed for MCXA,

@butok
Copy link
Contributor Author

butok commented May 27, 2024

Need clarification on this change.

Hi @mmahadevan108
BTW FYI:
(3Jan25) before the PR submit, I asked the SDK team to implement a "[MCXNx4x] Flash Memory Unit (FMU) Driver". Once it's ready, we'll be able to add a workaround (not via the Flash ROM API) to support the 16-byte programming . So far, we have to live with 128 bytes.

@butok butok requested a review from mmahadevan108 May 28, 2024 06:25
@carlescufi carlescufi merged commit 16470ad into zephyrproject-rtos:main May 29, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants