Hi,
I have a project, which depends a library (nxp), which depends on freertos.
I want to define the FreeRTOSConfig in my project (preferably), or in my nxp library. I do not want to put the FreeRTOSConfig in my freertos library (obviously).
Whatever I try, I keep ending up with a compilation error:
Compiling .pio\build\mimxrt1020_evk\libaa8\nxp\board\board.o
Compiling .pio\build\mimxrt1020_evk\libaa8\nxp\component\serial_manager\fsl_component_serial_manager.o
Compiling .pio\build\mimxrt1020_evk\libaa8\nxp\component\serial_manager\fsl_component_serial_port_uart.o
In file included from D:\dev\bp\iobox\shared\FreeRTOS\Source\croutine.c:27:
D:\dev\bp\iobox\shared\FreeRTOS\Source\include/FreeRTOS.h:57:10: fatal error: freertos/FreeRTOSConfig.h: No such file or directory
The only way I can solve this is by added the “freertos/FreeRTOSConfig.h” in my freertos library (which is the wrong place of course).
Desired folder / project structure:
nxpport (my project)
- depends on FreeRTOS, and on nxp
- include/freertos/FreeRTOSConfig.h
FreeRTOS
- no deps
nxp (library)
- depends on FreeRTOS
my platformio:
[env:mimxrt1020_evk]
platform = nxpimxrt
platform_packages =
toolchain-gccarmnoneeabi@~1.90301.0
board = mimxrt1020_evk
debug_build_flags = -O2 -g -ggdb
build_flags =
-D__MCUXPRESSO
-DCPU_MIMXRT1021DAG5A
-DCPU_MIMXRT1021DAG5A_cm7
-DFSL_RTOS_BM
-DSDK_OS_BAREMETAL
-DXIP_EXTERNAL_FLASH
-DXIP_BOOT_HEADER_ENABLE
-DSERIAL_PORT_TYPE_UART
-DFSL_RTOS_FREE_RTOS
-DSDK_OS_FREE_RTOS
-D__USE_CMSIS
-DDEBUG -D__NEWLIB__
-I /freertos
lib_extra_dirs =
../shared
lib_deps =
nxp
board_build.ldscript = MIMXRT1021.ld
My nxp llibrary.json
{
"name": "nxp",
"version": "2.9.1",
"keywords": "NXP SDK",
"description": "Xpresso SDK for RT1020",
"dependencies":
{
"FreeRTOS": "^10.2.1"
},
"build":
{
"libArchive": false,
"flags": [
"-I board",
"-I CMSIS",
"-I device",
"-I drivers",
"-I xip",
"-I utilities",
"-I component/lists",
"-I component/serial_manager",
"-I component/uart"
]
}
}
So, the file in question, is available to the compiler in /include/freertos/FreeRTOSConfig.h.
What do I need to do extra to let the compiler find this include when it is compiling my npx
library (which depends on freertos)?