cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F769 - Changing program start from 0x08000000 to 0x08020000

Anand A
Associate III

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

4 REPLIES 4

__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.

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

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

Hrishikesh
Senior

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 A
Associate III

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