mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
move around build defines
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
#ifndef Features_h
|
#ifndef Features_h
|
||||||
#define Features_h
|
#define Features_h
|
||||||
|
|
||||||
|
// modified by Proddy
|
||||||
|
|
||||||
#define FT_ENABLED(feature) feature
|
#define FT_ENABLED(feature) feature
|
||||||
|
|
||||||
// project feature off by default
|
// project feature on by default
|
||||||
#ifndef FT_PROJECT
|
#ifndef FT_PROJECT
|
||||||
#define FT_PROJECT 0
|
#define FT_PROJECT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// security feature on by default
|
// security feature on by default
|
||||||
@@ -23,14 +25,14 @@
|
|||||||
#define FT_NTP 1
|
#define FT_NTP 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// mqtt feature on by default
|
// ota feature on by default
|
||||||
#ifndef FT_OTA
|
#ifndef FT_OTA
|
||||||
#define FT_OTA 1
|
#define FT_OTA 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// upload firmware feature off by default
|
// upload firmware feature on by default
|
||||||
#ifndef FT_UPLOAD_FIRMWARE
|
#ifndef FT_UPLOAD_FIRMWARE
|
||||||
#define FT_UPLOAD_FIRMWARE 0
|
#define FT_UPLOAD_FIRMWARE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
; example custom platformio.ini file for EMS-ESP
|
; example custom platformio.ini file for EMS-ESP
|
||||||
;
|
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
@@ -9,9 +8,10 @@ upload_flags =
|
|||||||
upload_port = 10.10.10.101
|
upload_port = 10.10.10.101
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
; debug_flags = -DENABLE_CORS -DEMSESP_TEST
|
; EMSESP_DEBUG EMSESP_UART_DEBUG EMSESP_TEST ENABLE_CORS DEMSESP_DEFAULT_BOARD_PROFILE
|
||||||
|
; debug_flags = -DENABLE_CORS -DCORS_ORIGIN=\"http://localhost:3000\"
|
||||||
; debug_flags = -DEMSESP_DEBUG -DEMSESP_TEST
|
; debug_flags = -DEMSESP_DEBUG -DEMSESP_TEST
|
||||||
; debug_flags = -DEMSESP_DEFAULT_BOARD_PROFILE=\"LOLIN\"
|
; debug_flags = -DEMSESP_DEFAULT_BOARD_PROFILE=\"NODEMCU\"
|
||||||
|
|
||||||
[env:esp32]
|
[env:esp32]
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
|
|||||||
@@ -9,42 +9,28 @@ extra_configs =
|
|||||||
pio_local.ini
|
pio_local.ini
|
||||||
|
|
||||||
[common]
|
[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
|
core_build_flags = -Wno-deprecated-declarations
|
||||||
-Wreturn-type
|
-Wreturn-type
|
||||||
-DCORE_DEBUG_LEVEL=0
|
-DCORE_DEBUG_LEVEL=0
|
||||||
-DNDEBUG
|
-DNDEBUG
|
||||||
|
|
||||||
esp32_build_flags = -DARDUINO_ARCH_ESP32=1
|
esp32_build_flags = -DARDUINO_ARCH_ESP32=1 -DESP32=1
|
||||||
-DESP32=1
|
|
||||||
-DBOARD_HAS_PSRAM
|
|
||||||
; -std=c17 -std=c++17 -std=gnu++17
|
; -std=c17 -std=c++17 -std=gnu++17
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${common.core_build_flags}
|
${common.core_build_flags}
|
||||||
${factory_settings.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 ONEWIRE_CRC16=0
|
||||||
-D NO_GLOBAL_ARDUINOOTA
|
-D NO_GLOBAL_ARDUINOOTA
|
||||||
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
-D ARDUINOJSON_ENABLE_STD_STRING=1
|
||||||
-D CORS_ORIGIN=\"http://localhost:3000\"
|
|
||||||
|
|
||||||
build_unflags = -Wall
|
build_unflags = -Wall -Wdeprecated-declarations
|
||||||
-Wdeprecated-declarations
|
|
||||||
|
|
||||||
esp32_build_unflags =
|
esp32_build_unflags =
|
||||||
; -std=gnu++11
|
; -std=gnu++11
|
||||||
|
|
||||||
|
; set these in your pio_local.ini
|
||||||
debug_flags =
|
debug_flags =
|
||||||
; -D EMSESP_DEBUG
|
|
||||||
; -D EMSESP_UART_DEBUG
|
|
||||||
; -D EMSESP_TEST
|
|
||||||
; -D ENABLE_CORS
|
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
framework = arduino
|
framework = arduino
|
||||||
@@ -52,7 +38,6 @@ monitor_speed = 115200
|
|||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
build_type = release
|
build_type = release
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = chain+
|
||||||
; lib_compat_mode = strict
|
|
||||||
|
|
||||||
check_tool = cppcheck, clangtidy
|
check_tool = cppcheck, clangtidy
|
||||||
check_severity = high, medium
|
check_severity = high, medium
|
||||||
@@ -62,8 +47,7 @@ check_flags =
|
|||||||
|
|
||||||
; build for GitHub Actions CI
|
; build for GitHub Actions CI
|
||||||
[env:ci]
|
[env:ci]
|
||||||
extra_scripts =
|
extra_scripts = scripts/rename_fw.py
|
||||||
scripts/rename_fw.py
|
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
|
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
|
||||||
@@ -76,11 +60,11 @@ extra_scripts =
|
|||||||
scripts/rename_fw.py
|
scripts/rename_fw.py
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
;platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.2
|
; platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.2
|
||||||
; ; toolchain-xtensa32 @ 2.80200.200226
|
; toolchain-xtensa32 @ 2.80200.200226
|
||||||
; ; toolchain-xtensa32 @ 5.100200.201223
|
; toolchain-xtensa32 @ 5.100200.201223
|
||||||
; toolchain-xtensa32 @ 2.80400.2020 ; c70ec8a-toolchain-xtensa32-linux_x86_64-2.80400.2020.tar.gz
|
; toolchain-xtensa32 @ 2.80400.2020
|
||||||
; platform = https://github.com/platformio/platform-espressif32.git
|
; platform = https://github.com/platformio/platform-espressif32.git
|
||||||
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv ; https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/
|
board_build.partitions = esp32_partition_app1984k_spiffs64k.csv
|
||||||
build_flags = ${common.build_flags} ${common.esp32_build_flags} ${common.debug_flags}
|
build_flags = ${common.build_flags} ${common.esp32_build_flags} ${common.debug_flags}
|
||||||
build_unflags = ${common.build_unflags} ${common.esp32_build_unflags}
|
build_unflags = ${common.build_unflags} ${common.esp32_build_unflags}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#define EMSESP_APP_VERSION "3.0.1b5"
|
#define EMSESP_APP_VERSION "3.0.1b6"
|
||||||
#define EMSESP_PLATFORM "ESP32"
|
#define EMSESP_PLATFORM "ESP32"
|
||||||
|
|||||||
Reference in New Issue
Block a user