2023-12-14 04:22 AM
using stm32ide and a stm32f407 I would like to change the boot address to 0x8000000 to leave the first 4 sectors free from 0x4000 to position the boot at 0x8010000 I made a series of settings (not sufficient).
in flash.ld file change
1) FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 944K
in ram.ld file change
1) FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 944K
in stm32fxx.h
uncomment
#define USER_VECT_TAB_ADDRESS
and
#define VECT_TAB_OFFSET 0x00010000U
but i do'nt know how to programming with STM32IDE and after on STM32programmer option byte from start boot from 0x8010000 mcu not boot
2023-12-14 08:03 AM
In 'F4, you can't change boot address; it's 0x0000'0000 to which FLASH from 0x0800'0000 is remapped (unless you boot from RAM or System memory/bootloader).
The usual thing to do is to write a bootloader into the first sector (i.e. at 0x0800'0000). In your case, it does not need to do anything else but jump to the application, wherever it is located. You may object that it's wasteful to occupy a 16kB sector by a few-bytes long snippet, but it is what it is, in 'F4, this is your only option.
JW
2023-12-14 08:41 AM
That's NOT how the MCU works. It always wants the Vector Table to be at Zero, what's mapped there is the BASE of either the FLASH, RAM or ROM depending on the BOOTx pin settings.
The 0x08000000 starting point is non-negotiable, you will only need two words (SP and PC) to vector off to the Reset Handler, and from there you can change SCB->VTOR to whatever you want for other interrupts and handlers to get fetched from.
2023-12-14 09:11 AM
It's correct!!!!!!!!