-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xTaskGetHandle is not available to be used #4746
Comments
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 :
|
Hi @VoLinhTruc, |
Thank you, sir. |
I got the answer, so the issue is closed now. |
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? |
@ivankravets @me-no-dev |
Compiling the sketch #include <Arduino.h>
void setup(){
Serial.begin(115200);
TaskStatus_t xTaskDetails;
// Use the handle to obtain further information about the task.
vTaskGetInfo( NULL, // get info for *this* thread
&xTaskDetails,
pdTRUE, // Include the high water mark in xTaskDetails.
eInvalid ); // Include the task state in xTaskDetails.
}
void loop(){} 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. |
I do not use Arduino but in plane ESP-IDF it is still problem . I overcome problem by solution given on ESP forum :
For that I need copy and modify freertos component in local code base. |
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!! |
@mishaturnbull |
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: |
@igrr Its still not available, im on 2.0.5 core, updating define: |
Agree. As of Core 2.0.6, trying to call vTaskGetInfo() still reports "undefined reference to `vTaskGetInfo'". This function, like xTaskGetHandle() depends on configUSE_TRACE_FACILITY. In FreeRTOSConfig.h we have:
But, I can't find 'CONFIG_FREERTOS_USE_TRACE_FACILITY' defined anywhere. So, that could be the problem. |
Trying to use this in 2.0.6 too, but getting similar errors. Can this be re-opened or should we create new issue? |
Can you please retest this under 2.0.7 version please? |
@VojtechBartoska no need to retest. This has not changed, but will probably be part of the v3.0.0 update |
Not a good idea to add always.
|
Initial subject is about |
Actually I would say, we will not be providing this feature, because it will cause performance degradation for every user. People that really need this, can use the lib-builder and recompile their own libs with that enabled. |
It could be added with a define or a compiler flag. :/ At least give us the choice to choose! |
libfreertos.a is statically precompiled. The build process would have to be changed to build FreeRTOS from source (or provide one debug and one release optimized library). |
I agree with your idea. this feature should be an option by enable MACRO |
@VoLinhTruc Not possible, since Arduino is using static compiled libs. There is no way to change. Only way is to compile this lib with the feature enabled. This will not be done in general since it degrees performance. The other option is to use Arduino as a component of IDF and set all settings like you want/need. |
I would suggest revisiting this question. AFAICT, simply enabling |
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
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
Debug Messages:
The text was updated successfully, but these errors were encountered: