Must be missing something with platformio.ini file

Here is my setup.

[env:nucleo_l152re]
platform = ststm32
board = nucleo_l152re
framework = stm32cube

[env:specific_inclibs]
build_flags =
    -I/Users/myname/Dropbox/WCL/TestProject/inc

The .h files are in this directory but the compile says it cannot find them. If I move the .h files into my src directory everything compiles and links just fine.

What am I doing wrong with the setup of my platformio.ini file?

thanks

See Redirecting... if you want to add the build_flags option from the env:specific_inclibs you need to add a reference to it to the above environment. For example

[env:nucleo_l152re]
platform = ststm32
board = nucleo_l152re
framework = stm32cube
build_flags = ${specific_inclibs.build_flags}

[specific_inclibs]
build_flags =
    -I/Users/myname/Dropbox/WCL/TestProject/inc
3 Likes

Awesome, that did it. Thank you @maxgerhardt