guild icon
Toit
#ESP32 16Mb
Thread channel in help
rejuwi
rejuwi 01/07/2024 09:42 PM
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
bitphlipphar
bitphlipphar 01/08/2024 05:07 AM
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.
bitphlipphar
bitphlipphar 01/08/2024 05:08 AM
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.
rejuwi
rejuwi 01/08/2024 08:09 AM
# 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
rejuwi
rejuwi 01/08/2024 08:16 AM
The final goal is to be able to collect more data if the system is offline for a period.
bitphlipphar
bitphlipphar 01/08/2024 08:19 AM
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.
rejuwi
rejuwi 01/08/2024 08:28 AM
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
bitphlipphar
bitphlipphar 01/08/2024 08:28 AM
Yeah, the limit is likely to be 4MB.
bitphlipphar
bitphlipphar 01/08/2024 08:35 AM
There is a limit on the number of entries in the MMU tables, so the ESP32 cannot map more than 4MB memory at once.
rejuwi
rejuwi 01/08/2024 08:36 AM
:👍:
bitphlipphar
bitphlipphar 01/08/2024 08:36 AM
ESP32S3 allows more.
rejuwi
rejuwi 01/08/2024 08:37 AM
Sorry for "blaming you first" :🙂: And thank you a lot for digging it out for me.
bitphlipphar
bitphlipphar 01/08/2024 09:34 AM
No worries! Happy to help if you need assistance in using a storage region for capturing more data.
rejuwi
rejuwi 01/08/2024 10:21 AM
:🌞:
14 messages in total