Hi,
Before you jump to App, you should set SP pointer and PC pointer. If the App start address is 0xb000, the SP pointer initial address is 0xb000 and PC pointer initial address is 0xb004.
Please refer to below code.
appEntry =(*(unsigned int*)0xb0004);
appStack = (*(unsigned int*)0xb0000);
static void (*farewellBootloader)(void) = 0;
farewellBootloader = (void (*)(void))appEntry ;
// Set the VTOR to the application vector table address.
SCB->VTOR = 0xb000;
// Set stack pointers to the application stack pointer.
__set_MSP(appStack );
__set_PSP(appStack );
// Jump to the application.
farewellBootloader();
Regards,
Jing