Implementation of bootloader and application in memory space
I am attempting to integrate a bootloader and an application into my stm32f7 mcu. I understand this has been done numerous times previously, so apologies for probably small questions leading to larger ones.
I am running into issues on the jump function between my bootloader (located at 0x08000000) to the application firmware (located at 0x0800FA00). The bootloader occupies two sectors of memory, and the firmware the remaining 8, in single bank memory mode. When i attempt to jump between the bootloader and the application, I would assume I would jump to memory address 0x0800FA00 + 4, which is the offset from the top of the application, but that does not seem to be successful. Prior to this jump, I map the interrupt vector to 0x0800FA00. (code snippet below)
//Jump function
void Bootloader_JumpToApplication(void)
{
pFunction appEntry;
uint32_t appStack;
appStack = (uint32_t) *((__IO uint32_t *) APPLICATION_ADDRESS);
appEntry = (pFunction) *(__IO uint32_t *) (APPLICATION_ADDRESS + 4);
SCB->VTOR = APPLICATION_ADDRESS;
__set_MSP(appStack);
appEntry();
}I guess my initial question is assuming I place the application and the bootloader in the aformented spaces in memory (which I am positive I am doing), is there something I am missing on the jump function? Should I be going to a different place in memory on the jump? A secondary question is if I just wanted to test my application firmware at 0x0800FA00 without something at the top of flash, is this possible? I dont think it is, but I wanted to confirm.
Thank you!
