Files
EMS-ESP32/platformio.ini
2021-01-03 18:03:41 +01:00

136 lines
4.8 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]
; 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
core_build_flags = -Wno-deprecated-declarations
-Wreturn-type
-DCORE_DEBUG_LEVEL=0
-DNDEBUG
esp8266_build_flags = -free
-mtarget-align
-fipa-pta
-Wreturn-type
-DFP_IN_IROM
-DBEARSSL_SSL_BASIC
-DVTABLES_IN_FLASH
-DPSTR_ALIGN=1 ; remove the 4-bytes alignment for PSTR()
-std=c17 -std=c++17 -std=gnu++17
esp32_build_flags = -DARDUINO_ARCH_ESP32=1
-DESP32=1
-DBOARD_HAS_PSRAM
build_flags =
${common.core_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\"
build_unflags = -Wall
-Wdeprecated-declarations
esp8266_build_unflags = -std=gnu++11
esp32_build_unflags =
debug_flags =
; -D EMSESP_DEBUG
; -D EMSESP_UART_DEBUG
; -D EMSESP_TEST
; -D EMSESP_FORCE_SERIAL
; -D ENABLE_CORS
[env]
framework = arduino
monitor_speed = 115200
upload_speed = 921600
build_type = release
lib_ldf_mode = chain+
; lib_compat_mode = strict
check_tool = cppcheck, clangtidy
check_severity = high, medium
check_flags =
cppcheck: --std=c++11 -v
clangtidy: --checks=-*,clang-analyzer-*,performance-*
; build for GitHub Actions CI
[env:esp8266-ci]
extra_scripts =
scripts/main_script.py
scripts/rename_fw.py
board = esp12e
platform = espressif8266
board_build.filesystem = littlefs
board_build.f_cpu = 160000000L
build_flags = ${common.build_flags} ${common.esp8266_build_flags}
build_unflags = ${common.build_unflags} ${common.esp8266_build_unflags}
; build for GitHub Actions CI
[env:esp32-ci]
extra_scripts =
scripts/rename_fw.py
board = esp32dev
platform = espressif32
board_build.partitions = min_spiffs.csv
build_flags = ${common.build_flags} ${common.esp32_build_flags}
build_unflags = ${common.build_unflags} ${common.esp32_build_unflags}
[env:esp8266]
extra_scripts =
pre:scripts/build_interface.py
scripts/main_script.py
scripts/rename_fw.py
board = esp12e ; https://github.com/platformio/platform-espressif8266/tree/master/boards
platform = espressif8266 ; https://github.com/platformio/platform-espressif8266/releases
platform_packages = platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git
; toolchain-xtensa @ ~2.100100.200706
; toolchain-xtensa @ 2.40802.200502
; toolchain-xtensa @ https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz
; platformio/tool-esptool @ 1.413.0
; platformio/tool-esptoolpy @ ~1.30000.0
mcspr/toolchain-xtensa @ 5.100200.201223
board_build.filesystem = littlefs
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.esp8266_build_flags} ${common.debug_flags}
build_unflags = ${common.build_unflags} ${common.esp8266_build_unflags}
lib_ignore =
AsyncTCP
[env:esp32]
extra_scripts =
pre:scripts/build_interface.py
scripts/rename_fw.py
board = esp32dev
platform = espressif32
; platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0
; ; toolchain-xtensa32 @ 2.80200.200226
; ; toolchain-xtensa32 @ 5.100200.201223
; toolchain-xtensa32 @ 2.80400.2020 ; c70ec8a-toolchain-xtensa32-linux_x86_64-2.80400.2020.tar.gz
; platform = https://github.com/platformio/platform-espressif32.git
board_build.partitions = min_spiffs.csv ; https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/
build_flags = ${common.build_flags} ${common.esp32_build_flags} ${common.debug_flags}
build_unflags = ${common.build_unflags} ${common.esp32_build_unflags}