-
Notifications
You must be signed in to change notification settings - Fork 709
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
mcuboot supports the stm32 external flash in XiP mode #2154
base: main
Are you sure you want to change the base?
Conversation
With CONFIG_STM32_MEMMAP flag get NOR flash 32 bytes header Read the NOR flash to get header of the image. The FLASH_DEVICE is now the external NOR defined by the board device tree to be the first qspi/ospi/xspi instance (not necessarily zephyr, flash-controller) Signed-off-by: Francois Ramu <[email protected]>
requires the zephyrproject-rtos/zephyr#82275 which introduces the nucleo_h7s3l8 target |
@FRASTM Any plans to move forward with this PR? some CI issues to be fixed (Primarily caused by missing "Signed-off-by: Francois RAMU [email protected]" in some commits) |
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 had to add CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n CONFIG_BOOT_MAX_IMG_SECTORS=256
to get it working.
With the following memory layout:
/* 128KB sector size */
&flash0 {
partitions {
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(128)>;
};
};
};
/* Sector erase 64KB uniform granularity */
/* Subsector erase 4KB, 32KB granularity */
&mt25ql512ab1 {
status = "okay";
partitions {
slot0_partition: partition@0 {
label = "image-0";
reg = <0x00000000 DT_SIZE_K(2048)>;
};
slot1_partition: partition@200000 {
label = "image-1";
reg = <0x00200000 DT_SIZE_K(2048)>;
};
scratch_partition: partition@400000 {
label = "image-scratch";
reg = <0x00400000 DT_SIZE_K(2048)>;
};
storage_partition: partition@600000 {
label = "storage";
reg = <0x00600000 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.
same for all .dts files, otherwise you can't build a zephyr application for them
*/ | ||
/ { | ||
chosen { | ||
zephyr,flash = &flash0; |
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.
this should be in the board dts in zephyr
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.
it is in each board dts for zephyr, so I think I can remove it from each overlay
correct sign-off |
Define the stm32 disco board configuration to set the STM32 XIP mode that will enable the MemoryMapped mode. See Kconfig of the stm32 soc. Choose the mcu_boot partition where to build ../bootloader/mcuboot/boot/zephyr Signed-off-by: Francois Ramu <[email protected]>
Define the stm32 disco board configuration to set the STM32 XIP mode that will enable the MemoryMapped mode. See Kconfig of the stm32 soc. Choose the mcu_boot partition where to build ../bootloader/mcuboot/boot/zephyr Signed-off-by: Francois Ramu <[email protected]>
Define the overlay for the stm32h7s78 disco kit xpsi peripheral Signed-off-by: Francois Ramu <[email protected]>
Define the stm32 nucleo board configuration to set the STM32 XIP mode that will enable the MemoryMapped mode. See Kconfig of the stm32 soc. Choose the mcu_boot partition where to build ../bootloader/mcuboot/boot/zephyr Signed-off-by: Francois Ramu <[email protected]>
|
||
/ { | ||
chosen { | ||
zephyr,flash = &flash0; |
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.
this whole file shouldn't be needed since flash is already set here: https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/st/nucleo_h7s3l8/nucleo_h7s3l8.dts#L22 and code partition will be applied automatically via app.overlay
|
||
/ { | ||
chosen { | ||
zephyr,code-partition = &boot_partition; |
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.
this file can go, app.overlay already does this
status = "okay"; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; |
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.
this should be in the upstream zephyr board so it's visible to everything
|
||
/ { | ||
chosen { | ||
zephyr,code-partition = &boot_partition; |
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.
as other, can be deleted
|
||
/ { | ||
chosen { | ||
zephyr,code-partition = &boot_partition; |
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.
as other comment for all .overlay files
New version of the old PR #1891
Adding the stm32h7s3l8 nucleo board
Following zephyrproject-rtos/zephyr#76305
Build the application with sysbuild for the nucleo_h7S3L8 :