PlatformIO Community

How to get task info in the ESP32 scope?

I’m trying to get the task information for debugging purposes.

I found that the vTaskGetInfo is not declared in the ESP32 scope. Does anyone know the reason? Also, if the function is not declared in the ESP32 scope, how could I can get the task info?

Many thanks.

Per https://github.com/espressif/arduino-esp32/issues/4746#issuecomment-768577258 the function is not available because they haven’t enabled it in the FreeRTOS config. It’s up to the Arduino-ESP32 people to make this work by default in Arduino-ESP32.

With PlatformIO it is possible to compile Arduino-ESP32 but with a reconfigurable ESP-IDF base (example: espidf-arduino-blink. There, the function could be activated to make it usable. You should however wait until PlatformIO updates support for the latest Arduino-ESP32 2.0.0 version (https://github.com/platformio/platform-espressif32/issues/616#issuecomment-912442016)