PlatformIO Community

__has_include in STM32duino FreeRTOS does not work

Dear all,

to overwrite the original .h user shall add a STM32FreeRTOSConfig.h o n sketch level.

#if __has_include("STM32FreeRTOSConfig.h")
#include "STM32FreeRTOSConfig.h"
#if __has_include("STM32FreeRTOSConfig_extra.h")
#include "STM32FreeRTOSConfig_extra.h"
#include "FreeRTOSConfig_Default.h"

Visual Studio Code recognizes it correctly, but pio run does not. FreeRTOSConfig_Default.h is used to build.

How can I fix this? Does anybody have an idea?


Is the folder in which the user’s STM32FreeRTOSConfig.h placed added to the global include paths via build_flags -I <relative path from project source> in the platformio.ini?

adding the standart include via -I buildflag soved my problem. Thanks @maxgerhardt