Only 5 screen or less version works from the 11 screen project

What do you want to achieve?

Want to be able to run the project that contains 11 screens on a ESP32 S3 based microcontroller with a 3.5" screen which has 16 MB of flash and used the standard 8 MB partition config in Arduino IDE which has 3MB for application.

What have you tried so far?

Deleted screens from the project one by one to see what number of screens start to run. The full 11 screen project compiles without erron and also uploads. When uploaded it keeps resetting the microcontroller.
This is the output from the Serial Monitor window:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a38
entry 0x403c98d4
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42005d9f PS : 0x00060a30 A0 : 0x82005325 A1 : 0x3fcebba0
A2 : 0x00000000 A3 : 0x3fca4b3c A4 : 0x00010000 A5 : 0x00000004
A6 : 0x00000000 A7 : 0x0000ffff A8 : 0x8201c079 A9 : 0x3fcebb80
A10 : 0x00000000 A11 : 0x0000004c A12 : 0x3fc98b34 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x3fca4a38 SAR : 0x0000001f EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000022 LBEG : 0x4201cd3d LEND : 0x4201cd60 LCOUNT : 0x00000007

Backtrace: 0x42005d9c:0x3fcebba0 0x42005322:0x3fcebbc0 0x42022a6b:0x3fcebbe0 0x4202dcad:0x3fcebc00 0x4202ff7d:0x3fcebc30 0x42001c27:0x3fcebc50 0x42037a32:0x3fcebc90

ELF file SHA256: 7137360c6d78c324

Rebooting…
�ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x4205fb8a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a38
entry 0x403c98d4
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.

The Rebooting… section keeps happenning with the core register dump which means the microcontroller keeps resetting/rebooting.

When I leave only 5 or less number of screens remaining from the project then it loads as previously but this time all is working on the screen.

I also tried to delete screens randomly to see if one of the screens causing some corruption but that did not seem to matter, the number of screens were the main factor to my observation.

The number of Widgets currently is 343 in the project and 11 screens. When I delete screens down to 5 then the number of widgets drops to around the 110 mark.

Tried a few partition configurations as well and neither of them worked with the 11 screen project. The all compile and upload without fault but notting shows on the screen, just keeps resetting.
The 8MB partition table used 30% of the program space and 24% of the Global Variable space so that should not be a problem.

Others

  • SquareLine Studio version: 1.2.3 and 1.3.0
  • Operating system: Windows 10 and 11, Arduino
  • Target hardware: ESP32 S3 P2

Maybe you need understand what is ROM and what RAM and for what is used on app load. SQS is designed to create all objects in ram. Then your work oversize it.
If your module have SPIRAM ext , then enable it and try, but better is make optimal design.

I am fairly new to SLS so can you point me out to any this kind of specificacion which would be crucial to the design? I haven’t come across this kind of information where it talks about memory management and so on.

The interesting thing is that I hardly use any external images and the images that I use are all part of the 5 or less screens that are working when removing 6 screens or more from the project. I specifically focused on using as much lvgl library widgets with no external image modifications as possible and minimise external images in project which is only a few small icons for buttons and 3 custom fonts that are small in size.

The functions that I have defined in SLS are empty and havent written code for those and I did not create many of those either, yet. So practically the bare UI is what is programmed into the ESP32.

I enabled the PSRAM and I have 2MB of that but not sure how I can make it simple to use malloc() to move things from the UI files into the PSRAM. I do not see a way to globally or implicitly locate things in the PSRAM. If any one knows an efficient way then it would be nice to learn about it.

My message was tip, try locate where is trouble source.