lora-gateway / esxp1302

An 8-channel ESP32 LoRa Gateway based on SX1302
Other
45 stars 23 forks source link

flash space not enough for esp32c3 #14

Closed dennis4lora closed 4 months ago

dennis4lora commented 4 months ago

When building for esp32c3 using PlatformIO, it failed with below error:

...
Linking .pio/build/esp32c3/firmware.elf
Retrieving maximum program size .pio/build/esp32c3/firmware.elf
Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (1050666 bytes) is greater than maximum allowed (1048576 bytes)
*** [checkprogsize] Explicit exit, status 1
RAM:   [===       ]  33.2% (used 108836 bytes from 327680 bytes)
Flash: [==========]  100.2% (used 1050666 bytes from 1048576 bytes)

So it's time to take some actions to optimize the flash usage now...

danielkucera commented 4 months ago

Interesting, it fits for me:

Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [===       ]  33.2% (used 108836 bytes from 327680 bytes)
Flash: [==========]  99.0% (used 1037658 bytes from 1048576 bytes)
Building .pio/build/esp32c3/firmware.bin
esptool.py v4.4
Creating esp32c3 image...
Merged 2 ELF sections
Successfully created esp32c3 image.
danielkucera commented 4 months ago

No, you were right. Fix in #15 .

dennis4lora commented 4 months ago

Verified and it's fixed. Thanks.