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: stm: nucleo_h723zg: added flash partition to work with mcuboot #75490

Closed
wants to merge 1 commit into from

Conversation

thomasbouston
Copy link

@thomasbouston thomasbouston commented Jul 5, 2024

Closes #75425
Add a partition for flash memory as follows:

  • boot_partition: 128k
  • slot0_partition: 384k
  • slot1_partition: 384k
  • storage_partition: 128k

@thomasbouston thomasbouston marked this pull request as ready for review July 5, 2024 09:35
@zephyrbot zephyrbot added the platform: STM32 ST Micro STM32 label Jul 5, 2024
@erwango erwango added this to the v4.0.0 milestone Jul 5, 2024
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution.

See comment about swap slot.
Also, it might be nice to add a storage slot while you're at it.

For next time: Please don't name the branch you contribute main. This can cause odd conflicts with zephyr CI.

Comment on lines 220 to 223
/* swap slot: 128KB */
scratch_partition: partition@e0000 {
label = "image-scratch";
reg = <0x000e0000 DT_SIZE_K(128)>;
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking:
Scratch partition is no more required as a BOOT_SWAP_USING_MOVE option is available in MCUBoot which will be used by default if scratch partition is not present.
This has the benefit of providing more space to application and limit this sector wear out.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for reviewing.
If you think that would be more useful, I can replace the scratch partition with a storage partition of the same size.

@ajarmouni-st
Copy link
Collaborator

Hi @thomasbouston You don't have to open a new PR every time you want to make changes, just amend your commit & then force push on the same branch & changes will appear in the PR.

@ajarmouni-st
Copy link
Collaborator

ajarmouni-st commented Jul 5, 2024

@thomasbouston Also, I don't know why you have a merge commit in your PR, & changes should be done in the 1st commit.
You can correct things by rebasing in interactive mode git rebase -i HEAD~3,a file will open in ure default editor, replace pick that precedes each commit in the file with: edit for the 1st one, drop for the 2nd & 3rd. Save the file & close it, make your changes, git add *, git commit - -amend, git rebase --continue, & finally git push [ure_zephyr_fork_remote_name] -f

Added code partitioning for ST Nucleo H723ZG board.
Defined flash partitions including "mcuboot," "image-0,", "image-1"
and "storage".

Signed-off-by: Thomas Bouston <[email protected]>
@thomasbouston
Copy link
Author

@thomasbouston Also, I don't know why you have a merge commit in your PR, & changes should be done in the 1st commit. You can correct things by rebasing in interactive mode git rebase -i HEAD~3,a file will open in ure default editor, replace pick that precedes each commit in the file with: edit for the 1st one, drop for the 2nd & 3rd. Save the file & close it, make your changes, git add *, git commit - -amend, git rebase --continue, & finally git push [ure_zephyr_fork_remote_name] -f

Hi, I have to admit I'm pretty new to using git, so thank you very much for your advice.
I did what you suggested but there always seems to be a problem and I don't really understand why the tests fail. Could you please help me again?

@erwango
Copy link
Member

erwango commented Jul 30, 2024

I did what you suggested but there always seems to be a problem and I don't really understand why the tests fail. Could you please help me again?

Not sure what is going on, but as I said using branch name "main" can lead to strange issues.
I suggest to open a new PR using another branch name (unless you can change directly in this PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nucleo H723ZG : add a flash memory partition to use MCUboot
5 participants