cancel
Showing results for 
Search instead for 
Did you mean: 

Can the bootloader and application code be in the same CubeIDE project?

OguzhanBalci
Associate III

I have a bootloader project that can jump to a QSPI application under normal conditions. When I first install this application and then install my application that I created separately for QSPI, it works without any problem.(Bootloader + App).
But what I want to do is to combine bootloader and application projects. I tried to add the App code into the Bootloader application with a method like below, but even if the compilation result was successful, the debugger gave an error and I could not load the application to flash.

 

Ekran görüntüsü 2024-05-18 200425.png

 

My App Code
Ekran görüntüsü 2024-05-18 200442.png

Jump Code
Ekran görüntüsü 2024-05-18 200604.png

I've never tried anything like this before. Maybe I'm being ridiculous, sorry.

12 REPLIES 12

If the External Flash Loader is working properly it shouldn't mess with the Internal FLASH.

The caution with the code is that you need to get all the executing code to be in the Internal FLASH up to the point that the External FLASH is mapped into the usable address space.

Otherwise you'll get a Hard Fault

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Not sure how that would break the Internal Flash

You could try this one  https://github.com/cturvey/stm32extldr/blob/main/h7_w25q128/CLIVEONE-W25Q128_STM32H7XX-PB2-PB6-PD11-PD12-PE2-PD13.stldr

 

I'd be suspicious you still have a HORSE-CART issue, most everyone has the HORSE and CART as separate things, and the HORSE goes in front of the CART.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

There is still a problem uploading the code

Ekran görüntüsü 2024-05-21 071755.png

 

Ekran görüntüsü 2024-05-21 071723.png


I used the appropriate external loader from the repo you suggested (it works on its own without any problems)