-
Notifications
You must be signed in to change notification settings - Fork 8.3k
boards: stm32h7s78_dk: Introduce App in Ext Flash variant #97992
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: stm32h7s78_dk: Introduce App in Ext Flash variant #97992
Conversation
|
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. |
dae3619 to
1ddea9e
Compare
1ddea9e to
8251c15
Compare
| compatible = "soc-nv-flash"; | ||
| reg = <0x0 DT_SIZE_M(128)>; | ||
| write-block-size = <1>; | ||
| erase-block-size = <DT_SIZE_K(128)>; |
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(128)>; | |
| erase-block-size = <DT_SIZE_K(4)>; |
lowest as possible, see #97037 (comment)
| choice MCUBOOT_MODE | ||
| default MCUBOOT_MODE_DIRECT_XIP | ||
| endchoice |
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.
also use MCUBOOT_MODE_SWAP_USING_OFFSET like in #97037 ?
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.
For some reason, MCUBOOT_MODE_SWAP_USING_OFFSET prevents building mcuboot image as it has an impact on following parameters (build/stm32h7s78_dk/stm32h7s7xx/ext_app_flash/mcubootCMakeCache.txt)
//Estimated MCUboot image trailer size
mcuboot_image_footer_size:INTERNAL=32808
//Estimated MCUboot update image trailer size
mcuboot_image_upgrade_footer_size:INTERNAL=32768
vs (SINGLE_APP_MODE & DIRECT_XIP)
//Estimated MCUboot image trailer size
mcuboot_image_footer_size:INTERNAL=88
//Estimated MCUboot update image trailer size
mcuboot_image_upgrade_footer_size:INTERNAL=48
As a consequence, this doesn't fit available RAM anymore.
Note that it is the same on stm32h750_dk because it can afford it:
Memory region Used Size Region Size %age Used
FLASH: 34568 B 128 KB 26.37%
RAM: 138304 B 512 KB 26.38%
but also trailers size are lower:
//Estimated MCUboot image trailer size
mcuboot_image_footer_size:INTERNAL=16424
//Estimated MCUboot update image trailer size
mcuboot_image_upgrade_footer_size:INTERNAL=16384
(Anyway, in any case, this wouldn't fit on stm32h7s78_dk which has only 128k of RAM)
I'll go for SINGLE_APP_MODE for now, but there is probably something to investigate 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.
The ammount of sectors in slot0 and slot1 has a direct influence in mcuboot size, as it uses that for the size of an array. would propably work, if we make the flash driver respect the value from the dt prop erase-block-size, so it can be used to increase it.
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.
but that's for later
JarmouniA
left a comment
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.
There are other MCUboot tests the board can be added to (see the H750B-DK PR).
| reg = <0x70000000 DT_SIZE_M(64)>; | ||
| zephyr,memory-region = "EXTMEM"; | ||
| /* The ATTR_MPU_EXTMEM attribut causing a MPU FAULT */ | ||
| zephyr,memory-attr = <DT_MEM_ARM(ATTR_MPU_IO)>; |
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 test samples/modules/lvgl/demos? On H750B-DK, it didn't work with MPU_IO (but worked with MPU_FLASH). On H573I-DK it did work (& with MPU_FLASH the board didn't boot), not sure why yet.
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.
Display related features are not working yet when executed from external flash. Probably due to STM32_LTDC_FB_USE_SHARED_MULTI_HEAP, had no time to investigate this (likely related to use of multiple XSPI instances used in //)
Is everyone fine to put this as a notable issue that can still be investigated and fixed in RC ?
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.
Display related features are not working yet
Weird, even samples/drivers/display?
Non-blocking, but could you try with MPU_FLASH attribute?
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.
Is everyone fine to put this as a notable issue that can still be investigated and fixed in RC ?
Makes sense.
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.
MPU_FLASH should be the correct configuration, as MPU_IO does not allow unaligned memory access. Would be interesting to find out, why the H573I-DK didn't boot with that configuration.
I fixed getting mem faults on the nucleo_h7s3l8 by setting the ext_flash to MPU_FLASH - see #99505 point 6
4c675de to
0669808
Compare
Add ext_flash_app variant to stm32h7s78_dk to allow building application running on ext flash. Largely based on A.Jarmouni's work to enable the same on stm32h750_dk in PR 97037. Signed-off-by: Erwan Gouriou <[email protected]>
…iant Now that ext_flash_app variant is available, it should be used for mcuboot related apps on this board. Signed-off-by: Erwan Gouriou <[email protected]>
Add debug using stlink gdbserver as an alternative to pyocd. Signed-off-by: Erwan Gouriou <[email protected]>
Actual available internal RAM size was wrong, fix it. Signed-off-by: Erwan Gouriou <[email protected]>
0669808 to
1e20348
Compare
etienne-lms
left a comment
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
|
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>
Add ext_flash_app variant to nucleo_h7s3l8 to allow building applications running on ext flash. Based on Erwan Gouriou's work on stm32h7s78_dk in PR zephyrproject-rtos#97992 (which is based on A.Jarmouni's work on stm32h750_dk in PR 97037). Signed-off-by: Thomas Decker <[email protected]>



Based on #97037
Similarly to what is done for
stm32h750_dkboard in #97037, introduce aext_flash_appboard variant aiming at being chainloaded by MCUBoot.Requires mcuboot counter part (mcu-tools/mcuboot#2510) to allow MCUBoot to run on internal flash.
Doc not provided, waiting for #97037 to be merged.
@JarmouniA, in a fisrst step, I plan to redirect doc to
stm32h750_dkto avoid redundant doc in each board.