restructured Project Build Configuration

This commit is contained in:
Marcel Peterkau 2023-05-01 11:59:19 +02:00
parent bea78c0020
commit caff1c185f
3 changed files with 45 additions and 27 deletions

View File

@ -16,13 +16,9 @@ typedef enum DTCNums_e
DTC_EEPROM_VERSION_BAD, DTC_EEPROM_VERSION_BAD,
DTC_FLASHFS_ERROR, DTC_FLASHFS_ERROR,
DTC_FLASHFS_VERSION_ERROR, DTC_FLASHFS_VERSION_ERROR,
#ifdef FEATURE_ENABLE_GPS
DTC_NO_GPS_SERIAL, DTC_NO_GPS_SERIAL,
#endif
#ifdef FEATURE_ENABLE_CAN
DTC_CAN_TRANSCEIVER_FAILED, DTC_CAN_TRANSCEIVER_FAILED,
DTC_NO_CAN_SIGNAL, DTC_NO_CAN_SIGNAL,
#endif
DTC_EEPROM_CFG_SANITY, DTC_EEPROM_CFG_SANITY,
DTC_LAST_DTC DTC_LAST_DTC
} DTCNums_t; } DTCNums_t;

View File

@ -11,19 +11,13 @@
[platformio] [platformio]
extra_configs = extra_configs =
wifi_credentials.ini wifi_credentials.ini
default_envs = pcb_rev_1.3, pcb_rev_1.2
[env:d1_mini] [env]
platform = espressif8266 platform = espressif8266
board = d1_mini board = d1_mini
framework = arduino framework = arduino
upload_protocol = esptool
upload_speed = 921600
;upload_port = ChainLube_DDEFB2
;upload_protocol = espota
;upload_flags =
; --auth=${wifi_cred.admin_password}
build_flags = build_flags =
!python git_rev_macro.py !python git_rev_macro.py
-DWIFI_SSID_CLIENT=${wifi_cred.wifi_ssid_client} -DWIFI_SSID_CLIENT=${wifi_cred.wifi_ssid_client}
@ -32,31 +26,56 @@ build_flags =
-DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password} -DWIFI_AP_PASSWORD=${wifi_cred.wifi_ap_password}
-DWIFI_AP_IP_GW=10,0,0,1 -DWIFI_AP_IP_GW=10,0,0,1
-DATOMIC_FS_UPDATE -DATOMIC_FS_UPDATE
;-DFEATURE_ENABLE_WIFI_CLIENT
-DFEATURE_ENABLE_OLED
;-DFEATURE_ENABLE_TIMER
-DFEATURE_ENABLE_CAN
;-DFEATURE_ENABLE_GPS
-DFEATURE_ENABLE_WEBSOCKETS
-DPCB_REV=3
;build_type = debug
board_build.filesystem = littlefs board_build.filesystem = littlefs
extra_scripts = post:prepare_littlefs.py extra_scripts =
post:prepare_littlefs.py
pre:prepare_fwfiles.py
monitor_filters = esp8266_exception_decoder monitor_filters = esp8266_exception_decoder
monitor_speed = 115200 monitor_speed = 115200
board_build.ldscript = eagle.flash.4m1m.ld
lib_ldf_mode = deep lib_ldf_mode = deep
lib_deps = lib_deps =
olikraus/U8g2 @ ^2.28.8 olikraus/U8g2 @ ^2.28.8
adafruit/Adafruit NeoPixel @ ^1.11.0 adafruit/Adafruit NeoPixel @ ^1.11.0
;https://github.com/FastLED/FastLED.git#3d2ab78 ;fastled/FastLED @ ^3.5.0
sstaub/Ticker @ ^4.2.0 sstaub/Ticker @ ^4.2.0
coryjfowler/mcp_can @ ^1.5.0
robtillaart/I2C_EEPROM @ ^1.5.2 robtillaart/I2C_EEPROM @ ^1.5.2
mikalhart/TinyGPSPlus @ ^1.0.3
me-no-dev/ESP Async WebServer @ ^1.2.3 me-no-dev/ESP Async WebServer @ ^1.2.3
bblanchon/ArduinoJson @ ^6.19.4 bblanchon/ArduinoJson @ ^6.19.4
[env:pcb_rev_1.3]
;build_type = debug
pcb_revision = 3
build_flags =
${env.build_flags}
;-DFEATURE_ENABLE_WIFI_CLIENT
;-DFEATURE_ENABLE_TIMER
;-DFEATURE_ENABLE_GPS
-DFEATURE_ENABLE_OLED
-DFEATURE_ENABLE_WEBSOCKETS
-DFEATURE_ENABLE_CAN
-DPCB_REV=${this.pcb_revision}
board_build.ldscript = eagle.flash.4m1m.ld
lib_deps =
${env.lib_deps}
coryjfowler/mcp_can @ ^1.5.0
mikalhart/TinyGPSPlus @ ^1.0.3
[env:pcb_rev_1.2]
;build_type = debug
pcb_revision = 2
build_flags =
${env.build_flags}
;-DFEATURE_ENABLE_WIFI_CLIENT
;-DFEATURE_ENABLE_TIMER
-DFEATURE_ENABLE_OLED
-DFEATURE_ENABLE_WEBSOCKETS
-DPCB_REV=${this.pcb_revision}
board_build.ldscript = eagle.flash.4m1m.ld
lib_deps =
${env.lib_deps}

View File

@ -0,0 +1,3 @@
Import("env")
env.Replace(PROGNAME="firmware_pcb_1.%s.fw" % env.GetProjectOption("pcb_revision"))