Closed
Description
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.4
IDE name: Arduino IDE and Platform.io
Flash Frequency: 80Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10
Description:
I think all API supported by SDK can be used in Arduino core.
I found xTaskGetHandle API is described here but I cannot used it in Arduino IDE and in PlatformIO IDE (in VSCode).
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos.html
#include "Arduino.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
void setup() {
// put your setup code here, to run once:
TaskHandle_t task_handle_from_name = xTaskGetHandle(key_ptr);
}
void loop() {
// put your main code here, to run repeatedly:
}
Debug Messages:
undefined reference to `xTaskGetHandle'
Activity
RafigRzayev commentedon Jan 27, 2021
If I am not mistaken, there are other features as well which are available in RTOS API and are not usable in Arduino by default. As I remember there is a file where you can specifically edit which RTOS features you want to be enabled. Though maybe you will need to compile new libraries. Here are the notes from https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/freertos.html#_CPPv414xTaskGetHandlePKc :
Kiznoh commentedon Jan 27, 2021
Hi @VoLinhTruc,
unfortunetly the function
xTaskGetHandle
is not avaible in ESP-IDF v3.3 which Arduino-esp32 is currently based on.VoLinhTruc commentedon Jan 28, 2021
Thank you, sir.
I hope I can use that function in future. That function is the very useful function to get the Task handle by string from user.
VoLinhTruc commentedon Jan 28, 2021
I got the answer, so the issue is closed now.
stodge commentedon Feb 20, 2021
The version of FreeRTOS provided is V8.2.0 from 2015. The latest version of FreeRTOS is V10.4.3. Will FreeRTOS ever be upgraded? Or can't the ESP32 support it?
capedra commentedon Jul 17, 2021
@ivankravets @me-no-dev
That's exactly what I have been looking for......
https://www.freertos.org/vTaskGetInfo.html
maxgerhardt commentedon Sep 7, 2021
Compiling the sketch
with Arduino-ESP32 2.0.0 still leads to the result
Any update on enabling that in precompiled ESP-IDF libraries? Per ESP-IDF docs the function is available there.
Maksons commentedon Nov 12, 2021
I do not use Arduino but in plane ESP-IDF it is still problem .
I find espressif/esp-idf#5519 which report that with FreeRTOS 10 xTaskGetHandle should be by default, but do not work form me, not found still.
I overcome problem by solution given on ESP forum :
For that I need copy and modify freertos component in local code base.
@igrr could
INCLUDE_xTaskGetHandle 1
be by default for FreeRTOS or possible to selected in configuration ?mishaturnbull commentedon Nov 12, 2021
Same here. I've been modifying the value in the FreeRTOS header to use the function, but this means anybody else who wants to compile my code has to then go do the same. Any chance we could get it to be a menuconfig item?
p.s. @Maksons, how you are copying & modifying FreeRTOS component? Do you just copy the component from the esp-idf components folder into your project's components -- does that override the default component from esp-idf?
Thanks!!
Maksons commentedon Nov 15, 2021
@mishaturnbull
Yes, I copy components from esp-idf folder to project's components .
Yes, local one override original one. It is described in :
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html#multiple-components-with-the-same-name
igrr commentedon Apr 5, 2022
INCLUDE_xTaskGetHandle is set to 1 in IDF release/v4.4, so this feature should be available in arduino-esp32 v2.0.0 and later:
https://github.com/espressif/esp-idf/blob/c29343eb94d2f2ca17b3a5b38c82452e556147f2/components/freertos/include/esp_additions/freertos/FreeRTOSConfig.h#L255
34 remaining items