Page 1 of 1

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

Posted: Thu Jun 01, 2023 12:19 am
by nathanwiebe
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?

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

Posted: Thu Jun 01, 2023 9:29 am
by MicroController
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".