-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Describe the bug
Cannot boot an app, that uses LVGL, with MCUBoot from external flash on STM32H750B-DK, but I suspect it is not specific to this board (Although I have not yet tested with another one)
I tested with many other apps that do not use LVGL, and everything works as expected, even apps that use the display.
I tested with all available LVGL samples and tests & had the same problem.
Also, I tested with different MCUBoot modes, SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP
, DSB_CONFIG_MCUBOOT_MODE_SINGLE_APP
..., and with different memory layouts without success.
To Reproduce
Steps to reproduce the behavior:
- If you are reproducing on STM32H750B-DK, apply PR mcuboot supports the stm32 external flash in XiP mode mcu-tools/mcuboot#2154 to MCUBoot module repo (you only need the changes in
boot/zephyr/boards/stm32h750b_dk.conf
,boot/zephyr/boards/stm32h750b_dk.overlay
, andboot/zephyr/flash_map_extended.c
), with the addition ofCONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n CONFIG_BOOT_MAX_IMG_SECTORS=256
instm32h750b_dk.conf
west build -p always -b stm32h750b_dk samples/modules/lvgl/demos --sysbuild -- -DSB_CONFIG_BOOTLOADER_MCUBOOT=y -DSB_CONFIG_MCUBOOT_MODE_SINGLE_APP=y -DCONFIG_FLASH_BASE_ADDRESS=0x90000000
- Add
CONFIG_FLASH=y CONFIG_STM32_MEMMAP=y
to your app'sprj.conf
or instm32h750b_dk.conf
- west flash
Alternatively to step 4, you can use STM32CubeProg GUI, select the MT25TL01G_STM32H750B-DISCO external loader (in External loaders
at the bottom of left side menu) , and then flash MCUBoot's zephyr.hex and app's zephyr.signed.hex
Expected behavior
Boot the app successfully
Impact
Blocking
Logs and console output
*** Booting MCUboot v2.1.0-rc1-185-gb2299b9fbb41 ***
*** Using Zephyr OS build v4.0.0-3669-ge4164963f22a ***
I: Starting bootloader
I: Bootloader chainload address offset: 0x0
I: Image version: v0.0.0
I: Jumping to the first image slot
Environment (please complete the following information):
- OS: Linux
- Toolchain (e.g Zephyr SDK, ...): SDK 0.17.0, default toolchain
- Commit SHA or Version used: main e416496
Additional context
N/A