ESP32S3 LCD Screen with LVGL using espressif framework

I have an Arduiuno framework based project for an ESP32 S3 based LCD/TFT 4.3" board.

There is a slight jerk of the image on the screen durng rendering, and it looks like its been fixed using a Bounce Buffer, but only in the espressif framework not the Arduino.

Rather than port the bounce buffer to the Arduino framework, I thought I would move my entire project to use the

framework = espidf

instead, then I can just take the existnig bounce code and my code and use it.

I can compile the code, but when I upload it to the board, it fails to run, and the UART log is showing me this message

(Note that I am using the same settings in the platform io as I use for the Arduino project apart from the line

framework=espidf

E (340) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (350) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed

I (29) boot: ESP-IDF 5.0.2 2nd stage bootloader
I (29) boot: compile time 20:16:05
I (29) boot: chip revision: v0.1
I (31) boot.esp32s3: Boot SPI Speed : 80MHz
**I (36) boot.esp32s3: SPI Mode       : DIO**
I (40) boot.esp32s3: SPI Flash Size : 16MB

Looking at the SPI Flash mode its in DIO, not QIO - then I noticed in my platformio.ini I have an arduino setting

board_build.arduino.memory_type = qio_opi

How do I change the platformio to specify the memory type as QIO for espidf ?

Ok I now see that with this approach some settings will be in the platformio.ini, but other settings on the espidf side will be in the sdkconfig file in the project folder i.e. sdkconfig.esp32-s3-devkitc-1

Q1 - When I do a clean and build is the file sdkconfig.esp32-s3-devkitc-1 copied to the sdkconfig and then the platformio settings are written in the sdkconfig aswell ?

Q2 How do I edit things sop they dont get overwritten or cleaned ? Do I edit the sdkconfig file, or the sdkconfig.esp32-s3-devkitc-1

Also - how do I set the program to load into core 1 ? As I can see its on core 0, which for the Arduino version set the executable to core 1, so I presume I need to do the same here with the espidf framwork ?

This is the error I see from UART now

I (337) ESP32S3: Install RGB LCD panel driver
E (337) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (347) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.

I can see core 0 is where the panic is, and I presume I need to setup memory somehow, or switch execution to core 1 ?

The full startup error log via UART

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40376055
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3810,len:0x1868
load:0x403c9700,len:0xda4
load:0x403cc700,len:0x3188
entry 0x403c992c
I (29) boot: ESP-IDF 5.0.2 2nd stage bootloader
I (29) boot: compile time 22:01:21
I (29) boot: chip revision: v0.1
I (31) qio_mode: Enabling default flash chip QIO
I (36) boot.esp32s3: Boot SPI Speed : 80MHz
I (41) boot.esp32s3: SPI Mode       : QIO
I (46) boot.esp32s3: SPI Flash Size : 16MB
I (51) boot: Enabling RNG early entropy source...
I (56) boot: Partition Table:
I (60) boot: ## Label            Usage          Type ST Offset   Length
I (67) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (74) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (82) boot:  2 factory          factory app      00 00 00010000 00100000
I (89) boot: End of partition table
I (93) esp_image: segment 0: paddr=00010020 vaddr=3c050020 size=126a8h ( 75432) map
I (114) esp_image: segment 1: paddr=000226d0 vaddr=3fc92800 size=024d0h (  9424) load
I (116) esp_image: segment 2: paddr=00024ba8 vaddr=40374000 size=0b470h ( 46192) load
I (129) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=4f588h (325000) map
I (182) esp_image: segment 4: paddr=0007f5b0 vaddr=4037f470 size=032e0h ( 13024) load
I (190) boot: Loaded app from partition at offset 0x10000
I (191) boot: Disabling RNG early entropy source...
I (202) cpu_start: Pro cpu up.
I (202) cpu_start: Starting app cpu, entry point is 0x40375af8
I (0) cpu_start: App cpu up.
I (217) cpu_start: Pro cpu start user code
I (217) cpu_start: cpu freq: 160000000 Hz
I (217) cpu_start: Application information:
I (220) cpu_start: Project name:     DisplayPC_ESpress_PIO
I (226) cpu_start: App version:      1
I (230) cpu_start: Compile time:     Aug  1 2023 22:00:34
I (236) cpu_start: ELF file SHA256:  aa41cbb1d9125eb4...
I (242) cpu_start: ESP-IDF:          5.0.2
I (247) cpu_start: Min chip rev:     v0.0
I (252) cpu_start: Max chip rev:     v0.99
I (257) cpu_start: Chip rev:         v0.1
I (261) heap_init: Initializing. RAM available for dynamic allocation:
I (269) heap_init: At 3FCA1C38 len 00047AD8 (286 KiB): DRAM
I (275) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (281) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (288) heap_init: At 600FE010 len 00001FF0 (7 KiB): RTCRAM
I (295) spi_flash: detected chip: gd
I (298) spi_flash: flash io: qio
I (303) sleep: Configure to isolate all GPIO pins in sleep state
I (309) sleep: Enable automatic switching of GPIO sleep configuration
I (316) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (337) ESP32S3: Install RGB LCD panel driver
E (337) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (347) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x42030255  PS      : 0x00060e30  A0      : 0x820308a6  A1      : 0x3fca5730
A2      : 0x3fca6b4c  A3      : 0x3c0573ec  A4      : 0x3c05795c  A5      : 0x0000015b
A6      : 0x3c0573ec  A7      : 0x3c057bac  A8      : 0x00000000  A9      : 0x3fca56d0
A10     : 0x42041634  A11     : 0x3c0573ec  A12     : 0x3c05795c  A13     : 0x3fca5730
A14     : 0x3fca5710  A15     : 0x0000000c  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffa

Backtrace: 0x42030252:0x3fca5730 0x420308a3:0x3fca5750 0x42001ddd:0x3fca5790 0x4204eea1:0x3fca5860 0x4037d155:0x3fca5890

ELF file SHA256: aa41cbb1d9125eb4
Rebooting...

Did You ever solve this? I have exactly the same error with an ESP-S3 based device.

Hi, I have the same problem with AdaFruit Qualia S3 RGB666 board. Did you ever solve that? or anybody have any experience about that ?