cancel
Showing results for 
Search instead for 
Did you mean: 

Bootloader + XIP Application in External Flash on STM32U5G9J-DK2

ArunJohn
Associate II

Hello everyone,

I’m working with the STM32U5G9J-DK2 and trying to implement a Bootloader + XIP (Execute-In-Place) application architecture using the external flash.

Target setup:

  • A minimal bootloader running from internal flash

  • The main application linked to and executing from external flash (memory-mapped at 0x90000000)

The main motivation is to free internal flash and validate this approach for a future MCU with very limited internal flash.


What I’m specifically looking for help with

  1. Proper CubeMX / .ioc configuration for the bootloader

    • Which peripherals must be enabled (RCC, PWR, ICACHE, OSPI, etc.)

    • Which peripherals should not be enabled to avoid conflicts with the XIP app

    • Any STM32U5-specific gotchas when initializing OSPI for XIP

  2. Proper configuration of the application project

    • Recommended changes to the application .ioc

    • What initialization should be removed from the app (HAL_Init, clock, OSPI, FLASH, etc.)

  3. Reference samples

    • STM32Cube examples that demonstrate a full bootloader + XIP app flow on STM32U5

    • Any internal / unofficial sample projects that ST recommends adapting

I’m mainly looking for end-to-end guidance on how ST recommends structuring and configuring both the bootloader and the application for this use case.

Any pointers, samples, or best-practice recommendations would be greatly appreciated.

Thanks in advance,
AJ

0 REPLIES 0