initial commit

This commit is contained in:
proddy
2020-07-05 18:29:08 +02:00
parent 26b201ea2f
commit c5933e8c14
739 changed files with 86566 additions and 20952 deletions

View File

@@ -1,117 +1,85 @@
;
; PlatformIO Project Configuration File for EMS-ESP
;
[platformio]
default_envs = release
; default_envs = debug
; default_envs = esp8266
default_envs = esp32
# override any settings with your own local ones in pio_local.ini
extra_configs =
factory_settings.ini
features.ini
pio_local.ini
[common]
# From https://github.com/esp8266/Arduino/blob/master/tools/sdk/ld
# eagle.flash.4m1m.ld = 1019 KB sketch, 1000 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 2052 KB OTA & buffer
# eagle.flash.4m2m.ld = same as above but with 2024 KB SPIFFS
# eagle.flash.4m.ld = same as above but with no SPIFFS storage
ldscript = eagle.flash.4m1m.ld
;debug_flags = -DDEBUG_ESP_PORT=Serial -DDEBUG_ESP_CORE -DDEBUG_ESP_SSL -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
debug_flags =
; -D EMSESP_DEBUG
; -D EMSESP_FORCE_SERIAL
; -D EMSESP_NO_LED
; custom build options are:
; -DMYESP_TIMESTAMP
; -DTESTS
; -DCRASH
; -DFORCE_SERIAL
; -DMYESP_DEBUG
; -DSENSOR_MQTT_USEID
; custom_flags = -DFORCE_SERIAL -DMYESP_DEBUG -DEMSESP_SIMULATE
custom_flags =
; default platformio compile flags are: -fno-rtti -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -ffunction-sections -fdata-sections -fno-exceptions -Wall
build_flags =
${factory_settings.build_flags}
${features.build_flags}
-D ONEWIRE_CRC16=0
-D NO_GLOBAL_ARDUINOOTA
-D ARDUINOJSON_ENABLE_STD_STRING=1
-D PROGMEM_WWW
-D CORS_ORIGIN=\"http://localhost:3000\"
; Uncomment ENABLE_CORS to enable Cross-Origin Resource Sharing (required for local React development)
; -D ENABLE_CORS
# Available lwIP variants (macros):
# -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (default)
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY = v2 Lower Memory
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH = v2 Higher Bandwidth
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_LOW_MEMORY
# Other flags
# -DVTABLES_IN_FLASH
# -DNO_GLOBAL_EEPROM
# -DBEARSSL_SSL_BASIC
# general_flags = -DNO_GLOBAL_EEPROM -DVTABLES_IN_FLASH -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
general_flags = -DNO_GLOBAL_EEPROM
build_flags = ${common.general_flags} -std=c++11 -fno-exceptions
libs_core =
ArduinoJson
ESP Async WebServer
AsyncMqttClient
1@^2.3.5 ; https://github.com/PaulStoffregen/OneWire
[env]
extra_scripts =
pre:scripts/build_interface.py
scripts/main_script.py
framework = arduino
platform = espressif8266
board_build.ldscript = ${common.ldscript}
lib_compat_mode = strict
lib_deps =
https://github.com/rlogiacco/CircularBuffer
https://github.com/PaulStoffregen/OneWire
https://github.com/me-no-dev/ESPAsyncWebServer
https://github.com/me-no-dev/ESPAsyncUDP
uuid-common@^1.1.0
uuid-log@^2.1.1
uuid-syslog@^2.0.4 ; https://github.com/nomis/mcu-uuid-syslog
JustWifi@2.0.2 ; https://github.com/xoseperez/justwifi
AsyncMqttClient@0.8.2 ; https://github.com/marvinroger/async-mqtt-client
EEPROM_Rotate@0.9.2 ; https://github.com/xoseperez/eeprom_rotate
ArduinoJson
ESPAsyncTCP@1.2.2 ; https://github.com/me-no-dev/ESPAsyncTCP
upload_speed = 921600
monitor_speed = 115200
upload_speed = 921600
; example ports for OSX
;upload_port = /dev/cu.wchusbserial14403
;upload_port = /dev/cu.usbserial-1440
check_tool = cppcheck, clangtidy
check_severity = high, medium
check_flags =
cppcheck: --std=c++11
clangtidy: --checks=-*,clang-analyzer-*,performance-*
; comment out this section if using USB and not OTA for firmware uploads
upload_protocol = espota
upload_port = ems-esp.local
; USB upload
upload_protocol = esptool
upload_port = COM6
; upload_port = /dev/cu.wchusbserial1420
#
# These following targets are used by TravisCI to build the firmware versions on Release
# Do not modify
#
[env:travis]
board = esp12e
build_flags = ${common.build_flags}
extra_scripts = scripts/main_script.py
; OTA upload
; upload_protocol = espota
; upload_flags =
; --port=8266
; --auth=ems-esp-neo
; upload_port = ems-esp.local
[env:esp12e]
board = esp12e
build_flags = ${common.build_flags}
extra_scripts = scripts/main_script.py
[env:d1_mini]
board = d1_mini
build_flags = ${common.build_flags}
extra_scripts = scripts/main_script.py
[env:nodemcuv2]
board = nodemcuv2
build_flags = ${common.build_flags}
extra_scripts = scripts/main_script.py
[env:nodemcu]
board = nodemcu
build_flags = ${common.build_flags}
extra_scripts = scripts/main_script.py
#
# These two targets below (release and debug) can be modified
#
[env:debug]
board = d1_mini
build_type = debug
build_flags = ${common.build_flags} ${common.custom_flags}
extra_scripts =
pre:scripts/pre_script.py
scripts/main_script.py
[env:release]
board = d1_mini
[env:esp8266]
board = esp12e ; https://github.com/platformio/platform-espressif8266/tree/master/boards
build_type = release
build_flags = ${common.build_flags} ${common.custom_flags}
extra_scripts =
pre:scripts/pre_script.py
scripts/main_script.py
platform = espressif8266 ; https://github.com/platformio/platform-espressif8266/releases
lib_deps = ${common.libs_core}
board_build.f_cpu = 160000000L ; 160MHz
; eagle.flash.4m1m.ld = 1019 KB sketch, 1000 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 2052 KB OTA & buffer
; eagle.flash.4m2m.ld = 1019 KB sketch, 2024 KB SPIFFS. 4KB EEPROM, 4KB RFCAL, 12KB WIFI stack, 1028 KB OTA & buffer
; board_build.ldscript = eagle.flash.4m2m.ld
build_flags = ${common.build_flags} ${common.debug_flags} -D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
lib_ignore =
AsyncTCP
[env:esp32]
board = esp32dev
build_type = release
platform = espressif32
board_build.partitions = min_spiffs.csv ; https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/
lib_deps = ${common.libs_core}
build_flags = ${common.build_flags} ${common.debug_flags}