Hello,
I have a question to the memory allocation in the STM32F429, I work with µVision5 and the MDK-ARM Cortex-M Compiler. At the moment I work with the standard values, so code specially the vector table starts at 0x08000000. This is specified in the options dialog where 0x08000000 is defined as start address with the size of 2MB.
So now I want to use memory sections 0 to 4 as data sections and want to start the programm at sector 5 which is the first with 128kB.
When I change the value in the options dialog to adress 0x08020000 with the size of 0x1E0000, the programm is not executed, so I changed two defines in the header-files (Start address of vector table and of the flash memory to 0x08000000.
I read about, that I should leave the vector table in sector 0 and move the code to sector 5 and use sector 1 to 4 for data values (eeprom emulation).
Is that what I read right? How should I manage the memory allocation in my case? Do I have to make some changes in code for example load the vector table to a definite memory region?
Thanks for all help.
Regards
You changed the address the linker builds the code at, the processor is still going to try to vector through a table it thinks is at 0x08000000 (technically mapped at zero)
You need a vector table, and perhaps start up code, at the base of the flash. This could be a simple boot-loader that resides in the first 16KB and transfers control to you application code at 0x08020000. When your app code runs, it should modify the vector table address (SCB->VTOR) to the new base of 0x08020000. Review the SystemInit() code in system_stm32f4xx.c