Support ESP32-C3

The partitions.esp32-c3.bin file has been generated using the
gen_esp32part.py script from the Espressif IoT Development Framework:

python gen_esp32part.py partitions.esp32-c3.csv partitions.esp32-c3.bin

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
Stijn Tintel 2022-03-05 16:16:55 +02:00
parent e3b778d4da
commit c436e21d4e
3 changed files with 23 additions and 4 deletions

View File

@ -200,11 +200,18 @@ def configure_write_flash_args(
firmware = open_downloadable_binary(firmware_path)
flash_mode, flash_freq = read_firmware_info(firmware)
if isinstance(info, ESP32ChipInfo):
model = "esp32"
ofs_bootloader = 0x1000
ofs_partitions = 0x8000
ofs_otadata = 0xe000
ofs_firmware = 0x10000
if "ESP32-C3" in info.model:
model = "esp32c3"
ofs_bootloader = 0x0
ofs_otadata = 0x16000
ofs_firmware = 0x20000
else:
model = "esp32"
ofs_bootloader = 0x1000
ofs_otadata = 0xe000
ofs_firmware = 0x10000
if flash_freq in ("26m", "20m"):
raise EsphomeflasherError(

BIN
partitions.esp32c3.bin Normal file

Binary file not shown.

12
partitions.esp32c3.csv Normal file
View File

@ -0,0 +1,12 @@
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
sec_cert,63,0,0xd000,12K,
nvs,data,nvs,0x10000,24K,
otadata,data,ota,0x16000,8K,
phy_init,data,phy,0x18000,4K,
app0,app,ota_0,0x20000,1600K,
app1,app,ota_1,0x1b0000,1600K,
fctry,data,nvs,0x340000,24K,
coredump,data,coredump,0x350000,64K,
eeprom,data,153,0x360000,4K,
spiffs,data,spiffs,0x361000,60K,
1 # ESP-IDF Partition Table
2 # Name, Type, SubType, Offset, Size, Flags
3 sec_cert,63,0,0xd000,12K,
4 nvs,data,nvs,0x10000,24K,
5 otadata,data,ota,0x16000,8K,
6 phy_init,data,phy,0x18000,4K,
7 app0,app,ota_0,0x20000,1600K,
8 app1,app,ota_1,0x1b0000,1600K,
9 fctry,data,nvs,0x340000,24K,
10 coredump,data,coredump,0x350000,64K,
11 eeprom,data,153,0x360000,4K,
12 spiffs,data,spiffs,0x361000,60K,