I am working in STM32F103RBT6, I want to upgrade my bootloader program which i put in 0x08000000~0x08003fff, i use all other flash memory for Application code. Through the RS232, I want to upgrade the bootloader. So i am thinking to copy the code to RAM--> execute the original bootloader in RAM --> Download the New bootloader. What i did is:
startAddr == 0x20000000
NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
JumpAddress = *(__IO UINT32*)(startAddr + 4 );
Jump_To_Application = (pFunction)JumpAddress;
__set_MSP(*(__IO UINT32*) startAddr);
Jump_To_Application();
It doesn't work.
The question is :
Can i just copy the code to 0x20000000~. Should i divide the RAM into Two parts but how?
How can i set my Vector table location, and where can i set it? how can i deal with the "VECT_TAB_OFFSET".
It will be extremely grateful if you can give me some solution or any commands. Thanks a lot.