Thanks for the swift reply. I actually have configASSERT
defined as such:
#define configASSERT(x) \
if ((x) == 0) \
{ \
portDISABLE_INTERRUPTS(); \
for (;;) \
; \
}
And I also have the stack overflow checking enabled with the following setting:
#define configCHECK_FOR_STACK_OVERFLOW 2
void vApplicationStackOverflowHook(TaskHandle_t pxCurrentTCB, char *pcTaskName)
{
systemFatalError("Stack Overflow");
}
Where systemFatalError()
is a function that disables interrupts and prints out the error message.
Neither of these have however triggered with this issue.
Perhaps it’s worthwhile to mention that much of our codebase is in C++ and tasks that utilize the FreeRTOS+TCP are mostly wrapped in C++ objects.
I did try to disable all tasks that use the FreeRTOS+TCP stack to see if we have a race condition in initializations etc. but the crashes still occurred when only the FreeRTOS+TCP related tasks and some supporting non-TCP/IP -related tasks were in use.
Currently I’ve set the stack sizes for the IP-related tasks as follows:
- prvIPTask - 5120 bytes
- prvRXHandlerTask - 2560 bytes
- prvCheckLinkStatusTask - 512 bytes
I tried increasing the stack sizes at some point to no avail, but now I don’t remember how much I increased them. I’ll try again increasing the stack sizes of the previously mentioned tasks to 8kB, 4kB and 4kB correspondingly to confirm this. I’ll report back the results. Thanks!