Hi,
Step 1: We flashed the application in external flash at address 0x60400000 using the Jflash tool. (This application doesn't have fcb sections, only it contains IVT table and other general sections.)
In our application, the linker file we pointed the address of external flash starts at 0x60400000.
First step in bootloader we just init the external flash (referred in flexspi_nor_polling_transfer.c), then
use the code to start our app from bootloader using the below code
#define VECTOR_ADDR 0x60400000
uint32_t appEntry = *(uint32_t*)(VECTOR_ADDR + 4u);
uint32_t appStack = *(uint32_t*)(VECTOR_ADDR);
static void (*jump_to_application)(void);
static uint32_t stack_pointer;
jump_to_application = (void (*)(void))appEntry;
stack_pointer = (uint32_t)appStack;
SCB->VTOR = VECTOR_ADDR;
__set_MSP(stack_pointer);
__set_PSP(stack_pointer);
PRINTF("\r\n Jumping to application \r\n");
jump_to_application();
But using the external flash application it doesn't booting, but if I flash the application in internal flash (qspi) and it gets booting up. For external flash we feel we need something to boot up in XIP mode.
Note : our application linker file is just a simple one(no other sections)
For your i'm attaching the file here.