2022/09/07 16:06
调试状态,跳转后先全速运行,再停下,看PC值。
非调试状态,可以在跳转前后打印信息或者打印当前PC值。
调用__get_PC()获取当前PC值。
#if defined( __GNUC__ ) /* for GCC compiler */
static __inline__ void * __get_PC(void)
{
void *pc;
asm("mov %0, pc" : "=r"(pc));
return pc;
}
#elif defined(__ARMCC_VERSION) /* for Keil compiler */
#define __get_PC __current_pc
#endif