FreeRtos pcTaskGetName

Hello to all,

I would like to use the pcTaskGetName function from FreeRtos however it is not available.
As per the documentation :
FreeRTOS - ESP32 - — ESP-IDF Programming Guide latest documentation,
this function does not need any particular setup in FreeRTOSConfig.h to be available (like the case of xTaskGetHandle).
What is wrong ? Is there a mistake in the documentation?
Should I setup a particular include in FreeRTOSConfig.h for it to be available ?

Thanks for your advices on this one.

What platformio.ini are you using?

you mean pcTaskGetName(). There is no xTakGetName().

oops sorry
yes pcTaskGetName
bad cut and paste

Works for me in Arduino-ESP32.

platform = espressif32
board = esp32dev
monitor_filters = esp32_exception_decoder
framework = arduino
monitor_speed = 115200

with src\main.cpp

#include <Arduino.h>

void setup() {

void loop() {
  Serial.print("Task name: ");


Task name: loopTask

Which is correct, the Arduino-ESP32 core creates the task of that name

Your platformio.ini is what?

I have

platform = espressif32

board = wemos_d1_mini32

upload_port =

This is the full file?

There is no framework = .. line to describe what framework you want to use? Arduino or ESP-IDF?

default_envs =  
    ;   mini66
framework = arduino
upload_speed = 921600
monitor_speed = 115200
lib_extra_dirs = .\lib   
lib_deps = fastled/FastLED@3.3.3
platform = espressif32
board = wemos_d1_mini32 
upload_port =
upload_protocol = espota
board_build.partitions = default.csv
lib_deps =  

This looks okay. What is the exact code you’re running that tries to use that function? What is the error message when using “Build”?

Here is the build error:
E:/Data/PlatformIO/Sha_Clock_v52/src/Clock_support.ino:480:50: error: ‘pcTaskGetName’ was not declared in this scope
uxTaskNameArray[3] = pcTaskGetName(xWebHandle);

Again, the function is called pcTaskGetTaskName.

EDIT: Okay the documentation seems to be just wrong about the name of this function. pcTaskGetTaskName is correct, everything else is false.

Maybe it has something to do with the fact that you’re looking at the documentation for the latest ESP-IDF, but the Arduino core is built on a slightly older ESP-IDF version.

Bingo !
I changed the name of the function to pcTaskGetTaskName
it builds with no error

This is a mistake in the doc !!
Thank you so much