platform-ststm32
platform-ststm32 copied to clipboard
about build_flags in platformio.ini
In my platformio.ini , I use build_flags to add the path Mid/Blink,VS Code can find led.h in Mid/Blink.But when I compile the project,the console says undefined reference to `x_l_blue_blink_init'.
[platformio]
src_dir = Src
include_dir = Inc
lib_dir = lib
boards_dir = boards
default_envs = genericSTM32F411CE
[env:genericSTM32F411CE]
platform = ststm32
board = genericSTM32F411CE
framework = stm32cube
upload_protocol = jlink
debug_tool = jlink
build_flags = -IMid/Blink
-I adds a search path for include headers (.h). The linker must be complaining about not being able to find actual code of that function (.c). Source files are not specified by -I but with platformio's src_filter