maxgerhardt, You are amazing!
I found
#if( configSUPPORT_STATIC_ALLOCATION == 1 )
#define xSemaphoreCreateMutexStatic( pxMutexBuffer ) xQueueCreateMutexStatic( queueQUEUE_TYPE_MUTEX, ( pxMutexBuffer ) )
#endif /* configSUPPORT_STATIC_ALLOCATION */
in semphr.h, and this:
#if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue )
{
....
}
#endif /* configUSE_MUTEXES */
This in queue.c
in the .platformio\packages\framework-espidf\components\freertos
so I added:
#define configSUPPORT_STATIC_ALLOCATION 1
in the FreeRTOSConfig.h, and it builds and links!
But, now I am facing this:
Error: The program size (1238096 bytes) is greater than maximum allowed (1048576 bytes)
Isn’t my ESP32 has 4MB of flash? Moreover, the micropython.a is 2.6MB, why the firmware is 1.2MB?
Anyway,
Since the original problem was solved, I am gonna make this solved.
Greate thanks to dear maxgerhardt, you help me out step by step.
Hope this post is useful for others.