moving build selection into platformio.ini rather than nasty #defines. thanks to @sensorslot

for the pointer to https://github.com/arendst/Tasmota - where I just borrowed heavily ;-)
This commit is contained in:
geeksville
2020-03-27 14:03:58 -07:00
parent 5c4ae6c042
commit d831beab3d
7 changed files with 53 additions and 46 deletions
+15 -10
View File
@@ -9,10 +9,15 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = tbeam
[env:esp32]
[common]
; default to a US frequency range, change it as needed for your region and hardware (CN, JP, EU433, EU865)
hw_version = US
[env]
platform = espressif32
board = ttgo-t-beam
; board = ttgo-t-beam
; board = heltec_wifi_lora_32_V2
framework = arduino
@@ -22,14 +27,13 @@ board_build.partitions = partition-table.csv
; note: we add src to our include search path so that lmic_project_config can override
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
build_flags = -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -Wl,-Map,.pio/build/esp32/output.map -DAXP_DEBUG_PORT=Serial
build_flags = -Wall -Wextra -Wno-missing-field-initializers -Isrc -Os -Wl,-Map,.pio/build/output.map -DAXP_DEBUG_PORT=Serial -DHW_VERSION_${common.hw_version}
; not needed included in ttgo-t-beam board file
; also to use PSRAM https://docs.platformio.org/en/latest/platforms/espressif32.html#external-ram-psram
; -DBOARD_HAS_PSRAM
; -mfix-esp32-psram-cache-issue
; -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
upload_speed = 921600
@@ -55,8 +59,6 @@ debug_tool = jlink
debug_init_break = tbreak setup
; Note: some libraries are specified by #ID where there are conflicting library
; names.
lib_deps =
https://github.com/meshtastic/RadioHead.git
https://github.com/meshtastic/esp8266-oled-ssd1306.git ; ESP8266_SSD1306
@@ -68,9 +70,12 @@ lib_deps =
https://github.com/meshtastic/arduino-fsm.git
https://github.com/meshtastic/SparkFun_Ublox_Arduino_Library.git
;[env:tbeam]
;board = ttgo-t-beam
[env:tbeam]
board = ttgo-t-beam
lib_deps =
${env.lib_deps}
AXP202X_Library
;[env:heltec]
[env:heltec]
;build_type = debug ; to make it possible to step through our jtag debugger
;board = heltec_wifi_lora_32_V2
board = heltec_wifi_lora_32_V2