# trcRecorder.h: No such file or directory when using CMakeLists.txt

**URL:** <https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146>\
**Category:** Kernel\
**Tags:** debug\
**Created:** [February 8, 2024, 6:51pm UTC](https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146 "2024-02-08T18:51:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PwnVerse](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pwnverse/32/4178_2.png) [@PwnVerse](https://forums.freertos.org/u/PwnVerse)\
**Post date:** [February 8, 2024, 6:51pm UTC](https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146/1 "2024-02-08T18:51:34Z")

</div>

Hi,

I wanted to use CMakeLists.txt to configure a couple of things to generate a new Makefile for compiling the Posix GCC blinky demo application.

These are the steps I am taking to achieve this -

```auto
cd FreeRTOS/Demo/Posix_GCC
mkdir build
cd build
cmake ..
make

```

This results in make failing with -

```auto
FreeRTOS/Demo/Posix_GCC/./FreeRTOSConfig.h:157:14: fatal error: trcRecorder.h: No such file or directory
  157 | #include "trcRecorder.h"
      | ^ ~~~~~~~~~~~~~~

```

Do I have to add any specific includes before I run cmake for this to work?

Thanks.

---

<div class="post-metadata">

**Author:** ![karahulx](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/karahulx/32/4893_2.png) [@karahulx](https://forums.freertos.org/u/karahulx)\
**Post date:** [February 9, 2024, 8:44am UTC](https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146/3 "2024-02-09T08:44:50Z")

</div>

Hi @PwnVerse  
Welcome to the FreeRTOS Community Forums. Thank you for reporting the issue.

I was able to reproduce the issue you are facing .  
Can you add and change the following lines to your CMakeLists.txt

```auto
target_include_directories( freertos_config
    INTERFACE
        ./
        ./Trace_Recorder_Configuration
        ${FREERTOS_PLUS_TRACE_PATH}/include
        ${FREERTOS_PLUS_TRACE_PATH}/kernelports/FreeRTOS/include
)

file( GLOB FREERTOS_PLUS_TRACE_SOURCES ${FREERTOS_PLUS_TRACE_PATH}/*.c ${FREERTOS_PLUS_TRACE_PATH}/kernelports/FreeRTOS/trcKernelPort.c )

```

This [PR](https://github.com/FreeRTOS/FreeRTOS/pull/1185) addresses these changes.

---

<div class="post-metadata">

**Author:** ![PwnVerse](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/pwnverse/32/4178_2.png) [@PwnVerse](https://forums.freertos.org/u/PwnVerse)\
**Post date:** [February 9, 2024, 2:53pm UTC](https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146/4 "2024-02-09T14:53:22Z")

</div>

Hi @karahulx ,

Thanks alot for the quick response. This PR fixes the issue I was facing.

Regards

---

<div class="post-metadata">

**Author:** ![karahulx](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/karahulx/32/4893_2.png) [@karahulx](https://forums.freertos.org/u/karahulx)\
**Post date:** [February 9, 2024, 3:15pm UTC](https://forums.freertos.org/t/trcrecorder-h-no-such-file-or-directory-when-using-cmakelists-txt/19146/5 "2024-02-09T15:15:18Z")

</div>

Hi @PwnVerse  
Thanks for reporting back.
