From 3f3f9eb801cc82277f9c40cd7050fc63fd1ee1da Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Sat, 23 Dec 2023 11:09:15 +0100 Subject: [PATCH] platformio: update platformio.ini with stream deps, simplify configs --- default-partitions.csv | 7 ++++ platformio.ini | 84 ++++++++++-------------------------------- 2 files changed, 26 insertions(+), 65 deletions(-) create mode 100644 default-partitions.csv diff --git a/default-partitions.csv b/default-partitions.csv new file mode 100644 index 0000000..960469b --- /dev/null +++ b/default-partitions.csv @@ -0,0 +1,7 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x140000, +app1, app, ota_1, 0x150000,0x140000, +spiffs, data, spiffs, 0x290000,0x160000, +coredump, data, coredump,0x3F0000,0x10000, diff --git a/platformio.ini b/platformio.ini index f2afbc0..fd157f6 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,75 +9,43 @@ ; https://docs.platformio.org/page/projectconf.html [env] -extra_scripts = pre:verify-configs.py, pre:build-hal.py -build_flags = - -DFASTLED_ALL_PINS_HARDWARE_SPI - -[common_env_data] src_filter = +<*>, -<.git/>, -<.svn/>, - lib_ldf_mode = chain+ +extra_scripts = pre:verify-configs.py, pre:build-hal.py +check_flags = + cppcheck: --inline-suppr --suppress=*:*/.pio/* +board_build.filesystem = littlefs +upload_speed = 115200 +monitor_speed = 115200 +build_type = debug +build_flags = + -DFASTLED_ALL_PINS_HARDWARE_SPI src_build_flags = + -DFASTLED_ALL_PINS_HARDWARE_SPI -DRENDERBUG_VERSION=3 -DRENDERBUG_LED_PIN=14 -DRENDERBUG_LED_PACKING=RGB -DDEFAULT_PATTERN_INDEX=0 -fstack-protector -Wall -lib_deps_external = +lib_deps = fastled/FastLED@^3.6.0 thijse/ArduinoLog@^1.1.0 bblanchon/ArduinoJson@^6.21.4 JsonStreamingParser LittleFS - -[config_u8display] -src_build_flags = - -DCONFIG_U8DISPLAY -lib_deps = - olikraus/U8g2@^2.34.15 -src_filter = "+" - -[config_ota] -src_build_flags = -src_filter = "+" -lib_deps = - -[config_nocolor] -src_build_flags = - -DCONFIG_NO_COLORDATA - -[config_buttons] -src_build_flags = - -DCONFIG_BUTTONS -src_filter = "+" - -[config_mpu5060] -src_build_flags = - -DCONFIG_MPU5060 -src_filter = "+" + knolleary/PubSubClient@^2.8.0 + bblanchon/StreamUtils@^1.8.0 [env:esp32] -extends = config_nocolor -board_build.filesystem = littlefs platform = espressif32 board = featheresp32 framework = arduino -check_flags = - cppcheck: --inline-suppr --suppress=*:*/.pio/* +board_build.partitions = default-partitions.csv src_build_flags = - ${common_env_data.src_build_flags} - ${config_nocolor.src_build_flags} - -DBOARD_ESP32 + ${env.src_build_flags} -DCONFIG_THREADED_INPUTS - -DRENDERBUG_LED_PIN=14 -lib_deps = - ${common_env_data.lib_deps_external} - BluetoothSerial - knolleary/PubSubClient@^2.8.0 -src_filter = "${common_env_data.src_filter}" monitor_filters = esp32_exception_decoder -monitor_speed = 115200 -upload_speed = 115200 [env:esp8266-12f] extends = env:esp8266 @@ -87,38 +55,24 @@ board = esp12e platform = atmelavr board = uno framework = arduino -lib_deps = - ${common_env_data.lib_deps_external} [env:esp8266] -check_flags = - cppcheck: --inline-suppr --suppress=*:*/.pio/* platform = espressif8266 board = huzzah framework = arduino -board_build.filesystem = littlefs monitor_filters = esp8266_exception_decoder -upload_speed = 115200 -monitor_speed = 115200 -src_build_flags = - ${common_env_data.src_build_flags} lib_deps = - ${common_env_data.lib_deps_external} - knolleary/PubSubClient@^2.8.0 + ${env.lib_deps} arduino-libraries/NTPClient@^3.1.0 ESP8266WiFi ESP8266mDNS ArduinoOTA -src_filter = "${common_env_data.src_filter}" [env:esp32_display] -extends = env:esp32, config_u8display -src_filter = "${env:esp32.src_filter} ${config_u8display.src_filter}" -build_type = debug +extends = env:esp32 lib_deps = ${env:esp32.lib_deps} - ${config_u8display.lib_deps} + olikraus/U8g2@^2.34.15 src_build_flags = ${env:esp32.src_build_flags} - ${config_u8display.src_build_flags} - -DRENDERBUG_LED_PIN=14 + -DCONFIG_U8DISPLAY