Skip to content

ESPHome LVGL Fails to Allocate #20

@DaAwesomeP

Description

@DaAwesomeP

Hello,

I am trying to use ESPHom'e LVGL graphics, but it is not working.

Without LVGL, this works (and I see the RGB test card):

display:
  - platform: m5cores3_display
    model: ILI9342
    dc_pin: 35
    id: m5cores3_lcd
    auto_clear_enabled: false
    show_test_card: true

However, when I add LVGL I get a boot loop:

lvgl:
  # buffer_size: 25% # I tried this at 100%, 50%, and 25% always with the same result
  displays:
    - m5cores3_lcd
  pages:
    - id: main_page
      widgets:
        - label:
            align: CENTER
            text: 'Hello World!'

display:
  - platform: m5cores3_display
    model: ILI9342
    dc_pin: 35
    id: m5cores3_lcd
    auto_clear_enabled: false
    show_test_card: false

Log:

[15:47:40][E][lvgl:521]: Failed to allocate 0 bytes
[15:47:40]Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
[15:47:40]
[15:47:40]Core  1 register dump:
[15:47:40]PC      : 0x4202942b  PS      : 0x00060a30  A0      : 0x82028c51  A1      : 0x3fcebdf0  
WARNING Decoded 0x4202942b: lv_obj_mark_layout_as_dirty at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/.piolibdeps/test-esp/lvgl/src/core/lv_obj_pos.c:290
[15:47:40]A2      : 0x00000000  A3      : 0xd72682fb  A4      : 0x3fc9ddc4  A5      : 0x3c0d9dc6  
[15:47:40]A6      : 0x3c0d9d50  A7      : 0x3c0d9d8a  A8      : 0x8203184e  A9      : 0x3fcebdd0  
[15:47:40]A10     : 0x3fced6a8  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x0000ff00  
[15:47:40]A14     : 0x00ff0000  A15     : 0xff000000  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
[15:47:40]EXCVADDR: 0x00000022  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffff1  
[15:47:40]
[15:47:40]
[15:47:40]Backtrace: 0x42029428:0x3fcebdf0 0x42028c4e:0x3fcebe10 0x4202865b:0x3fcebe30 0x4200ac22:0x3fcebe50 0x42015388:0x3fcebe80 0x4203cc6e:0x3fcec000
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x42029428: lv_obj_mark_layout_as_dirty at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/.piolibdeps/test-esp/lvgl/src/core/lv_obj_pos.c:289
WARNING Decoded 0x42028c4e: lv_obj_class_init_obj at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/.piolibdeps/test-esplvgl/src/core/lv_obj_class.c:106
WARNING Decoded 0x4202865b: lv_obj_create at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/.piolibdeps/test-esp/lvgl/src/core/lv_obj.c:217
WARNING Decoded 0x4200ac22: esphome::lvgl::LvPageType::setup(unsigned int) at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/src/esphome/components/lvgl/lvgl_esphome.h:77
 (inlined by) esphome::lvgl::LvglComponent::add_page(esphome::lvgl::LvPageType*) at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/src/esphome/components/lvgl/lvgl_esphome.cpp:122
WARNING Decoded 0x42015388: setup() at /home/myuser/Downloads/esphome/conf/.esphome/build/test-esp/./conf/test-esp.yaml:282
WARNING Decoded 0x4203cc6e: loopTask(void*) at /home/myuser/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42
[15:47:40]
[15:47:40]
[15:47:40]
[15:47:40]
[15:47:40]ELF file SHA256: 41b9ebe0c80c9b46
[15:47:40]
[15:47:40]E (974) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0
[15:47:40]Rebooting...
[15:47:40]ESP-ROM:esp32s3-20210327
[15:47:40]Build:Mar 27 2021
[15:47:40]rst:0xc (RTC_SW_CPU_RST),boot:0x29 (SPI_FAST_FLASH_BOOT)
[15:47:40]Saved PC:0x420c9516
WARNING Decoded 0x420c9516: esp_pm_impl_waiti at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_pm/pm_impl.c:839
[15:47:40]SPIWP:0xee
[15:47:40]mode:DIO, clock div:1
[15:47:40]load:0x3fce3808,len:0x44c
[15:47:40]load:0x403c9700,len:0xbe4
[15:47:40]load:0x403cc700,len:0x2a38
[15:47:40]entry 0x403c98d4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions