Description
In exploring rootcause for issue #345 I have found an assert in one of the FreeRtos files will lock the thread and produce the type of failure I am seeing.
I found that you have not defined configASSERT in FreeRTOSconfig.h.
I consider this an issue because all the error checking for function arguments in FreeRTOS is being bypassed.
I have added The following to my FreeRTOSconfig.h and suggest you look into doing something similar.
#ifndef In_Xtensa_Assembler
void My_printf_NoBlock(char* fmt, ...);
#define configASSERT(x) do { if (!(x)) {My_printf_NoBlock("RTOS Assert %s Line %u\n", FILE, LINE); while(1){}; }} while (0)
#221
Most implementations of configASSERT just use a infinite loop.
I suggest adding a printf to report the assert. You need to make sure you DON'T use ets_printf() or any other printf that uses the heap or a mutex/semaphore.
My My_printf_NoBlock() by passes my gating semaphore, uses not malloc calls, and only uses 20 bytes of stack space - printing directly to the uart.
I can see why you folks may have excluded it because FreeRTOSconfig.h is passed to your assembler and it does not understand token like "void", etc
The way around this is to add the surround the definition of configASSERT() in FreeRTOS.h with the statement:
#ifndef In_Xtensa_Assembler
As shown above.
The add the following line to the beginning of the includes in "etensa_rtos.h"
#define In_Xtensa_Assembler
This removes the definition of configASSERT() in all the xtensa assembler files associated with FreeRTOS.