Skip to content

Cannot boot LVGL apps from external QSPI Flash with MCUBoot #84395

@JarmouniA

Description

@JarmouniA

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:

  1. 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, and boot/zephyr/flash_map_extended.c), with the addition of CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n CONFIG_BOOT_MAX_IMG_SECTORS=256 in stm32h750b_dk.conf
  2. 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
  3. Add CONFIG_FLASH=y CONFIG_STM32_MEMMAP=y to your app's prj.conf or in stm32h750b_dk.conf
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: LVGLLight and Versatile Graphics Library Supportarea: MCUBootbugThe issue is a bug, or the PR is fixing a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions