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

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 -

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

This results in make failing with -

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.

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

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 addresses these changes.

1 Like

Hi @karahulx ,

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

Regards

Hi @PwnVerse
Thanks for reporting back.