Skip to main content
Visitor II
February 3, 2021
Question

STM32F769 - Changing program start from 0x08000000 to 0x08020000

  • February 3, 2021
  • 4 replies
  • 1255 views

Hello,

I am trying to change program start address in STM32F769 controller.

I want to start program from 0x08020000 instead of 0x08000000 for special use case in our application.

I see in c startup __iar_program_start, how do i point this to 0x08020000.

Could some one help me on this.

Thanks

AnanD

    This topic has been closed for replies.

    4 replies

    Graduate II
    February 3, 2021

    __iar_program_start initializes the run-time environment before transferring control to main(), typically you wouldn't put "code" at 0x08020000 but rather a Vector Table pointing at the code, interrupts, etc.

    To change the address basis, you'd change it in the .ICF or UI, and also in SystemInit() with respect to how it sets the SCB->VTOR to the basis you have chosen.

    Anand AAuthor
    Visitor II
    February 4, 2021

    thank you for the information, it is working for me.

    Visitor II
    February 4, 2021

    There is a DFU labs video that kind of shows how to do this. Its for DFU but the concept is similar to what you are trying to achieve.

    Anand AAuthor
    Visitor II
    February 4, 2021

    Hello Tesla Delorean

    The changes are working in debug mode but in normal operation after reset the code is not running.

    Linker changes which i made is given below.

    define symbol __ICFEDIT_intvec_start__ = 0x08020000;

    define symbol __ICFEDIT_region_ROM_start__    = 0x08020000;

    define symbol __ICFEDIT_region_ROM_end__      = 0x0803FFFF;

    and in systeminit SCB->VTOR changed as below.

    SCB->VTOR = 0x08020000;

    is everything right here or Am i missing something?

    Regards

    AnanD