I’m adapting some Harmony 1.0 demo code by adding USART functionality to the Harmony RTOS/dual USB/CDC demo project through the Harmony Configurator. I think I’ve got the configuration correct. This is on the PIC32MZ starter kit board, with the XC32 1.33 compiler. FreeRTOS v8.? is as included in Harmony 1.0 distribution.
The problem is that when I try to run an extra task, the framework tasks seem to get starved out, and I get a stack overflow hook error. The task that throws the error seems to be the Framework (system) tasks, but sometimes it seems to be a NULL task, according to the current task stub object. If I suspend() the other task immediately after creating it, or before it gets into its for(; loop, then the whole original CDC project runs correctly. More specifically, if I try to block the task using the API routines Delay() or DelayUntil() (sp?), then the stack overflow hook is thrown.
I’ve tried increasing the framework stack size, doubling it to 2048 words, to no avail. Framework task priority is 1, other task priority is 4, max is set to 6.