-
-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build option build_src_flags in platformio.ini doesn't work #1146
Comments
Maybe |
This doesn't build either. It's not just macro definitions that don't work, but any compiler options as well. |
Macros can be tricky. This one works
|
Not |
Your orig. example is not correct at all. Without escaping the value it shouldnt work. Strange why it should work for |
Found a workaround by using target_compile_options() in a main component's cmakelists (<project>/src/CMakeLists.txt): Can someone mark this issue as a bug? |
Thanks for reporting, should be fixed in the dev branch. |
I'm not sure if my problem is related but I used build_src_flags in platformio.ini specific board sections to include appropriate header file based on the board used. Here is a short example :
But it seems that the appropriate #include is not considered in src/main.cpp as expected when building. A specific function is not found with this method (but is found when I add the #include directly in the main.cpp). Or is it me who don't understand how to implement the behavior I need ? |
@udem1234, just run your project in verbose mode and check if your |
Setting
build_src_flags
to anything doesn't pass the flags to the compiler on esp32 boards. Creating the issue here because the same configuration does compile onplatform = atmelavr
andboard = uno
.platformio.ini
main.c
Verbose build log
The text was updated successfully, but these errors were encountered: