Flash Memory Size

If you have a 4 MB ESP32, you can get 1.89 MB of Flash space by killing the ability to update OTA.

Warning: I’ve only done this on an ESP32 not connected to a Jackpot although there’s no reason it wouldn’t work. Do you need to do this? No. Should you do it anyway? Probably not.

image
image

Chances are you’ve never updated OTA. I haven’t. That allows you to upload the firmware.bin file via the WebUI to update the firmware. You can still update via PlatformIO and the FluidNC Web Installer.

To do this:

  1. In the root directory (the one that contains platformio.ini), create a file called custom_littlefs.csv with the following as the contents:
# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x1E0000,
spiffs,   data, spiffs,  0x1F0000,0x210000,

  1. Update platformio_override.ini (or create if it doesn’t exist) with the following content:
[common_esp32_base]
board_build.partitions = custom_littlefs.csv
board_upload.maximum_size = 4194304
board_upload.flash_size = 4MB
  1. Do a normal PlatformIO flash.

After you do this once, you can go back to using the Web Installer going forward. Just use “firmware-update” and not "fresh-install*.

image

3 Likes