Hi guys,
I'm trying to write some basic functions to handle the process stack pointer (PSP) and main stack pointer (MSP).
For example,
uint32_t __get_PSP(void)
{
__asm("mrs r0, psp");
__asm("bx lr");
}
then in main I call this function by saying:
uint32_t x = __get_PSP();
The assembler gives me errors, saying the asm lines are using illegal mnemonics, but if I execute the instruction ("mrs r0, psp") in the *main* function I don't get any error. Why is that?