Hello,
I want to add trace function for the queue create "traceQUEUE_CREATE" without changing the IDF, Any idea?
Thanks,
adding traceQUEUE_CREATE to freeRTOS
-
- Posts: 75
- Joined: Fri Dec 04, 2020 9:56 pm
Re: adding traceQUEUE_CREATE to freeRTOS
As long as the FreeRTOS.h header will be included sooner than any of your own, you will need to either copy FreeRTOS component into your project, or modify that IDF header to define your own tracing macro.
It's been discussed e.g. in this thread.
It's been discussed e.g. in this thread.
Re: adding traceQUEUE_CREATE to freeRTOS
Thank you very much Victoria!, do you know where can I find an example which is demo using another copy of the freeRTOS?
-
- Posts: 75
- Joined: Fri Dec 04, 2020 9:56 pm
Re: adding traceQUEUE_CREATE to freeRTOS
I cannot link you one. But the process can be (and it is by default, or when you know what have you changed in the build system configuration) as easy as copying <esp-idf>\components\freertos component directory e.g. into your project's <your-project>\components\freertos directory (directory name matters, but can be structured in subdirectories) and modifying headers there.
Build system will pick the component which finds as last during the component search process which is well described in the build system manual, section Multiple components with the same name (emphasized by me):
Build system will pick the component which finds as last during the component search process which is well described in the build system manual, section Multiple components with the same name (emphasized by me):
Multiple components with the same name
When ESP-IDF is collecting all the components to compile, it will do this in the order specified by COMPONENT_DIRS; by default, this means ESP-IDF’s internal components first (IDF_PATH/components), then any components in directories specified in EXTRA_COMPONENT_DIRS, and finally the project’s components (PROJECT_DIR/components). If two or more of these directories contain component sub-directories with the same name, the component in the last place searched is used. This allows, for example, overriding ESP-IDF components with a modified version by copying that component from the ESP-IDF components directory to the project components directory and then modifying it there. If used in this way, the ESP-IDF directory itself can remain untouched.
Who is online
Users browsing this forum: Bing [Bot], MicroController and 204 guests