-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the bug
MCUboot External Flash Support Issue for STM32H750B-DK
Summary
I'm experiencing issues with MCUboot external flash configuration when using the samples/sysbuild/with_mcuboot
example on the STM32H750B-DK board. The application image is not being linked to the external QSPI flash memory-mapped address (0x90000000) as expected.
Environment
- Zephyr Version: [Current version]
- Board: stm32h750b_dk
- Sample: samples/sysbuild/with_mcuboot
Build Command
west build -b stm32h750b_dk --sysbuild samples/sysbuild/with_mcuboot
Issue Description
Build Warnings
During the MCUboot compilation, I'm getting multiple warnings indicating that MCUboot cannot determine the flash parameters for external partitions:
CMake Warning at CMakeLists.txt:374 (message):
WARNING: Using default MCUboot signing key file, this file is for debug use
only and is not secure!
CMake Warning at CMakeLists.txt:521 (message):
Unable to determine erase size of slot0 partition, cannot calculate minimum
sector usage
CMake Warning at CMakeLists.txt:530 (message):
Unable to determine erase size of slot1 partition, cannot calculate minimum
sector usage
CMake Warning at CMakeLists.txt:544 (message):
Unable to calculate minimum number of sector sizes, falling back to 128
sector default. Please disable CONFIG_BOOT_MAX_IMG_SECTORS_AUTO and set
CONFIG_BOOT_MAX_IMG_SECTORS to the required value
CMake Warning at CMakeLists.txt:608 (message):
Unable to determine erase size of slot0 or slot1 partition, setting to 1
(this is probably wrong)
CMake Warning at CMakeLists.txt:613 (message):
Unable to determine write size of slot0 or slot1 partition, setting to 8
(this is probably wrong)
Incorrect Link Address
The generated application firmware (zephyr/build/with_mcuboot/zephyr/zephyr.signed.hex
) shows the following header:
:020000040800F2
:100000003DB8F3960000000000040000FC49000029
:1000100000000000000000000000000000000000E0
:1000200000000000000000000000000000000000D0
The extended linear address record :020000040800F2
indicates that the application is being linked to internal flash (0x08000000) instead of the expected QSPI flash memory-mapped address (0x90000000).
Expected Behavior
For STM32H750B-DK, which has limited internal flash (128KB), the application images should be:
- MCUboot bootloader: Internal flash (0x08000000)
- Application images (slot0/slot1): External QSPI flash (0x90000000)
The hex file should show an extended linear address record like :020000049000XX
for the application.
Hardware Configuration
STM32H750B-DK features:
- Internal Flash: 128KB (only suitable for bootloader)
- Memory Mapping: QSPI flash mapped to 0x90000000-0x91FFFFFF
Questions
- Is this a known limitation with the current STM32H750B-DK board configuration in the SDK?
- Are there additional configuration steps required to enable external flash for application images?
- Should the board's device tree be updated to properly support MCUboot with external flash?
Regression
- This is a regression.
Steps to reproduce
No response
Relevant log output
Impact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
No response
Additional Context
No response