mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
lolin default
This commit is contained in:
257
platformio.ini
257
platformio.ini
@@ -1,71 +1,60 @@
|
||||
; PlatformIO Project Configuration File for EMS-ESP
|
||||
; override any settings with your own local ones in pio_local.ini
|
||||
; PlatformIO Project Configuration File
|
||||
;
|
||||
; Build options: build flags, source filter
|
||||
; Upload options: custom upload port, speed and extra flags
|
||||
; Library options: dependencies, extra library storages
|
||||
; Advanced options: extra scripting
|
||||
;
|
||||
; Please visit documentation for the other options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
; default_envs = esp32_4M
|
||||
; default_envs = lolin_s3
|
||||
; default_envs = esp32_16M
|
||||
; default_envs = standalone
|
||||
default_envs = https
|
||||
|
||||
default_envs = lolin_s3
|
||||
extra_configs =
|
||||
factory_settings.ini
|
||||
pio_local.ini
|
||||
factory_settings.ini
|
||||
pio_local.ini
|
||||
|
||||
[common]
|
||||
core_build_flags =
|
||||
-D ARDUINO_ARCH_ESP32=1
|
||||
-D ESP32=1
|
||||
; -std=gnu++17
|
||||
|
||||
; core_unbuild_flags = -std=gnu++11
|
||||
-D ARDUINO_ARCH_ESP32=1
|
||||
-D ESP32=1
|
||||
core_unbuild_flags =
|
||||
|
||||
; my_build_flags is set in pio_local.ini
|
||||
my_build_flags =
|
||||
|
||||
build_flags =
|
||||
${common.core_build_flags}
|
||||
${factory_settings.build_flags}
|
||||
${common.my_build_flags}
|
||||
-D ONEWIRE_CRC16=0
|
||||
-D NO_GLOBAL_ARDUINOOTA
|
||||
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
||||
-D ARDUINOJSON_USE_DOUBLE=0
|
||||
-D ARDUINOTRACE_ENABLE=0
|
||||
; -D CONFIG_UART_ISR_IN_IRAM
|
||||
|
||||
${common.core_build_flags}
|
||||
${factory_settings.build_flags}
|
||||
${common.my_build_flags}
|
||||
-D ONEWIRE_CRC16=0
|
||||
-D NO_GLOBAL_ARDUINOOTA
|
||||
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
||||
-D ARDUINOJSON_USE_DOUBLE=0
|
||||
-D ARDUINOTRACE_ENABLE=0
|
||||
-D CONFIG_ETH_ENABLED
|
||||
-D ARDUINOTRACE_ENABLE=0
|
||||
unbuild_flags =
|
||||
${common.core_unbuild_flags}
|
||||
${common.core_unbuild_flags}
|
||||
|
||||
[espressi32_base]
|
||||
platform = espressif32@6.5.0
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
board_build.filesystem = littlefs
|
||||
build_flags = ${common.build_flags}
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
extra_scripts =
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
|
||||
[espressi32_base_tasmota]
|
||||
; use Tasmota's libary which removes some libs (like mbedtsl) and increases available heap
|
||||
; platform = https://github.com/tasmota/platform-espressif32.git ; latest development
|
||||
; latest release with WiFi_secure.h
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip ; latest stable
|
||||
; latest arduino 2.xx release:
|
||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.11.01/platform-espressif32.zip
|
||||
; latest arduino 3.0/IDF 5.1.(alpha 3):
|
||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.12.10/platform-espressif32.zip
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip
|
||||
framework = arduino
|
||||
board_build.filesystem = littlefs
|
||||
build_flags =
|
||||
${common.build_flags}
|
||||
-DTASMOTA_SDK
|
||||
${common.build_flags}
|
||||
-DTASMOTA_SDK
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
extra_scripts =
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
|
||||
[env]
|
||||
monitor_speed = 115200
|
||||
@@ -73,16 +62,12 @@ monitor_filters = esp32_exception_decoder
|
||||
upload_speed = 921600
|
||||
build_type = release
|
||||
lib_ldf_mode = chain+
|
||||
; board_build.flash_mode = qio
|
||||
|
||||
check_tool = cppcheck, clangtidy
|
||||
check_severity = high, medium
|
||||
check_flags =
|
||||
cppcheck: --std=c++11 -v
|
||||
clangtidy: --checks=-*,clang-analyzer-*,performance-*
|
||||
cppcheck: --std=c++11 -v
|
||||
clangtidy: --checks=-*,clang-analyzer-*,performance-*
|
||||
|
||||
; build for GitHub Actions CI
|
||||
; the Web interface is built seperately
|
||||
[env:ci]
|
||||
extends = espressi32_base_tasmota
|
||||
extra_scripts = scripts/rename_fw.py
|
||||
@@ -99,9 +84,9 @@ board_upload.flash_size = 16MB
|
||||
board_build.partitions = esp32_partition_16M.csv
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
build_flags =
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
|
||||
[env:esp32_4M]
|
||||
extends = espressi32_base_tasmota
|
||||
@@ -109,8 +94,8 @@ board = esp32dev
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-Os
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-Os
|
||||
|
||||
[env:esp32_4Mplus]
|
||||
extends = espressi32_base_tasmota
|
||||
@@ -131,20 +116,18 @@ board = lolin_c3_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
|
||||
; lolin C3 mini v1 needs special wifi init.
|
||||
; https://www.wemos.cc/en/latest/c3/c3_mini_1_0_0.html#about-wifi
|
||||
[env:lolin_c3_mini_v1]
|
||||
extends = espressi32_base_tasmota
|
||||
board = lolin_c3_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-DBOARD_C3_MINI_V1
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
-DBOARD_C3_MINI_V1
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="C3MINI"'
|
||||
|
||||
[env:lolin_s2_mini]
|
||||
extends = espressi32_base_tasmota
|
||||
@@ -152,8 +135,8 @@ board = lolin_s2_mini
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
build_flags =
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S2MINI"'
|
||||
${espressi32_base_tasmota.build_flags}
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S2MINI"'
|
||||
|
||||
[env:lolin_s3]
|
||||
extends = espressi32_base
|
||||
@@ -164,91 +147,109 @@ board_build.partitions = esp32_partition_16M.csv
|
||||
board_upload.use_1200bps_touch = false
|
||||
board_upload.wait_for_upload_port = false
|
||||
build_flags =
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
${espressi32_base.build_flags}
|
||||
-O2
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="S32S3"'
|
||||
|
||||
[env:https]
|
||||
; use Tasmota's libary which removes some libs (like mbedtsl) and increases available heap
|
||||
; platform = https://github.com/tasmota/platform-espressif32.git ; latest development
|
||||
;
|
||||
; latest release with WiFi_secure.h
|
||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip ; latest stable
|
||||
;
|
||||
; latest arduino 2.xx release:
|
||||
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.11.01/platform-espressif32.zip
|
||||
;
|
||||
; latest arduino 3.0/IDF 5.1.(alpha 3):
|
||||
; platform = https://github.com/platformio/platform-espressif32.git
|
||||
; platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
|
||||
; platform_packages = https://github.com/espressif/arduino-esp32.git#3.0.0-alpha2
|
||||
platform = espressif32@6.5.0
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
board = esp32dev
|
||||
board_build.filesystem = littlefs
|
||||
board_build.f_cpu = 240000000L
|
||||
board_upload.flash_size = 4MB
|
||||
board_build.partitions = esp32_partition_4M.csv
|
||||
; board_upload.flash_size = 16MB
|
||||
; board_build.partitions = esp32_partition_16M.csv
|
||||
board_upload.use_1200bps_touch = false
|
||||
board_upload.wait_for_upload_port = true
|
||||
upload_port = /dev/ttyUSB0
|
||||
extra_scripts =
|
||||
; pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
build_unflags = ${common.unbuild_flags}
|
||||
build_flags =
|
||||
${common.core_build_flags}
|
||||
${factory_settings.build_flags}
|
||||
${common.my_build_flags}
|
||||
-D ONEWIRE_CRC16=0
|
||||
-D NO_GLOBAL_ARDUINOOTA
|
||||
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
||||
-D ARDUINOJSON_USE_DOUBLE=0
|
||||
-D ARDUINOTRACE_ENABLE=1
|
||||
; -D ARDUINOTRACE_ENABLE=0
|
||||
-D TASMOTA_SDK
|
||||
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN
|
||||
-D EMSESP_TEST
|
||||
-D EMSESP_DEBUG
|
||||
; -D CONFIG_ETH_ENABLED
|
||||
; -D ENABLE_ASYNC
|
||||
; -D BOARD_HAS_PSRAM
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="Test"'
|
||||
${common.core_build_flags}
|
||||
${factory_settings.build_flags}
|
||||
${common.my_build_flags}
|
||||
-D ONEWIRE_CRC16=0
|
||||
-D NO_GLOBAL_ARDUINOOTA
|
||||
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
||||
-D ARDUINOJSON_USE_DOUBLE=0
|
||||
-D ARDUINOTRACE_ENABLE=1
|
||||
-D TASMOTA_SDK
|
||||
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_WARN
|
||||
-D EMSESP_TEST
|
||||
-D EMSESP_DEBUG
|
||||
-D CONFIG_ETH_ENABLED
|
||||
'-DEMSESP_DEFAULT_BOARD_PROFILE="Test"'
|
||||
|
||||
; to build and run: pio run -e standalone -t exec
|
||||
[env:standalone]
|
||||
platform = native
|
||||
build_flags =
|
||||
-DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
||||
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.4-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-DARDUINOJSON_ENABLE_STD_STRING=1 -DARDUINOJSON_ENABLE_PROGMEM=1 -DARDUINOJSON_ENABLE_ARDUINO_STRING -DARDUINOJSON_USE_DOUBLE=0
|
||||
-DEMSESP_DEBUG -DEMSESP_STANDALONE -DEMSESP_TEST -D__linux__
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.6.4-dev\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-lpthread
|
||||
-std=gnu++11 -Og -ggdb
|
||||
-std=gnu++11 -Og -ggdb
|
||||
build_src_flags =
|
||||
; -Wall -Wextra -Werror -Wswitch-enum -Wno-unused-parameter -Wno-inconsistent-missing-override -Wno-unused-lambda-capture -Wno-sign-compare
|
||||
; -Wall -Wextra -Werror
|
||||
-Wno-missing-braces
|
||||
-I./lib_standalone
|
||||
-I./lib/ArduinoJson/src
|
||||
-I./lib/uuid-common/src
|
||||
-I./lib/uuid-console/src
|
||||
-I./lib/uuid-log/src
|
||||
-I./lib/semver
|
||||
-I./lib/PButton
|
||||
-I./lib/espMqttClient/src
|
||||
-I./lib/espMqttClient/src/Transport
|
||||
-Wno-missing-braces
|
||||
-I./lib_standalone
|
||||
-I./lib/ArduinoJson/src
|
||||
-I./lib/uuid-common/src
|
||||
-I./lib/uuid-console/src
|
||||
-I./lib/uuid-log/src
|
||||
-I./lib/semver
|
||||
-I./lib/PButton
|
||||
-I./lib/espMqttClient/src
|
||||
-I./lib/espMqttClient/src/Transport
|
||||
build_src_filter =
|
||||
+<*>
|
||||
-<.git/>
|
||||
+<../lib_standalone>
|
||||
+<../lib/uuid-common>
|
||||
+<../lib/uuid-console>
|
||||
+<../lib/uuid-log>
|
||||
+<../lib/semver>
|
||||
+<../lib/PButton>
|
||||
+<../lib/espMqttClient/src>
|
||||
+<../lib/espMqttClient/src/Transport>
|
||||
-<.git/>
|
||||
+<../lib_standalone>
|
||||
+<../lib/uuid-common>
|
||||
+<../lib/uuid-console>
|
||||
+<../lib/uuid-log>
|
||||
+<../lib/semver>
|
||||
+<../lib/PButton>
|
||||
+<../lib/espMqttClient/src>
|
||||
+<../lib/espMqttClient/src/Transport>
|
||||
lib_compat_mode = off
|
||||
lib_ldf_mode = off
|
||||
|
||||
[factory_settings]
|
||||
build_flags =
|
||||
-D FACTORY_WIFI_SSID=\"\"
|
||||
-D FACTORY_WIFI_PASSWORD=\"\"
|
||||
-D FACTORY_WIFI_HOSTNAME=\"ems-esp\"
|
||||
|
||||
-D FACTORY_AP_PROVISION_MODE=AP_MODE_DISCONNECTED
|
||||
-D FACTORY_AP_SSID=\"ems-esp\"
|
||||
-D FACTORY_AP_PASSWORD=\"ems-esp-neo\"
|
||||
-D FACTORY_AP_LOCAL_IP=\"192.168.4.1\"
|
||||
-D FACTORY_AP_GATEWAY_IP=\"192.168.4.1\"
|
||||
-D FACTORY_AP_SUBNET_MASK=\"255.255.255.0\"
|
||||
|
||||
-D FACTORY_ADMIN_USERNAME=\"admin\"
|
||||
-D FACTORY_ADMIN_PASSWORD=\"admin\"
|
||||
-D FACTORY_GUEST_USERNAME=\"guest\"
|
||||
-D FACTORY_GUEST_PASSWORD=\"guest\"
|
||||
|
||||
-D FACTORY_NTP_ENABLED=false
|
||||
-D FACTORY_NTP_TIME_ZONE_LABEL=\"Europe/Amsterdam\"
|
||||
-D FACTORY_NTP_TIME_ZONE_FORMAT=\"CET-1CEST,M3.5.0,M10.5.0/3\"
|
||||
-D FACTORY_NTP_SERVER=\"time.google.com\"
|
||||
|
||||
-D FACTORY_OTA_PORT=8266
|
||||
-D FACTORY_OTA_PASSWORD=\"ems-esp-neo\"
|
||||
-D FACTORY_OTA_ENABLED=false
|
||||
|
||||
-D FACTORY_MQTT_ENABLED=false
|
||||
-D FACTORY_MQTT_HOST=\"\"
|
||||
-D FACTORY_MQTT_PORT=1883
|
||||
-D FACTORY_MQTT_USERNAME=\"\"
|
||||
-D FACTORY_MQTT_PASSWORD=\"\"
|
||||
-D FACTORY_MQTT_CLIENT_ID=\"ems-esp\"
|
||||
-D FACTORY_MQTT_KEEP_ALIVE=60
|
||||
-D FACTORY_MQTT_CLEAN_SESSION=false
|
||||
-D FACTORY_MQTT_MAX_TOPIC_LENGTH=128
|
||||
|
||||
-D FACTORY_JWT_SECRET=\"ems-esp-neo\"
|
||||
|
||||
Reference in New Issue
Block a user