From 1bda9c953e427abd3f4762894c07ff2379d1bc0c Mon Sep 17 00:00:00 2001 From: geeksville Date: Sat, 1 Feb 2020 09:46:25 -0800 Subject: [PATCH] grow our app space in flash --- TODO.md | 14 ++++++++++++++ partition-table.csv | 7 +++++++ platformio.ini | 4 ++++ src/configuration.h | 2 +- 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 TODO.md create mode 100644 partition-table.csv diff --git a/TODO.md b/TODO.md new file mode 100644 index 000000000..cf1e74b12 --- /dev/null +++ b/TODO.md @@ -0,0 +1,14 @@ + + +# High priority + +* add mesh layer +* wrap in nice MeshRadio class + +# Medium priority + +* add interrupt detach/sleep mode config to lora radio so we can enable deepsleep without panicing + +# Done + +* change the partition table to take advantage of the 4MB flash on the wroom: http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables diff --git a/partition-table.csv b/partition-table.csv new file mode 100644 index 000000000..80243db6d --- /dev/null +++ b/partition-table.csv @@ -0,0 +1,7 @@ +# This is a layout for 4MB of flash +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x1c0000, +app1, app, ota_1, 0x1d0000,0x1c0000, +spiffs, data, spiffs, 0x390000,0x070000, \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 46c528bc8..0c273adec 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,6 +15,10 @@ platform = espressif32 board = ttgo-t-beam framework = arduino +; customize the partition table +; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables +board_build.partitions = partition-table.csv + ; note: we add src to our include search path so that lmic_project_config can override build_flags = -Wall -Wextra -Wno-missing-field-initializers -O3 -Wl,-Map,.pio/build/esp32/output.map ; -DLOG_LOCAL_LEVEL=ESP_LOG_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG diff --git a/src/configuration.h b/src/configuration.h index ff6568687..b9b05dc61 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -42,7 +42,7 @@ along with this program. If not, see . #define DEBUG_PORT Serial // Serial debug port #define SERIAL_BAUD 115200 // Serial debug baud rate -#define SLEEP_BETWEEN_MESSAGES true // Do sleep between messages +#define SLEEP_BETWEEN_MESSAGES false // Do sleep between messages #define SEND_INTERVAL (5 * 60 * 1000) // Sleep for these many millis #define MESSAGE_TO_SLEEP_DELAY 5000 // Time after message before going to sleep #define LOGO_DELAY 5000 // Time to show logo on first boot