Hi, how can i set program counter from variable in C code?
void func(void) { uint32_t XADDR; XADDR = __current_pc(); ... // need set PC from XADDR // msr pc, XADDR not compiled }
Thanks in advance
You might not be able to do it in C. You can do it from C. Keil manage it somehow with their RTX. Looks like they use the __asm keyword to take full control. You can look at the source code in \ARM\RL\RTX\SRC\CM\HAL_CM1.c for example.
You must be careful.