Use traceTASK_SWITCHED_IN without modifying the IDF (v3.2.2)

chr1st0s
Posts: 15
Joined: Fri Nov 01, 2019 10:05 am

Use traceTASK_SWITCHED_IN without modifying the IDF (v3.2.2)

Postby chr1st0s » Tue Dec 03, 2019 3:09 pm

Hi,

We are trying to use FreeRTOS trace macros (e.g. traceTASK_SWITCHED_IN) to produce some runtime application checks/diagnostics. Unfortunately, I cannot figure out how to #define these macros into our project without modifying the FreeRTOS.h file in IDF.

I have tried to include our macros before the FreeRTOS.h in the project (outside IDF) but it doesn't work because the IDF includes FreeRTOS.h first.

Also, if I forward-declare our functions in FreeRTOS.h with extern and #define them there, everything works fine. So, the project configs should be okay.

Is there a way to #define these macros into our project without modifying the IDF? Maybe using a CMake feature?

PS: I know v3.2.2 is outdated ... but we have no option of upgrading atm because of ADF dependencies and deadlines.

Thank you all!

ESP_Sprite
Posts: 9770
Joined: Thu Nov 26, 2015 4:08 am

Re: Use traceTASK_SWITCHED_IN without modifying the IDF (v3.2.2)

Postby ESP_Sprite » Wed Dec 04, 2019 3:04 am

I don't think there is a way to set that option specifically. Easiest way around that would be to copy the freertos component into your project (it will override the esp-idf provided component), then change the switch there.

chr1st0s
Posts: 15
Joined: Fri Nov 01, 2019 10:05 am

Re: Use traceTASK_SWITCHED_IN without modifying the IDF (v3.2.2)

Postby chr1st0s » Fri Dec 06, 2019 3:59 pm

Hi ESP_Sprite,

I cannot find a better solution myself, but it would be nice to have an sdkconfig for this. For the time being, it is easier to be patching the FreeRTOS.h rather than copying the whole FreeRTOS component.

Thank you!

Who is online

Users browsing this forum: Baidu [Spider] and 153 guests