ESP32 16Mb
# help
r
When I run toit with 16MB in partitions.cvs, then I get this error below. It happens inside "start_cpu0_default();", called by "start_cpu0()" in rtc_memory_esp32.cc. I have updated the "programs" line in the partitions.csv to have a size of 0xca0000. Menuconfig was run to use 16Mb instead of 4. Finished by building a new firmware.envelope. 2.0.0-alpha.127 (also tried e.g. .90). ESP32-WROOM-32D with 16MB flash. Does someone have a hint? 🙂 ----error below---------- Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x400e5957 PS : 0x00060d30 A0 : 0x800e5c05 A1 : 0x3ffd0dd0 A2 : 0x00000000 A3 : 0x00000000 A4 : 0x000000e0 A5 : 0x3ffdc328 A6 : 0x3f41d677 A7 : 0x3ffdc129 A8 : 0x3ffbcd78 A9 : 0x00000002 A10 : 0x3ffdc33c A11 : 0x3ffdc348 A12 : 0x00060d20 A13 : 0x0000abab A14 : 0x003fffff A15 : 0x00060923 SAR : 0x00000000 EXCCAUSE: 0x0000001c EXCVADDR: 0x00000001 LBEG : 0x40082b74 LEND : 0x40082b85 LCOUNT : 0x00000000
k
Can you share your
partitions.csv
file? There are some constraints on where the "programs" partition can reside, because we need to able to mmap it in and that may lead to restrictions on certain chips.
If you can let us know what you want to use the bigger partitions for, then maybe there are alternative ways to benefit from all the flash on your devices.
r
# Partition Table for Toit. # Name, Type, SubType, Offset, Size # bootloader,, , 0x001000, 0x007000 # partitions,, , 0x008000, 0x000c00 secure, 0x42, 0x00, 0x009000, 0x004000, otadata, data, ota, 0x00d000, 0x002000, phy_init, data, phy, 0x00f000, 0x001000, ota_0, app, ota_0, 0x010000, 0x1a0000, ota_1, app, ota_1, 0x1b0000, 0x1a0000, nvs, data, nvs, 0x350000, 0x010000, programs, 0x40, 0x00, 0x360000, 0xca0000, encrypted
The final goal is to be able to collect more data if the system is offline for a period.
k
Sounds good. You could try to define a non-programs partition with type
0x41
instead of extending the programs partition. That will be available as a data partition from your Toit code through a
storage.Region
.
r
I will try that out. We run an ESP32-WROOM-32D-N16. I have tried to lower the programs partition to 8MB as well, with the same results
k
Yeah, the limit is likely to be 4MB.
There is a limit on the number of entries in the MMU tables, so the ESP32 cannot map more than 4MB memory at once.
r
👍
k
ESP32S3 allows more.
r
Sorry for "blaming you first" 🙂 And thank you a lot for digging it out for me.
k
No worries! Happy to help if you need assistance in using a storage region for capturing more data.
r
🌞