From 1c372bae5e28a02547a0446ef83f6b867e2eadca Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 3 Jun 2018 11:19:06 +0200 Subject: [PATCH] platformio.ini restructured --- platformio.ini | 69 +++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/platformio.ini b/platformio.ini index 986c0d2c..a08d4c75 100644 --- a/platformio.ini +++ b/platformio.ini @@ -11,10 +11,10 @@ ; ---> SELECT TARGET PLATFORM HERE! <--- [platformio] -;env_default = heltec +env_default = heltec ;env_default = ttgov1 ;env_default = ttgov2 -env_default = ttgov21 +;env_default = ttgov21 ;env_default = lopy ;env_default = lopy4 ;env_default = fipy @@ -24,6 +24,10 @@ env_default = ttgov21 description = Paxcounter is a proof-of-concept ESP32 device for metering passenger flows in realtime. It counts how many mobile devices are around. [common_env_data] +platform_espressif32 = espressif32@>=1.0.1 +board_build.partitions = no_ota.csv +board_upload.maximum_size = 2097152 +monitor_speed = 115200 lib_deps_display = U8g2@>=2.22.14 lib_deps_rgbled = @@ -43,12 +47,11 @@ build_flags = -include "src/paxcounter.conf" [env:heltec] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = heltec_wifi_lora_32 -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} lib_deps = ${common_env_data.lib_deps_display} build_flags = @@ -56,12 +59,11 @@ build_flags = -include "src/hal/heltec.h" [env:ttgov1] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 115200 lib_deps = ${common_env_data.lib_deps_display} @@ -70,12 +72,11 @@ build_flags = -include "src/hal/ttgov1.h" [env:ttgov2] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_display} @@ -84,12 +85,11 @@ build_flags = -include "src/hal/ttgov2.h" [env:ttgov21] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_display} @@ -101,9 +101,8 @@ build_flags = platform = espressif32@1.0.1 framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_rgbled} @@ -112,12 +111,11 @@ build_flags = -include "src/hal/fipy.h" [env:lopy] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_rgbled} @@ -126,12 +124,11 @@ build_flags = -include "src/hal/lopy.h" [env:lopy4] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = esp32dev -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_rgbled} @@ -140,12 +137,11 @@ build_flags = -include "src/hal/lopy4.h" [env:lolin32lite] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = lolin32 -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 256000 lib_deps = ${common_env_data.lib_deps_rgbled} @@ -154,12 +150,11 @@ build_flags = -include "src/hal/lolin32lite_lora.h" [env:lolin32] -platform = espressif32@1.0.1 +platform = ${common_env_data.platform_espressif32} framework = arduino board = lolin32 -board_build.partitions = no_ota.csv -board_upload.maximum_size = 2097152 -monitor_speed = 115200 +board_build.partitions = ${common_env_data.board_build.partitions} +board_upload.maximum_size = ${common_env_data.board_upload.maximum_size} upload_speed = 921600 lib_deps = ${common_env_data.lib_deps_rgbled}