I am using SafeRTOS on the Stellaris LM3S9B96. I know there is a forum for SafeRTOS and LM3S9B96, but I thought the FreeRTOS community would have some insight into my questions.
The macros (portSET_INTERRUPT_MASK(), portCLEAR_INTERRUPT_MASK()) to disable and enable interrupts in portmacro.h “clobbers r0”, as the comments in the code indicate. I have noticed that recent versions of FreeRTOS push r0 on to the stack and pop it off afterwards, hence, r0 is not “clobbered”. Did older versions of FreeRTOS for Cortex-M3 “clobber” r0? Since the macro is a C macro with inline assembler, will “clobbering” r0 interfere with the compiler’s generation of code (I know that the question is slightly dependant on the compiler).
Basically, I am wondering if anyone has some insight to this and whether “clobbering” r0 is known to be an issue. Though I could rewrite the macro in portmacro.h to not “clobber” r0, I am sure the SafeRTOS version burned into ROM must be using the same code and hence “clobbering” r0 already.