I have FreeRTOS running on a MKE06 Cortex-M0+ (based on SAMD20 demo), GCC toolchain. I am trying to figure out optimal task stack sizes (with the help of avstack.pl).
I want to use only static memory allocation. In the FAQ I have read this:
The stack requirements of interrupt service routines - which for many RTOS ports is zero as the RTOS will switch to use a dedicated interrupt stack on entry to an interrupt service routine.
I use this port. I don't know much assembly, but I think I do not see anything that would configure stack pointer separately for the interrupts (is such thing even supported by M0+?). I allocated stack for the idle task manually (with vApplicationGetIdleTaskMemory), but I did not find a function to provide stack space for interrupts. Interrupts work fine, I do not use nested interrupts.
My questions:
- Should my task stack size be enlarged by at least the biggest possible interrupt stack size?
- Can I allocate a separate interrupt stack on Cortex M0+ in plain C (ie. without adding own assembly to each ISR)?