cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746IGT: Booting from FLASH Sector 4

keaven
Associate II
Posted on September 10, 2015 at 23:46

Hello all,

I am looking how I can flash my firmware to sector 4 (0x0802 0000) and jump to it to execute the code.  I am using Keil uVision 5 as development environment.

I know that I must changed the address in the option byte but not sure how I can do it in the UI.

Anyone has already done it?

#stm32f7-startup-flash
2 REPLIES 2
Posted on September 14, 2015 at 17:19

Hi Keaven,

For booting from sector 4 of the flash: 1-Modify the linker file by putting the address of sector 4

LR_IROM1 0x08020000 0x00100000 { ; load region size_region 
ER_IROM1 0x08020000 0x00100000 { ; load address = execution address

-Choose the option byte that defines the boot memory base address , BOOT_ADD0 or BOOT_ADD1 by setting MEM_BOOT field of SYSCFG_MEMRMP register (section 7.2.1 of RM0385) -Using ST-Link Utility, configure the chosen option byte by putting the value 0x2008 in it (this value correspond to address[29:14]- section 3.4.1 of RM0385) -Develop your code, and when you load it the boot will be executed in sector 4. -Shahrzad-
keaven
Associate II
Posted on September 17, 2015 at 23:08

I ended up doing almost like you suggest.  The only difference is that I used an assembly file to configure the option bytes and load it with my project.  I am using our own board with STM32F7 cores  and cannot use st-link utility software with an ulink-pro.

Thank you Shahrzad for giving me pointers to find my way out.