From 9c855ede4712ee8782f4fa618794c0cce864291c Mon Sep 17 00:00:00 2001 From: Thomas Faour Date: Sat, 18 Jul 2026 11:20:19 -0400 Subject: [PATCH] Pin flash size + a larger app partition in sdkconfig.defaults The board's flash is 8MB, but neither flash size nor partition table were pinned in sdkconfig.defaults, so a fresh clone would silently fall back to IDF's default (2MB flash, ~1MB "single app" partition table) rather than what this project was actually being built/tested against. Building against that default left only 4% of the app partition free before the HTTP client work (task 6) even lands. Adds a custom partitions.csv with a 2MB app partition and pins CONFIG_ESPTOOLPY_FLASHSIZE_8MB so the committed config reproduces a working build for anyone else who clones this. --- firmware/partitions.csv | 4 ++++ firmware/sdkconfig.defaults | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 firmware/partitions.csv diff --git a/firmware/partitions.csv b/firmware/partitions.csv new file mode 100644 index 0000000..2c33a2a --- /dev/null +++ b/firmware/partitions.csv @@ -0,0 +1,4 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x6000, +phy_init, data, phy, 0xf000, 0x1000, +factory, app, factory, 0x10000, 0x200000, diff --git a/firmware/sdkconfig.defaults b/firmware/sdkconfig.defaults index 28720b5..c22b07b 100644 --- a/firmware/sdkconfig.defaults +++ b/firmware/sdkconfig.defaults @@ -1 +1,9 @@ CONFIG_LWIP_MAX_SOCKETS=16 + +# ESP32-C6 dev board has 8MB flash. A 2MB app partition (vs. the ~1MB +# "single app" default) gives headroom for the HTTP client, TLS, and image +# buffers still to come, without needing to fight for space on every build. +CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"