Skip to content

Commit

Permalink
Use platformio's extend feature (#149)
Browse files Browse the repository at this point in the history
* Use platformio's extend feature

* Pin ESP32 platform version

* Do not use env: prefix for base envs

By using a custom prefix base:, we don't need to list the environments we *want* to build explicitly.

* Fix espressif32 platform version
  • Loading branch information
TheAssassin committed Mar 22, 2020
1 parent 8c62485 commit acaed49
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
[platformio]
src_dir = ESP8266WirelessPrintAsync


# common variables shared by the environments
[common]
framework = arduino
lib_deps =
https://github.com/greiman/SdFat#3b79f38
https://github.com/me-no-dev/ESPAsyncWebServer#95dedf7
Expand All @@ -22,24 +25,37 @@ lib_deps =
https://github.com/bblanchon/ArduinoJson#3df4efd
https://github.com/Makuna/NeoPixelBus#9619fef

[env:nodemcuv2]
platform = [email protected] ; Corresponds to https://github.com/platformio/platform-espressif8266/releases/tag/v2.0.0 = https://github.com/esp8266/Arduino/releases/tag/2.5.0
board = nodemcuv2
framework = arduino

# base environments
# can be extended by board-specific environments
[base:esp8266]
; corresponds to https://github.com/platformio/platform-espressif8266/releases/tag/v2.0.0
; see https://github.com/esp8266/Arduino/releases/tag/2.5.0
platform = [email protected]
framework = ${common.framework}
lib_deps = ${common.lib_deps}

[base:esp32]
; corresponds to https://github.com/platformio/platform-espressif32/releases/tag/v1.8.0
; see https://github.com/espressif/arduino-esp32/releases/tag/1.0.2
platform = [email protected]
framework = ${common.framework}
lib_deps =
${common.lib_deps}
https://github.com/bbx10/Hash_tng


[env:nodemcuv2]
board = nodemcuv2
extends = base:esp8266

[env:d1_mini]
platform = [email protected] ; Corresponds to https://github.com/platformio/platform-espressif8266/releases/tag/v2.0.0 = https://github.com/esp8266/Arduino/releases/tag/2.5.0
board = d1_mini
framework = arduino
lib_deps =
${common.lib_deps}
extends = base:esp8266

# esp32dev works for the majority of ESP32 based dev boards
# there are more specific board configurations available, feel free to send PRs adding new ones
[env:esp32dev]
platform = [email protected] ; Corresponds to https://github.com/platformio/platform-espressif32/releases/tag/v1.8.0 = https://github.com/espressif/arduino-esp32/releases/tag/1.0.2
board = esp32dev
framework = arduino
lib_deps =
${common.lib_deps}
https://github.com/bbx10/Hash_tng
extends = base:esp32

0 comments on commit acaed49

Please sign in to comment.