-
Notifications
You must be signed in to change notification settings - Fork 132
ARDUINO_BOARD not defined correctly on compile command line #1047
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
Comments
This is a duplicate of #1028 |
I don't find that workaround. in #1046, acceptable as it requires modifying a library not in my control, its part of ESP8266/Ardunio core. I'd then have to make this same change every time I updated. Maybe a better solution would be to escape any " in values as the Arduino IDE does. |
I would prefer escaping the quotes but it is not simple for several reasons. So when a quote is found Sloeber needs to find out whether it needs to be escaped (not needed for file paths) and if it needs escaping whether it is a first level escape or a second level escape All these things are hard. For instance I don't even know how to do the escaping levels in windows let alone linux or mac. |
In other words this is a known incompatibility with Arduino and won't be fixed? :-( |
Unless someone comes up with a great idea, yes |
I don't have windows available to test but I believe you could escape the double quotes with |
That works for the first level and is implemented by Sloeber. |
rereading I see
The difference ESP8266_NODEMCU versus ESP8266_GENERIC is probably because you do not have the exact same setup in both cases. probably a different board |
True, I did not set the board for a compile test with Arduino IDE - it also compiles fine with nodemcu selected - Sloeber still fails with either board selection. |
To get to the dirty details This is what the recipe is supposed to be as to the platform.txt file
On windows §like you say on linux the is translated to -DARDUINO_{build.board} In contrast to what I believed this command works on windows natively. |
Whats needed is to escape the quotes around the board type
Since I don't know how Sloeber is processing these commands, and what quotes may be stripped before it hits a shell on linux/macos, I don't know how much I can help other than when the command is finally passed to the shell to execute it needs to have both |
You can help by running tests on linux :-) |
I would be glad to. (at least for macOS) |
Investigation shows it is more complicated than seems :-s At install time sloeber runs following code If I look at the platform.txt of esp8266 (all versions I have installed) I see and I also get So it looks like the "windows fix" is also needed for macOS and maybe even for Linux? |
Seems like esp32 needs this as well. https://www.patreon.com/posts/23070587?utm_medium=post_notification_email&utm_source=post_link&utm_campaign=patron_engagement |
As it looks that the environment variable ARDUINO_BOARD is only used in ESP826 and ESP32 (I didn't find any other platform using this) the fix is pretty safe. |
Just chiming in to let you know that yes, the fix is definitely needed on macOS, and probably Linux, as well. Haven't checked the nightly for this, but applied the fix to my platform.txt manually. |
It seems ARDUINO_VARIANT is another one causing issues with ESP32 |
Describe the bug
In an ESP8266 project the compile command does not include proper quoting for the ARDUINO_BOARD macro. Using the arduino IDE its passed as
"-DARDUINO_BOARD=\"ESP8266_GENERIC\""
and with sloeber its passed as-DARDUINO_BOARD="ESP8266_NODEMCU"
This causes a compilation error when using theESP8266mDNS
library as the value ofARDUINO_BOARD
is expected to be a string.To Reproduce
Steps to reproduce the behavior:
Expected behavior
expect no error
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: