-
Notifications
You must be signed in to change notification settings - Fork 8.1k
boards: st: stm32h573i_dk: Add board variant for app in external flash #97678
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
base: main
Are you sure you want to change the base?
Conversation
41f5657
to
152ff6c
Compare
You are right, I missed that, currently it places mcuboot in external flash, so a overlay is necessary for mcuboot.
|
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 overall looks good to me and is more consistent regarding the board initial layout.
For commit "boards: st: stm32h573i_dk: Add board variant for app in external flash":
Would it be worth to add an entry in the board doc to mention the new variant?
For commit "mgmt: hawkbit: Replace overlay with new board variant":
Could you prefix the commit message header line with samples:
?
boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ext_flash_app.dts
Outdated
Show resolved
Hide resolved
boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ext_flash_app.dts
Outdated
Show resolved
Hide resolved
152ff6c
to
96a7604
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
172518b
to
2561112
Compare
boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ext_flash_app.dts
Outdated
Show resolved
Hide resolved
boards/st/stm32h573i_dk/stm32h573i_dk_stm32h573xx_ext_flash_app_defconfig
Outdated
Show resolved
Hide resolved
if BOARD_STM32H573I_DK_STM32H573XX_EXT_FLASH_APP | ||
|
||
choice MCUBOOT_MODE | ||
default MCUBOOT_MODE_DIRECT_XIP |
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.
I'm OK with boards using different defaults for the mode, sure some other features might not be compatible with a specific configuration but that's just how those features are, direct-xip is a valid supported MCUboot mode and fine for any board to use (by default or otherwise)
2561112
to
654e8cd
Compare
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.
Can you please rework the 2 commits concerning the board, put everything concerning the base variant (with the common dtsi) in a 1st commit which builds and runs correctly with & without MCUboot. Then, introduce the ext_flash_app variant in a 2nd commit.
The motivation for having the two commits like this was that current main is external flash only, so splitting it into first commit internal flash, second commit external flash, would require reverting some changes and re-introduce at the same time the old layout from 4.2 which used internal flash and then in second commit re-apply the changes from master to have external flash. |
I don't see an issue with that. You can also just put everything (board-related) is one commit (and detail all the changes & the reasoning behind them in the commit message). FYI, a commit is required to build & run correctly without the following one(s). See the 7th point https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements |
654e8cd
to
0c01bea
Compare
0c01bea
to
91c3987
Compare
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.
Single App mode does not support image upgrade.
91c3987
to
a6736b2
Compare
compatible = "soc-nv-flash"; | ||
reg = <0x0 DT_SIZE_M(64)>; | ||
write-block-size = <1>; | ||
erase-block-size = <DT_SIZE_K(64)>; |
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.
erase-block-size = <DT_SIZE_K(64)>; | |
erase-block-size = <DT_SIZE_K(4)>; |
should be the smallest supported
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.
See #97037 (comment)
It should probably also fix the swap modes, meaning we can get rid of the default. But I have to verify this tomorrow on my dev board
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.
@tpambor I switched H750B-DK to swap-using-offset after fixing the erase-block-size (which fixed all swap modes), up to you if you want to do the same here.
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.
Just do it like in the other PR, but add both variants to the hawkbit sample 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.
Yes, now it boots here also in swap mode. I kept both variants for the hawkbit sample.
a6736b2
to
63c9afe
Compare
|
Restore old internal flash layout as default and make app in external flash a new board variant Switch mcuboot to use swap mode and remove the no longer required scratch partitions from the internal and external flash layout. Introduce a 'soc-nv-flash' node in the stm32h573i_dk board DTS file to define the external flash memory parameters used for MCUBoot integration. This way BOOT_MAX_IMG_SECTORS_AUTO can be used to automatically calculate the maximum number of image sectors based on the actual external flash configuration. Signed-off-by: Tim Pambor <[email protected]>
Replace overlay for stm32h573i_dk with new board variant designed to run from external flash. Signed-off-by: Tim Pambor <[email protected]>
Replace overlay for stm32h573i_dk with new board variant designed to run in external flash. Keep stm32h573i_dk as it also can run mcuboot. Signed-off-by: Tim Pambor <[email protected]>
Add stm32h573i_dk and the ext_flash_app board to the allowed boards for the mcuboot tests. Signed-off-by: Tim Pambor <[email protected]>
63c9afe
to
51fb7c3
Compare
Commit 5d0306c of #88579 moved the
slot0_partition
,slot1_partition
,scratch_partition
from the internal flash to the external OSPI NOR flash. At the same time, thenor
partition on the external NOR flash was deleted. This breaks all applications that rely on theslot0_partition
,slot1_partition
,scratch_partition
to be on internal flash as well as all applications that use thenor
partition on external flash with thestm32h573i_dk
board.To avoid breaking existing projects and maintain compatibility with previous versions of Zephyr, this PR restores the default flash layout and introduces a new board variant for applications stored in external flash. This approach allows users to opt-in to the new flash layout without affecting existing projects.
A similar
ext_flash_app
variant is proposed for the STM32H750B-DK in #97037.Fixes #97423.