-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Export CCFLAGS macros to IntelliSense #275
Comments
Thanks for the report! We need to fix a build script and put macro to the right scope. Regarding |
But how about transforming known |
An integrator decides on which scopes to put flags. We don't do any manipulation with flags. The correct solution is esp8266/Arduino@c1144c5 because it also fixes ASM builds. Thanks for the PR! |
What kind of issue is this?
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Win 10 x64
PlatformIO Version (
platformio --version
): 6.0.2a2Description of problem
The PlatformIO core does not extract
-D<macro>
definitions fromCCFLAGS
into the e.g. VSCode Intellisensec_cpp_properties.json
. Only macros inCPPDEFINES
are.Steps to Reproduce
tzset();
insetup()
Actual Results
Intellisense does not know about this function and highlights it as error.
Expected Results
Intellisense knows about this function since
Arduino.h
is included which includestime.h
which saysIf problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
Intellisense does not recognize
tzset()
because that needs the_GNU_SOURCE
to be defined (which through a specific chain enables POSIX_VISIBLE). The Arduino-ESP8266 build process activates that macro throughCCFLAGS
here and it correctly shows up in the build commands. However, the.vscode/c_cpp_properties.json
does not have_GNU_SOURCE
in thedefines
section because-D
flags inCCFLAGS
is not considered during the generation of this file.I considered this fixing this by moving
-D
flags from CCFLAGS to CPPDEFINES, but this is then specific to Arduino-ESP8266. I think in general it would be good if the core is able to recognize this situation and relays the activated macros to the IDEs correctly. (See esp8266/Arduino#8579).Also see community topic here and here.
The text was updated successfully, but these errors were encountered: