According to Microchip ducumentation, while using interrupts, the compiler (MCC18 v3.0 and higher), automatically saves the resources that are modified within the ISR. But if a function is called from the ISR, the compiler does not know what is being modified in the function, so it plays conservatively and saves all of the compiler managed resources, including 11 registers, temp_data and MATH_DATA sections. This context saving extends the interrupted task’s stack size very much.
It is possible to exclude some registers from saving by using the “nosave” clause.
So my question is, what are registers that should be saved while calling FreeRTOS safe API funtion such as vTaskNotifyGiveFromISR or xQueueSendFromISR from ISRs?
I’m using FreeRTOS on PIC18F45k22 MCU whith MCC18 v3.7 compiler.
Thanks in advance.