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
Jack3
Senior III

Thank you so much! That all makes sense, and it finally works!
FSBL needed some tweaks, and I added extmem and bsec.
As always, I organized the project using pairs of .c/.h files.
Thanks again!

Update: For anyone interested:
https://github.com/AngryCarrot61/STM32N6570-DK_004

Please remember: don't generate code using the IOC file, as this will destroy the FSBL!
Save it with a different name first (if you want to experiment).