Skip to main content
MLigg.1
Associate II
January 23, 2024
Solved

Flash relocatable entry point address

  • January 23, 2024
  • 3 replies
  • 1556 views

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

 

Best answer by Tesla DeLorean

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.

3 replies

TDK
Super User
January 23, 2024

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""."
Tesla DeLorean
Guru
January 23, 2024

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 VenmoUp vote any posts that you find helpful, it shows what's working..
MLigg.1
MLigg.1Author
Associate II
February 1, 2024

The suggested procedure works well. Thanks.

MLigg.1
MLigg.1Author
Associate II
January 24, 2024

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

Massimo