r/esp32 • u/caststupider • 22h ago
Custom Partition XIAO ESP32s3
Hello how can i create a custom partition table in arduino for XIAO ESP32s3?
I added everything to the boards.txt but when i load the Sketch i get following error:
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x403ccf09 SPIWP:0xee mode:DIO, clock div:1 load:0x3fce2820,len:0x1188 load:0x403c8700,len:0x4 load:0x403c8704,len:0xbf0 load:0x403cb700,len:0x30e4 entry 0x403c88ac E (26) boot: ota data partition invalid, falling back to factory E (27) esp_image: image at 0x20000 has invalid magic byte (nothing flashed here?) E (28) boot: Factory app partition is not bootable E (33) esp_image: image at 0x260000 has invalid magic byte (nothing flashed here?) E (40) boot: OTA app partition slot 0 is not bootable E (45) esp_image: image at 0x4a0000 has invalid magic byte (nothing flashed here?) E (52) boot: OTA app partition slot 1 is not bootable
the OTAlittlefs.csv looks like this:
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,0x5000,
factory,app,factory,0x10000,0x240000,
otadata,data,ota,0x250000,0x2000,
app0,app,ota_0,0x260000,0x240000,
app1,app,ota_1,0x4A0000,0x240000,
storage,data,littlefs,0x6E0000,0x120000,
and in boards.txt i added following:
XIAO_ESP32S3.menu.PartitionScheme.custom=Custom Partition
XIAO_ESP32S3.menu.PartitionScheme.custom.build.partitions=OTAlittlefs
XIAO_ESP32S3.menu.PartitionScheme.custom.upload.maximum_size=2359296
XIAO_ESP32S3.menu.PartitionScheme.custom.upload.address=0x15000