Huy Bui Quang
Huy Bui Quang

Reputation: 1

ESP32C3 Flash memory overflow

I 'm using ESP32C3 to develop function including: connect to wifi and bluetooth as well. So far, With Wifi connection function, It worked well and available update OTA via websocket And now, I'm adding bluetooth function but I faced problem that flash memory of device is overflow. I try customize partitions table as below but look like It was over 4MB of device. If I try add more code mybe, size of bin file will be more and can't upload to device So Please give me advise for this case. Thanks so much

My partitions table:

ESP-IDF Partition Table

Name Type SubType Offset Size Flags

  • nvs data nvs 0x9000 16K
  • OTA Data data ota 8K
  • phy_init data phy 4K
  • factory app factory 0x14173A
  • ota 0 app ota_0 0x14173A
  • ota 1 app ota_1 0x14173A

Error:

Error: All app partitions are too small for binary project-name.bin size 0x184e30:

  • Part 'factory' 0/0 @ 0x10000 size 0x14173a (overflow 0x436f6)
  • Part 'ota 0' 0/16 @ 0x160000 size 0x14173a (overflow 0x436f6)
  • Part 'ota 1' 0/17 @ 0x2b0000 size 0x14173a (overflow 0x436f6) ninja: build stopped: subcommand failed.
  1. Try seprate paritions table but not good solution because If I add more feature to project,memory will overflow because Flash of ESP32 only 4MB
  2. Try change config in menuconfig but not help

Upvotes: 0

Views: 435

Answers (1)

Tarmo
Tarmo

Reputation: 4770

Your current partition table splits your Flash into 3 equal parts: 1 for the "factory" fallback image and 2 for OTA partitions, each 1.25 MiB. Your image is 1.5 MiB and doesn't fit. You have two options - buy a board with bigger Flash or re-organize the Flash so it has fewer partitions. E.g. lose the "factory" partition and you have space for 2 OTA partitions 1.8 MiB each.

Upvotes: 2

Related Questions