Skip to content

Supplementing the information on the esp32-c3 website and OTA downloads #3

@brightproject

Description

@brightproject

Hello @sigmdel
Thank you for your efforts regarding the site and the information on it😃

My hardware:
Image

I'm writing code for my ESP32-C3 Super Mini, and the compiled firmware takes up about 1.4 MB.
Initially, I had to specify in the configuration file platformio.ini like this:

[env:super_mini_esp32c3]
board_build.partitions = huge_app.csv

In this case, the space increased as follows:

RAM: [=] 13.7% (used 44760 bytes from 327680 bytes)
Flash: [====] 43.3% (used 1362374 bytes from 3145728 bytes)

But after some time, I needed to update the firmware over the air via OTA, and I couldn't do it.
I had to spend about three days searching for a solution.

And the solution is as follows, as I wrote above, the markup in the file huge_app.csv is like this:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x300000,
spiffs,   data, spiffs,  0x310000,0xE0000,
coredump, data, coredump,0x3F0000,0x10000,

In general, all the layouts for esp32-c3 have a similar layout, differing only in the sizes and offsets of the memory areas.

But it turns out that you need to specify two areas app0 and app1, similar to the ESP32-S3

# Name,    Type, SubType, Offset,  Size,     Flags
nvs,       data, nvs,     0x9000,  0x4000,
otadata,   data, ota,     0xD000,  0x2000,
app0,      app,  ota_0,   0x10000, 0x180000,
app1,      app,  ota_1,   0x190000,0x180000,
spiffs,    data, spiffs,  0x310000,0xD0000,
coredump,  data, coredump,0x3E0000,0x20000,

Now my config is like this:

[env:super_mini_esp32c3]
board_build.partitions = my_esp32_c3_settings.csv

More information about OTA can be found here.

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/ota.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions