cancel
Showing results for 
Search instead for 
Did you mean: 

Cube IDE: Relocating program start to make space for a bootloader

DiBosco
Senior II

I've done plenty of bootloaders over the ywars for the STM32 using Crossworks. When I want to set the program to start from a differemt location I simply set a macro in the project properies to the address at which I want the program to reside, then recompile.

How do I do that with the Cube IDE please?

Thanks!

3 REPLIES 3

Would look at the Linker Script (and related linker dialogs), and fix SystemInit() code to set SCB->VTOR correctly, ideally with symbols the linker is already using/generating.

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

I'm not worried about the VTOR, that's a different thing and won't change between IDEs (I don't see why it would anyway). Am happy I know what to do there (famous last words).

I'd pretty much guessed I *might* have to deal with the linker rather than putting a macro statement into the project properties as with Crossworks. However, I'm not sure whether it's as simple as changing:

FLASH (rx)     : ORIGIN = 0x8000000, LENGTH = 1024K

to

FLASH (rx)     : ORIGIN = 0x8008000, LENGTH = 992K

  

As far as Linker dialogues are concerned, if you're talking about Eclipse dialogues, I can see nothing that helps, hence asking.

Yes as simple ;)