Skip to main content
Visitor 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

 

    This topic has been closed for replies.
    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

    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. 

    Graduate II
    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.

    MLigg.1Author
    Visitor II
    February 1, 2024

    The suggested procedure works well. Thanks.

    MLigg.1Author
    Visitor II
    January 24, 2024

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

    Massimo