cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX how to create an STM32N6 project FSBL and Appl in external flash using XiP

Jack3
Senior III

Hello, superhero MCU fans.

I'm trying to create an STM32N6 project with two projects: FSBL and Appl in its simplest form.
Both will live in external flash.

The FSBL should start Appl in XiP mode, and that Appl should only blink an LED (Hello World) for now.

Of course, I signed the bin files, used the correct EL in STM32CubeProgrammer, and flashed the FSBL to 0x7000000 and the Appl to 0x70100000.

I think it looks a lot like the JPEG_DecodingFromOSPI_DMA example, which works just fine!

However, I have no idea how it can be created in STM32CubeMX.

For example, the example has a "extmem.c" file, but CubeMX isn't generating it. I think there's a problem.

So, with STM32CubeMX 6.15.0, I couldn't generate a project where FSBL could launch Appl. The FSBL can blink an LED, but it apparently can't launch the APPL. I'm sure I'm doing it wrong, but I'm new to this and couldn't find a tutorial.
It may have to do with the default protection mode.
I attached the ioc file.

What do I need to do to get this working?
Thank you very much for helping.

1 REPLY 1
prosacco478
Associate

CubeMX won’t automatically create everything needed for running an app from external flash. You need to add the code to initialize the flash, make sure your application knows it starts at the external flash address, and then have the FSBL jump to it.

Also, check that chip protections aren’t blocking execution. Test the FSBL and application separately first, then combine them. Once that’s done, the FSBL should launch the application and your LED blink will work.