Hi,
I am using below code to jump to application, but it throws some errors. Please help in resolving these errors.
void
CallApplication(uint_fast32_t ui32StartAddr)
{
//
// Set the vector table to the beginning of the app in flash.
//
HWREG(NVIC_VTABLE) = ui32StartAddr;
//
// Load the stack pointer from the application's vector table.
//
__asm("ldr r1, [r0]\n"
"mov sp, r1\n");
//
// Load the initial PC from the application's vector table and branch to
// the application's entry point.
//
__asm(" ldr r0, [r0, #4]\n"
" bx r0\n");
}
ERRORs:
error: #549: variable "R0" is used before its value is set
error: #20: identifier "sp" is undefined
error: #1084: This instruction not permitted in inline assembler