STM32F769 - Changing program start from 0x08000000 to 0x08020000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-03 5:59 AM
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
- Labels:
-
Bootloader
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-03 6:08 AM
__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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-03 9:12 PM
thank you for the information, it is working for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-03 9:17 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-02-03 11:48 PM
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
