Linker prolem with bootloader
I have to build an application that will be in the flash memory with a custom bootloader (no source available, but is built with Keil).
The bootloader resides @0x8000000 and after performing some operations, will jump to a specific address (0x8030000).
I thought to move the application start address to 0x8030000, so I followed this steps (in main.c file):
3) Interrupt Vector remap (I copy g_pfnVectors into a variable, disable irq, make SCB->VTOR poit to the variable, re-enable irq)
The linker script I used looks like this:
bootloader (rx) : ORIGIN = 0x08000000, LENGTH = 192K
flash (rx) : ORIGIN = 0x08030000, LENGTH = 2048K - 192K
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 192K
while the sections like this:
. = ALIGN(4);
. = ALIGN(4);
/* Reset and ISR vectors */
isr_vector_start = .;
However when the binary is loaded, it meets an hard fault and it does not start.
The generation of the elf file is successful and the map file seems correct (also using objdump).
Am I doing something wrong? Could you please help me?
I'm building the application with Eclipse + SW4STM32 and Ac6. The application has been created starting from source code automatically generated with STM32CubeMX for the micro - STM32F429 (with 2MB of Flash).
Can you help with this problem?
Provide an answer of your own, or ask Fred Diete for more information if necessary.