Skip to main content
sonerb
Associate
February 13, 2023
Solved

FreeRTOSConfig.h file patching mode

  • February 13, 2023
  • 2 replies
  • 1427 views

I want to trace ContextSwitchIn and ContextSwitchOut events. 

I defined two functions for this. 

#define traceTASK_SWITCHED_OUT() getTASK_SWITCHED_OUT_EVENT(pxCurrentTCB)
#define traceTASK_SWITCHED_IN() getTASK_SWITCHED_IN_EVENT(pxCurrentTCB)

I put the two functions at the end of the FreeRTOSConfig.h file. But, It is returning to the original file after clean-generate the code again.

It says in the help that patching mode only works on lib/src, lib/include and lib/rsc folders.

FreeRTOSConfig.h is located in the cfg folder. How can I solve this problem?

0693W00000YAanZQAT.png 

This topic has been closed for replies.
Best answer by Erwan YVIN

Dear Sonerb ,

you can not patch this file FreeRTOSConfig.h

I recommend you to hack this file in creating an include file and adding in the user.mak :

#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H

Best Regards

Erwan

2 replies

Erwan YVIN
Erwan YVINBest answer
ST Technical Moderator
February 13, 2023

Dear Sonerb ,

you can not patch this file FreeRTOSConfig.h

I recommend you to hack this file in creating an include file and adding in the user.mak :

#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H

Best Regards

Erwan

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
sonerb
sonerbAuthor
Associate
February 15, 2023

Hi,

How can I use "user.mak" file to add custom FreeRTOSConfig.h?