Dear support,
How can i set the offset of my firmware?
here is what i tried:
on properties page->MSBuild settings->Linker script->Copy to project directory
then i opened it
here is the flash module organization: https://imgur.com/a/z8LJBZY
the default firmware address is started at 0x0800 0000
i want to use the first sector to store user settings and offset the firmware start address to Sector 1 (0x0800 4000)
then i edit the linker script from:
MEMORY
{
FLASH (RX) : ORIGIN = 0x08000000, LENGTH = 1M
SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 128K
CCMRAM (RWX) : ORIGIN = 0x10000000, LENGTH = 64K
}
to:
MEMORY
{
FLASH (RX) : ORIGIN = 0x08004000, LENGTH = 1008K
SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 128K
CCMRAM (RWX) : ORIGIN = 0x10000000, LENGTH = 64K
}
then set the VECT_TAB_OFFSET to 0x4000 in system_stm43f4xx.c file.
after download, i see the firmware is started at address: https://imgur.com/a/elSZ31h
but not started.
when i try to pause, i get frame not in module message, then i view the disassembly, i see this:
https://imgur.com/a/ydFM9gB
but the firmware is at the correct offset:
https://imgur.com/a/EAyG1Tf
and here is the build Output window:
https://imgur.com/a/7Ioy9Z3
at line: Used FLASH: 11KB out of 1024KB (1%) -> why 1024? I set this value in linker script to 1008
Why not start the microcontroller at the setted address?
Best Regards:
ExtSol