cancel
Showing results for 
Search instead for 
Did you mean: 

Flash relocatable entry point address

MLigg.1
Associate II

Hi, i'm moving from IAR to STM32CubeIDE all my projects based on STM32 microcontrollers. On IAR i modified the entry point of the project from 0x8000000 to 0x8008000. How may do same modify on CubeIDE? Thanks.

Massimo Liggio

 

1 ACCEPTED SOLUTION

Accepted Solutions

Check also how SCB->VTOR is set in SystemInit(), really needs to point to symbol gfnVectors, or whatever symbol you have for the vector table in startup.s so it follows the settings/placements determined by the linker and its script.

You can also copy the vectors into RAM, and point at that, if you want to change or "relocate" them. The table for most STM32 needs to be on a 512-byte boundary, depending on size of table the MCU uses.

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

View solution in original post

4 REPLIES 4
TDK
Guru

Go into the linker script (*.ld file) and there will be a line like this:

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

Change it to what you want. 

If you feel a post has answered your question, please click "Accept as Solution".

Check also how SCB->VTOR is set in SystemInit(), really needs to point to symbol gfnVectors, or whatever symbol you have for the vector table in startup.s so it follows the settings/placements determined by the linker and its script.

You can also copy the vectors into RAM, and point at that, if you want to change or "relocate" them. The table for most STM32 needs to be on a 512-byte boundary, depending on size of table the MCU uses.

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

thanks for your hints, but it doesn't work yet. I will check step by step what happens...

Massimo

 

The suggested procedure works well. Thanks.