#ifdef __ARMCC_VERSION
__asm __INLINE __set_SP(uint32_t _sp)
{
MSR MSP, r0
BX lr
}
#endif
__INLINE void BranchTo(uint32_t u32Address)
{
FUNC_PTR *func;
FMC_SetVectorPageAddr(u32Address);
func = (FUNC_PTR *)(*(uint32_t *)(u32Address + 4));
printf("branch to address 0x%x\n", (int)func);
printf("\n\nChange VECMAP and branch to user application...\n");
while(!IsDebugFifoEmpty());
__set_SP(*(uint32_t *)u32Address);
func();
}
请问 __set_SP(*(uint32_t *)u32Address);有啥作用? 可以不要嘛?
|