Skip to main content
DiBosco
Senior
May 25, 2021
Question

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

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!

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
May 25, 2021

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
DiBosco
DiBoscoAuthor
Senior
May 25, 2021

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.

MM..1
Super User
May 25, 2021

Yes as simple ;)