I'm using KBoot 1.2.0 sample project for the FRDM-K64F on my FRDM-K64F.
I am working on editing kboot to launch between two applications at 2 different addresses.
I can boot to the default location, but not the 2nd. I'm missing something here, but I am not sure what.
//! @brief Pointer to the bootloader vector table, which is always at address 0. APP_VECTOR_TABLE = ((uint32_t *)kDefaultVectorTableAddress)
This works for the default app location of 0xA000.
When sw2 is active, I change my application address from 0x0000A000 to 0x0002A000, the location of my second app.
Both App1 and App2 are in flash memory and are not interfering with each other in flash.
My Problem, I think, happens here when trying to boot to the other application
// Set the VTOR to the application vector table address. SCB->VTOR = (uint32_t)APP_VECTOR_TABLE; // Set stack pointers to the application stack pointer. __set_MSP(s_stackPointer); __set_PSP(s_stackPointer);
I have a feeling APP_VECTOR_TABLE needs to reflect my application's vector table.
Also, BL_TARGET_FLASH is defined in the preprocessor but I don't see the #if statements responding correctly.