I’ve implemented a logging scheme that logs errors to a serial terminal. Some of these come from trace hook macros like Ques Send Failed and such - mostly I’ve just implemented macros for failure conditions. Since then, I’ve had endless trouble with my app crashing, typically by ending up trying to run code located at 0x0. It finally occurred to me that requesting service from the kernel like QueSend() to place characters into the serial transmit queue might be a bad idea. (Duh.) And, forcing my Log() function to return before doing anything does indeed cause my app to go back to running OK.
So, can I call kernel services from within these macros? Or is my problem (possibly) that some of these macros are called within IRQ (or, since it’s an Ateml AVR32 UC3A0512) or the Supervisor exception context?