Impossible to cleanly implement the FreeRTOS macro traceTASK_CREATE() in ESP-IDF?

nathanwiebe
Posts: 1
Joined: Thu Jun 01, 2023 12:11 am

Impossible to cleanly implement the FreeRTOS macro traceTASK_CREATE() in ESP-IDF?

Postby nathanwiebe » Thu Jun 01, 2023 12:19 am

I would like to define the macro traceTASK_CREATE() in a standard FreeRTOS way, but it seems that this is impossible to do cleanly in ESP-IDF. Normally, the macro would be defined in FreeRTOSConfig.h, which is included in FreeRTOS.h (which provides a default null implementation if not supplied in FreeRTOSConfig.h). In the case of ESP-IDF, FreeRTOSConfig.h is built into the framework, and is generally customized using menuconfig options that are used to create the file build/config/sdkconfig.h each time the project is built. I have a strong desire to NOT monkey-patch header files in the IDF with my project-specific changes. I also don't see editing sdkconfig.h as a reasonable option because I believe it is overwritten from the menuconfig options each time the project is built or menuconfig is run (not sure which, but either one is a showstopped). So is there a proper way to do this?

MicroController
Posts: 2661
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Impossible to cleanly implement the FreeRTOS macro traceTASK_CREATE() in ESP-IDF?

Postby MicroController » Thu Jun 01, 2023 9:29 am

I copied the FreeRTOS component from IDF to my project's components directory to make the changes. Works no problem.
I'm afraid it's either that or "monkey-patching".

kammutierspule
Posts: 12
Joined: Sat Apr 11, 2020 9:25 am

Re: Impossible to cleanly implement the FreeRTOS macro traceTASK_CREATE() in ESP-IDF?

Postby kammutierspule » Sat May 17, 2025 9:08 am

I'm facing the same issue, I created this ticket:
https://github.com/espressif/esp-idf/issues/15971

I managed to append an include file to sdkconfig.h but the problem is that the freeRTOS build can't "see" other paths and I'm getting difficult to #include <searchable files>

it would work with workspace global paths only :\

Who is online

Users browsing this forum: Applebot, Baidu [Spider] and 6 guests