wireless-tag-com / ZX2D10GE01R-V4848

The Unlicense
72 stars 19 forks source link

No memory for framebuffer #1

Closed projectitis closed 10 months ago

projectitis commented 10 months ago

Hi there,

I am compiling this project with ESP IDF plugin for VSCode. The project compiles and flashes ok, but then fails execution with the following output. The error is "no mem for frame buffer".

I am using the correct hardware (ZX2D10GE01R-V4848). What am I doing wrong?

I (0) cpu_start: App cpu up.
I (284) cpu_start: Pro cpu start user code
I (284) cpu_start: cpu freq: 160000000 Hz
I (284) cpu_start: Application information:
I (287) cpu_start: Project name:     ZX2D10GE01R
I (292) cpu_start: App version:      1
I (296) cpu_start: Compile time:     Dec 26 2023 19:15:44
I (302) cpu_start: ELF file SHA256:  30e115e48b7d9e70...
I (308) cpu_start: ESP-IDF:          v5.1.2
I (313) cpu_start: Min chip rev:     v0.0
I (318) cpu_start: Max chip rev:     v0.99
I (323) cpu_start: Chip rev:         v0.1
I (328) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 3FCA0058 len 000496B8 (293 KiB): DRAM
I (341) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (348) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (354) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (362) spi_flash: detected chip: generic
I (365) spi_flash: flash io: dio
W (369) pcnt(legacy): legacy driver is deprecated, please migrate to `driver/pulse_cnt.h`
I (378) sleep: Configure to isolate all GPIO pins in sleep state
I (385) sleep: Enable automatic switching of GPIO sleep configuration
I (392) app_start: Starting scheduler on CPU0
I (397) app_start: Starting scheduler on CPU1
I (397) main_task: Started on CPU0
I (407) main_task: Calling app_main()
I (407) main_task: Returned from app_main()
I (407) gpio: GPIO[38]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (577) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (577) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (587) gpio: GPIO[47]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
E (597) lcd_panel.rgb: lcd_rgb_panel_alloc_frame_buffers(156): no mem for frame buffer
E (607) lcd_panel.rgb: esp_lcd_new_rgb_panel(285): alloc frame buffers failed
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4200c5a9  PS      : 0x00060430  A0      : 0x8200cbb2  A1      : 0x3fca6bc0
0x4200c5a9: lcd_ll_enable_clock at D:/Projects/libraries/esp/esp-idf/components/hal/esp32s3/include/hal/lcd_ll.h:43
 (inlined by) lcd_rgb_panel_destory at D:/Projects/libraries/esp/esp-idf/components/esp_lcd/src/esp_lcd_panel_rgb.c:177

A2      : 0x3fca7038  A3      : 0x3c06bdfc  A4      : 0x3c06c32c  A5      : 0x0000025f
A6      : 0x3c06bdfc  A7      : 0x3c06c5b0  A8      : 0x00000000  A9      : 0x3fca6b60
A10     : 0x42041c80  A11     : 0x3c06bdfc  A12     : 0x3c06c32c  A13     : 0x3fca6bc0  
0x42041c80: vprintf at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/vprintf.c:30

A14     : 0x3fca6ba0  A15     : 0x0000000c  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffa
0x400556d5: strlen in ROM

0x400556e5: strlen in ROM

Backtrace: 0x4200c5a6:0x3fca6bc0 0x4200cbaf:0x3fca6be0 0x42009749:0x3fca6c20 0x420099c7:0x3fca6c50 0x420090fb:0x3fca6d30 0x4037d4a9:0x3fca6d70
0x4200c5a6: lcd_ll_enable_clock at D:/Projects/libraries/esp/esp-idf/components/hal/esp32s3/include/hal/lcd_ll.h:43
 (inlined by) lcd_rgb_panel_destory at D:/Projects/libraries/esp/esp-idf/components/esp_lcd/src/esp_lcd_panel_rgb.c:177

0x4200cbaf: esp_lcd_new_rgb_panel at D:/Projects/libraries/esp/esp-idf/components/esp_lcd/src/esp_lcd_panel_rgb.c:347

0x42009749: qmsd_rgb_init at D:/Projects/esp32/puck-project-1/main/screen.c:53

0x420099c7: screen_init at D:/Projects/esp32/puck-project-1/main/screen.c:477 (discriminator 2)

0x420090fb: lvgl_task at D:/Projects/esp32/puck-project-1/main/main.c:25

0x4037d4a9: vPortTaskWrapper at D:/Projects/libraries/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162
projectitis commented 10 months ago

Resolved.

The solution (in my case) was that some of the settings in sdkconfig had been changed. I replaced sdkconfig with the one in the repo.

Note: If using a newer version of ESP-IDF it does not include the LVGL demos by default, and you'll get an error about lv_demo_benchmark not being found during linking. To fix it, edit the sdkconfig and set CONFIG_LV_USE_DEMO_BENCHMARK=y. I had this problem using ESP-IDF v5.1.2

My project now builds and runs on the device, but the screen is all messed up. This is now a different problem though, so I will close this issue.