2021-08-09 22:43:18 +02:00
|
|
|
; This PlatformIO project is for development purposes *only*: clang-tidy derives its compilation
|
|
|
|
; database from here, and IDEs like CLion and VSCode also use it. This does not actually create a
|
|
|
|
; usable binary.
|
2019-04-17 12:06:00 +02:00
|
|
|
; It's *not* used during runtime.
|
|
|
|
|
|
|
|
[platformio]
|
2022-01-05 21:30:15 +01:00
|
|
|
default_envs = esp8266-arduino, esp32-arduino, esp32-idf
|
2022-01-04 21:59:34 +01:00
|
|
|
; Ideally, we want src_dir to be the root directory of the repository, to mimic the runtime build
|
|
|
|
; environment as best as possible. Unfortunately, the ESP-IDF toolchain really doesn't like this
|
|
|
|
; being the root directory. Instead, set esphome/ as the source directory, all our sources are in
|
|
|
|
; there anyway. Set the root directory as the include_dir, so that the esphome/ directory is on the
|
|
|
|
; include path.
|
2021-09-20 11:47:51 +02:00
|
|
|
src_dir = esphome
|
2022-01-04 21:59:34 +01:00
|
|
|
include_dir = .
|
2021-08-09 22:43:18 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are just the build flags as set by the runtime.
|
|
|
|
[flags:runtime]
|
2021-08-09 22:43:18 +02:00
|
|
|
build_flags =
|
|
|
|
-Wno-unused-but-set-variable
|
|
|
|
-Wno-sign-compare
|
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are just the build flags for clang-tidy.
|
|
|
|
[flags:clangtidy]
|
2021-08-09 22:43:18 +02:00
|
|
|
build_flags =
|
|
|
|
-Wall
|
2021-12-01 21:03:51 +01:00
|
|
|
-Wextra
|
2021-08-09 22:43:18 +02:00
|
|
|
-Wunreachable-code
|
|
|
|
-Wfor-loop-analysis
|
|
|
|
-Wshadow-field
|
|
|
|
-Wshadow-field-in-constructor
|
2021-12-01 21:03:51 +01:00
|
|
|
-Wshadow-uncaptured-local
|
2019-04-17 12:06:00 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for all environments.
|
2019-04-17 12:06:00 +02:00
|
|
|
[common]
|
|
|
|
lib_deps =
|
2022-01-01 10:31:43 +01:00
|
|
|
esphome/noise-c@0.1.4 ; api
|
|
|
|
makuna/NeoPixelBus@2.6.9 ; neopixelbus
|
2022-01-20 03:21:44 +01:00
|
|
|
esphome/Improv@1.1.0 ; improv_serial / esp32_improv
|
2022-01-01 10:31:43 +01:00
|
|
|
bblanchon/ArduinoJson@6.18.5 ; json
|
2021-09-21 17:12:17 +02:00
|
|
|
build_flags =
|
|
|
|
-DESPHOME_LOG_LEVEL=ESPHOME_LOG_LEVEL_VERY_VERBOSE
|
|
|
|
src_filter =
|
|
|
|
+<./>
|
|
|
|
+<../tests/dummy_main.cpp>
|
|
|
|
+<../.temp/all-include.cpp>
|
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for all Arduino-framework based environments.
|
2021-09-21 17:12:17 +02:00
|
|
|
[common:arduino]
|
|
|
|
extends = common
|
|
|
|
lib_deps =
|
|
|
|
${common.lib_deps}
|
2021-10-22 14:14:14 +02:00
|
|
|
ottowinter/AsyncMqttClient-esphome@0.8.6 ; mqtt
|
2021-11-13 09:22:32 +01:00
|
|
|
esphome/ESPAsyncWebServer-esphome@2.1.0 ; web_server_base
|
2021-09-15 19:01:31 +02:00
|
|
|
fastled/FastLED@3.3.2 ; fastled_base
|
|
|
|
mikalhart/TinyGPSPlus@1.0.2 ; gps
|
|
|
|
freekode/TM1651@1.0.1 ; tm1651
|
|
|
|
glmnet/Dsmr@0.5 ; dsmr
|
|
|
|
rweather/Crypto@0.2.0 ; dsmr
|
2021-09-26 22:32:33 +02:00
|
|
|
dudanov/MideaUART@1.1.8 ; midea
|
2021-11-14 16:11:21 +01:00
|
|
|
; PIO isn't update releases correctly, see:
|
|
|
|
; https://github.com/ToniA/arduino-heatpumpir/commit/0948c619d86407a4e50e8db2f3c193e0576c86fd
|
|
|
|
https://github.com/ToniA/arduino-heatpumpir.git#1.0.18 ; heatpumpir
|
2019-04-17 12:06:00 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common.build_flags}
|
|
|
|
-DUSE_ARDUINO
|
2019-04-17 12:06:00 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for all IDF-framework based environments.
|
2021-09-21 17:12:17 +02:00
|
|
|
[common:idf]
|
2021-09-15 19:01:31 +02:00
|
|
|
extends = common
|
2021-09-21 17:12:17 +02:00
|
|
|
build_flags =
|
|
|
|
${common.build_flags}
|
|
|
|
-DUSE_ESP_IDF
|
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for the ESP8266 using Arduino.
|
|
|
|
[common:esp8266-arduino]
|
2021-09-21 17:12:17 +02:00
|
|
|
extends = common:arduino
|
2021-09-20 11:47:51 +02:00
|
|
|
; when changing this also copy it to esphome-docker-base images
|
|
|
|
platform = platformio/espressif8266 @ 3.2.0
|
|
|
|
platform_packages =
|
|
|
|
platformio/framework-arduinoespressif8266 @ ~3.30002.0
|
|
|
|
|
2019-04-17 12:06:00 +02:00
|
|
|
framework = arduino
|
|
|
|
lib_deps =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:arduino.lib_deps}
|
2021-09-15 19:01:31 +02:00
|
|
|
ESP8266WiFi ; wifi (Arduino built-in)
|
|
|
|
Update ; ota (Arduino built-in)
|
|
|
|
ottowinter/ESPAsyncTCP-esphome@1.2.3 ; async_tcp
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:arduino.build_flags}
|
2021-09-20 11:47:51 +02:00
|
|
|
-DUSE_ESP8266
|
2021-09-21 17:12:17 +02:00
|
|
|
-DUSE_ESP8266_FRAMEWORK_ARDUINO
|
2022-01-11 03:24:26 +01:00
|
|
|
extra_scripts = post:esphome/components/esp8266/post_build.py
|
2019-10-18 11:22:08 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for the ESP32 (all variants) using Arduino.
|
2021-09-21 17:12:17 +02:00
|
|
|
[common:esp32-arduino]
|
|
|
|
extends = common:arduino
|
2021-09-20 11:47:51 +02:00
|
|
|
; when changing this also copy it to esphome-docker-base images
|
|
|
|
platform = platformio/espressif32 @ 3.3.2
|
|
|
|
platform_packages =
|
|
|
|
platformio/framework-arduinoespressif32 @ ~3.10006.0
|
|
|
|
|
2019-10-18 11:22:08 +02:00
|
|
|
framework = arduino
|
2021-05-24 21:47:45 +02:00
|
|
|
board = nodemcu-32s
|
|
|
|
lib_deps =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:arduino.lib_deps}
|
2021-09-15 19:01:31 +02:00
|
|
|
esphome/AsyncTCP-esphome@1.2.2 ; async_tcp
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:arduino.build_flags}
|
2021-09-20 11:47:51 +02:00
|
|
|
-DUSE_ESP32
|
2021-09-21 17:12:17 +02:00
|
|
|
-DUSE_ESP32_FRAMEWORK_ARDUINO
|
2022-01-11 03:24:26 +01:00
|
|
|
extra_scripts = post:esphome/components/esp32/post_build.py
|
2021-09-20 11:47:51 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; This are common settings for the ESP32 (all variants) using IDF.
|
2021-09-21 17:12:17 +02:00
|
|
|
[common:esp32-idf]
|
|
|
|
extends = common:idf
|
2021-09-20 11:47:51 +02:00
|
|
|
; when changing this also copy it to esphome-docker-base images
|
|
|
|
platform = platformio/espressif32 @ 3.3.2
|
|
|
|
platform_packages =
|
|
|
|
platformio/framework-espidf @ ~3.40300.0
|
|
|
|
|
|
|
|
framework = espidf
|
|
|
|
lib_deps =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:idf.lib_deps}
|
|
|
|
espressif/esp32-camera@1.0.0 ; esp32_camera
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:idf.build_flags}
|
|
|
|
-Wno-nonnull-compare
|
|
|
|
-DUSE_ESP32
|
2021-09-20 11:47:51 +02:00
|
|
|
-DUSE_ESP32_FRAMEWORK_ESP_IDF
|
2022-01-11 03:24:26 +01:00
|
|
|
extra_scripts = post:esphome/components/esp32/post_build.py
|
2021-08-09 22:43:18 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
; All the actual environments are defined below.
|
|
|
|
[env:esp8266-arduino]
|
|
|
|
extends = common:esp8266-arduino
|
|
|
|
board = nodemcuv2
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2022-01-05 21:30:15 +01:00
|
|
|
${common:esp8266-arduino.build_flags}
|
|
|
|
${flags:runtime.build_flags}
|
2021-08-09 22:43:18 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
[env:esp8266-arduino-tidy]
|
|
|
|
extends = common:esp8266-arduino
|
|
|
|
board = nodemcuv2
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2022-01-05 21:30:15 +01:00
|
|
|
${common:esp8266-arduino.build_flags}
|
|
|
|
${flags:clangtidy.build_flags}
|
2021-08-09 22:43:18 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
[env:esp32-arduino]
|
2021-09-21 17:12:17 +02:00
|
|
|
extends = common:esp32-arduino
|
2022-01-05 21:30:15 +01:00
|
|
|
board = esp32dev
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:esp32-arduino.build_flags}
|
2022-01-05 21:30:15 +01:00
|
|
|
${flags:runtime.build_flags}
|
2021-08-09 22:43:18 +02:00
|
|
|
|
2022-01-05 21:30:15 +01:00
|
|
|
[env:esp32-arduino-tidy]
|
2021-09-21 17:12:17 +02:00
|
|
|
extends = common:esp32-arduino
|
2022-01-05 21:30:15 +01:00
|
|
|
board = esp32dev
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:esp32-arduino.build_flags}
|
2022-01-05 21:30:15 +01:00
|
|
|
${flags:clangtidy.build_flags}
|
2021-09-20 11:47:51 +02:00
|
|
|
|
|
|
|
[env:esp32-idf]
|
2021-09-21 17:12:17 +02:00
|
|
|
extends = common:esp32-idf
|
2022-01-05 21:30:15 +01:00
|
|
|
board = esp32dev
|
2021-09-21 17:12:17 +02:00
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32-idf
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:esp32-idf.build_flags}
|
2022-01-05 21:30:15 +01:00
|
|
|
${flags:runtime.build_flags}
|
2021-09-20 11:47:51 +02:00
|
|
|
|
|
|
|
[env:esp32-idf-tidy]
|
2021-09-21 17:12:17 +02:00
|
|
|
extends = common:esp32-idf
|
2022-01-05 21:30:15 +01:00
|
|
|
board = esp32dev
|
2021-09-21 17:12:17 +02:00
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32-idf-tidy
|
2021-09-20 11:47:51 +02:00
|
|
|
build_flags =
|
2021-09-21 17:12:17 +02:00
|
|
|
${common:esp32-idf.build_flags}
|
2022-01-05 21:30:15 +01:00
|
|
|
${flags:clangtidy.build_flags}
|
|
|
|
|
|
|
|
[env:esp32c3-idf]
|
|
|
|
extends = common:esp32-idf
|
|
|
|
board = esp32-c3-devkitm-1
|
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32c3-idf
|
|
|
|
build_flags =
|
|
|
|
${common:esp32-idf.build_flags}
|
|
|
|
${flags:runtime.build_flags}
|
|
|
|
|
|
|
|
[env:esp32c3-idf-tidy]
|
|
|
|
extends = common:esp32-idf
|
|
|
|
board = esp32-c3-devkitm-1
|
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32c3-idf-tidy
|
|
|
|
build_flags =
|
|
|
|
${common:esp32-idf.build_flags}
|
|
|
|
${flags:clangtidy.build_flags}
|
|
|
|
|
|
|
|
[env:esp32s2-idf]
|
|
|
|
extends = common:esp32-idf
|
|
|
|
board = esp32-s2-kaluga-1
|
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32s2-idf
|
|
|
|
build_flags =
|
|
|
|
${common:esp32-idf.build_flags}
|
|
|
|
${flags:runtime.build_flags}
|
|
|
|
|
|
|
|
[env:esp32s2-idf-tidy]
|
|
|
|
extends = common:esp32-idf
|
|
|
|
board = esp32-s2-kaluga-1
|
|
|
|
board_build.esp-idf.sdkconfig_path = .temp/sdkconfig-esp32s2-idf-tidy
|
|
|
|
build_flags =
|
|
|
|
${common:esp32-idf.build_flags}
|
|
|
|
${flags:clangtidy.build_flags}
|