How to enable vTaskList using PlatformIO and Arduino Framework

DaveLowther
Posts: 2
Joined: Mon Feb 10, 2025 4:44 pm

How to enable vTaskList using PlatformIO and Arduino Framework

Postby DaveLowther » Mon Feb 10, 2025 5:03 pm

I’m new to FreeRTOS, but have 30+ years experience of writing code for embedded systems. I’ve use a variety of task schedulers during that time.

I am just experimenting at the moment. I’m using FreeRTOS V10.4.3 with an ESP32 dev board. I’d like to see what tasks are running, in addition to those that I explicitly created. If I use vTaskList in my code, it compiles okay, but I get a linker error because it can’t find vTaskList.

The espressif FreeRTOS(IDF) says “configUSE_TRACE_FACILITY and configUSE_STATS_FORMATTING_FUNCTIONS must both be defined as 1 for this function to be available.”

I tried editing “C:\Users\David.platformio\packages\framework-arduinoespressif32\tools\sdk\esp32\include\freertos\include\esp_additions\freertos\FreeRTOSConfig.h” to define those two macros as 1, then rebuilt my code in PlatformIO, but that didn’t fix it.

I checked I was editing the FreeRTOSConfig.h that my build uses by putting a deliberate syntax error in that file and checked the build failed to compile due the syntax error.

How do I get it to build so that vTaskList is available to the linker?

TIA for any help.

lbernstone
Posts: 916
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to enable vTaskList using PlatformIO and Arduino Framework

Postby lbernstone » Tue Feb 11, 2025 1:27 am

arduino-esp32 uses a pre-compiled version of the ESP-IDF, so that setting (all the CONFIG_XX, in fact) is already set. You would need to compile from scratch. If you are already in platformio, I recommend installing the esp-idf extension. Once you have that all set up, hit F1 to get to the main list, and there should be an option "ESP-IDF: Add Arduino ESP32 as a component". There is an example in arduino to show how to add libraries to your project.

DaveLowther
Posts: 2
Joined: Mon Feb 10, 2025 4:44 pm

Re: How to enable vTaskList using PlatformIO and Arduino Framework

Postby DaveLowther » Tue Feb 11, 2025 1:38 pm

Thank you for the advice, I will try that

Who is online

Users browsing this forum: No registered users and 29 guests