Skip to content

vTaskList() and vTaskGetRunTimeStats() not (fully) supported #4531

@drws

Description

@drws

Description:

I would like to use vTaskList() and vTaskGetRunTimeStats() in arduino-esp32, but compiling (linking) fails with "undefined reference" (error message below). The functions are supported in esp-idf and declared in freertos/task.h and also configured in freertos/FreeRTOSConfig.h.

I'm compiling for "ESP32 Dev Module" board running updated Linux system with Arduino v1.8.13, arduino-builder v1.5.4 and arduino-esp32 v1.0.4.

Sketch:

#include <freertos/task.h>

void setup() {
  Serial.begin(115200);

  // test vTaskList()
  char buffer1[2048] = {0};
  vTaskList(buffer1);
  Serial.println(buffer1);

  // test vTaskGetRunTimeStats()
  char buffer2[2048] = {0};
  vTaskGetRunTimeStats(buffer2);
  Serial.println(buffer2);

  // end
  Serial.flush();
  while (1);
}

void IRAM_ATTR loop() {
  vTaskDelete(NULL);
}

And fails with:

.../sketch.ino.cpp.o:(.literal._Z5setupv+0x24): undefined reference to `vTaskList'
.../sketch.ino.cpp.o:(.literal._Z5setupv+0x28): undefined reference to `vTaskGetRunTimeStats'
.../sketch/sketch.ino.cpp.o: In function `setup()':
.../sketch.ino:8: undefined reference to `vTaskList'
.../sketch.ino:12: undefined reference to `vTaskGetRunTimeStats'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board ESP32 Dev Module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions