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: 1709
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".

Who is online

Users browsing this forum: homedad and 91 guests