- Notifications
You must be signed in to change notification settings - Fork13.3k
Corrected board definitions to include ESP8266#6972
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
According to the sonoff_*.json board files from PlatformIO, the build flags are supposed to be ARDUINO_ESP8266_SONOFF_BASIC etc. However, pins_arduino.h expects them to be ARDUINO_SONOFF_BASIC etc, without ESP8266. This causes sketches that make use of i2c with Wire.h to fail, as the necessary pins do not get defined.I suspect that pins_arduino.h is incorrect and propose this correction. My apologies if this is not the correct way to fix the issue - it's difficult to wrap my head around how the different frameworks, IDEs, build tools etc interact :)Reference:https://github.com/platformio/platform-espressif8266/tree/develop/boards
mcspr commentedJan 1, 2020
It is a bit more complicated than that, since Arduino IDE uses a different build config through platform.txt and boards.txt ini-like files: Line 104 infa5040d
-DARDUINO_{build.board}, which means that the IDE will use the variable provided by the menu entry / variable depending on the selected board type)Resulting boards.txt is generated by this script: Having |
mhightower83 commentedJan 17, 2020
@ttytyper If you like, I can supply you with the |
d-a-v commentedJan 17, 2020
@mcspr you are right, in this PR to (and similarly with other itead/sonoff models) |
mhightower83 commentedJan 17, 2020
@d-a-v actually, it looks like the recipe in platform.txt adds the |
d-a-v commentedJan 17, 2020
True, |
ttytyper commentedJan 18, 2020
It looks like you have a much better idea of what needs to be done than I do :) Thanks for looking into it. @mhightower83 Feel free to make the necessary changes. This is all a bit beyond what I'm comfortable messing around with. |
…ard}`,as proposed byesp8266#6972 (comment).@ttytyper 's changes have been incorporate into this PRThe build flag ARDUINO_SONOFF_... should now appear as ARDUINO_ESP8266_SONOFF_...@ttytyper,@mcspr, and@d-a-v thanks!
earlephilhower commentedJan 27, 2020
Superseded by#7024 |
According to the sonoff_*.json board files from PlatformIO, the build flags are supposed to be ARDUINO_ESP8266_SONOFF_BASIC etc. However, pins_arduino.h expects them to be ARDUINO_SONOFF_BASIC etc, without ESP8266. This causes sketches that make use of i2c with Wire.h to fail, as the necessary pins do not get defined.
I suspect that pins_arduino.h is incorrect and propose this correction. My apologies if this is not the correct way to fix the issue - it's difficult to wrap my head around how the different frameworks, IDEs, build tools etc interact :)
Reference:https://github.com/platformio/platform-espressif8266/tree/develop/boards