mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
96 lines
2.6 KiB
INI
96 lines
2.6 KiB
INI
; PlatformIO Project Configuration File for EMS-ESP
|
|
|
|
[platformio]
|
|
; default_envs = esp8266
|
|
; default_envs = esp32
|
|
|
|
# override any settings with your own local ones in pio_local.ini
|
|
extra_configs =
|
|
factory_settings.ini
|
|
pio_local.ini
|
|
|
|
[common]
|
|
debug_flags =
|
|
; -D EMSESP_DEBUG
|
|
; -D EMSESP_UART_DEBUG
|
|
; -D EMSESP_FORCE_SERIAL
|
|
|
|
; 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}
|
|
-D FT_PROJECT=1
|
|
-D FT_SECURITY=1
|
|
-D FT_MQTT=1
|
|
-D FT_OTA=1
|
|
-D FT_NTP=1
|
|
-D FT_UPLOAD_FIRMWARE=1
|
|
-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
|
|
|
|
libs_core =
|
|
; ArduinoJson
|
|
; ESPAsyncTCP
|
|
; AsyncTCP
|
|
; AsyncMqttClient
|
|
|
|
[env]
|
|
extra_scripts =
|
|
pre:scripts/build_interface.py
|
|
scripts/main_script.py
|
|
scripts/rename_fw.py
|
|
scripts/gzip_fw.py
|
|
|
|
framework = arduino
|
|
monitor_speed = 115200
|
|
|
|
; on OSX with non-native drivers use upload_speed = 115200
|
|
upload_speed = 921600
|
|
|
|
lib_ldf_mode = chain+
|
|
|
|
check_tool = cppcheck, clangtidy
|
|
check_severity = high, medium
|
|
check_flags =
|
|
cppcheck: --std=c++11 -v
|
|
clangtidy: --checks=-*,clang-analyzer-*,performance-*
|
|
|
|
; USB upload
|
|
; upload_protocol = esptool
|
|
; upload_port = COM4
|
|
; upload_port = /dev/cu.wchusbserial1410
|
|
|
|
; OTA upload
|
|
upload_protocol = espota
|
|
upload_flags =
|
|
--port=8266
|
|
--auth=ems-esp-neo
|
|
upload_port = ems-esp.local
|
|
|
|
[env:esp8266]
|
|
board = esp12e ; https://github.com/platformio/platform-espressif8266/tree/master/boards
|
|
build_type = release
|
|
platform = espressif8266 ; https://github.com/platformio/platform-espressif8266/releases
|
|
board_build.filesystem = littlefs
|
|
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}
|
|
lib_ignore =
|
|
AsyncTCP
|
|
|
|
[env:esp32]
|
|
board = esp32dev
|
|
build_type = release
|
|
platform = espressif32
|
|
; platform = https://github.com/platformio/platform-espressif32.git
|
|
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}
|