martinberlin / lv_port_esp32-epaper

LVGL ported to ESP32 including various display and touchpad drivers. Forked to support parallel epaper displays (using EPDiy as a component) Supports also L58 touch controller used in Lilygo EPD47
https://www.tindie.com/search/?q=Kindle
MIT License
44 stars 8 forks source link

Unable to compile for LilyGo T5 4.7 Inch E-paper V2.3 with ESP32-S3 #11

Closed Pavelovec closed 4 months ago

Pavelovec commented 8 months ago

Hello,

I'm trying to use this port of the lvgl library on the newer version of the LilyGo T5 4.7 Inch E-paper V2.3 which uses the ESP32-S3 chip and comes with a touchscreen. However, I'm encountering difficulties in getting it to compile successfully.

I've attempted to clone both from the master branch and the v2.1 release. Additionally, I've tried compiling with ESP-IDF versions v4.4 and v5.1. In each scenario, I'm met with a series of compile errors that I've not been able to resolve on my own. The only successful compile was for the ESP32 using the v2.1 release with ESP-IDF v4.4.

I'm really hoping for some guidance on this. Is it even possible to use this port with the newer version of the LilyGo screen? Any assistance or insights you can offer would be greatly appreciated.

Thank you very much for your time and effort!

Pavelovec commented 8 months ago

Hello everyone,

After numerous attempts and adjustments, I finally got the compilation to work for the LilyGo V2.3 S3. However, there's a new issue at hand.

When running the compiled firmware, the setup sequence is unusually slow, taking about two minutes. During this time, the e-paper display progressively darkens and lightens. Once it's past the setup, the display shows something in the upper left corner of the screen. It's apparent that what's being shown is not as intended—it appears to be undersized or incomplete (viz photo - sorry for the poor quality). lilygos3

Here is the terminal output:

I (117) esp_image: segment 1: paddr=000240ac vaddr=3fc953I (185) esp_image: segment 4: paddr=00084768 vaddr=4037ce54 size=083f0h ( 33776) load
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x400450e9
0x400450e9: ets_sha_process in ROM

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x186c
load:0x403c9700,len:0x4
load:0x403c9704,len:0xda4
load:0x403cc700,len:0x3130
entry 0x403c9934
I (27) boot: ESP-IDF v5.1.1 2nd stage bootloader
I (27) boot: compile time Nov  1 2023 19:59:34
I (27) boot: Multicore bootloader
I (30) boot: chip revision: v0.1
I (34) qio_mode: Enabling default flash chip QIO
I (39) boot.esp32s3: Boot SPI Speed : 80MHz
I (44) boot.esp32s3: SPI Mode       : QIO
I (48) boot.esp32s3: SPI Flash Size : 16MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (84) boot:  2 factory          factory app      00 00 00010000 00100000
I (92) boot: End of partition table
I (96) esp_image: segment 0: paddr=00010020 vaddr=3c060020 size=14084h ( 82052) map
I (117) esp_image: segment 1: paddr=000240ac vaddr=3fc95300 size=03110h ( 12560) load
I (120) esp_image: segment 2: paddr=000271c4 vaddr=40374000 size=08e54h ( 36436) load
I (130) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=54740h (345920) map
I (184) esp_image: segment 4: paddr=00084768 vaddr=4037ce54 size=083f0h ( 33776) load
I (198) boot: Loaded app from partition at offset 0x10000
I (198) boot: Disabling RNG early entropy source...
I (210) cpu_start: Multicore app
I (210) octal_psram: vendor id    : 0x0d (AP)
I (210) octal_psram: dev id       : 0x02 (generation 3)
I (213) octal_psram: density      : 0x03 (64 Mbit)
I (219) octal_psram: good-die     : 0x01 (Pass)
I (224) octal_psram: Latency      : 0x01 (Fixed)
I (229) octal_psram: VCC          : 0x01 (3V)
I (234) octal_psram: SRF          : 0x01 (Fast Refresh)
I (240) octal_psram: BurstType    : 0x01 (Hybrid Wrap)
I (246) octal_psram: BurstLen     : 0x01 (32 Byte)
I (251) octal_psram: Readlatency  : 0x02 (10 cycles@Fixed)
I (257) octal_psram: DriveStrength: 0x00 (1/1)
I (263) esp_psram: Found 8MB PSRAM device
I (267) esp_psram: Speed: 40MHz
I (311) mmu_psram: Instructions copied and mapped to SPIRAM
I (311) cpu_start: Pro cpu up.
I (312) cpu_start: Starting app cpu, entry point is 0x403755b0
0x403755b0: call_start_cpu1 at /home/pavel/Documents/esp-idf/v5.1/components/esp_system/port/cpu_start.c:154

I (0) cpu_start: App cpu up.
I (1013) esp_psram: SPI SRAM memory test OK
I (1018) cpu_start: Pro cpu start user code
I (1018) cpu_start: cpu freq: 240000000 Hz
I (1019) cpu_start: Application information:
I (1022) cpu_start: Project name:     lvgl-demo
I (1027) cpu_start: App version:      v2.1-19-gb62f643-dirty
I (1033) cpu_start: Compile time:     Nov  1 2023 19:59:31
I (1039) cpu_start: ELF file SHA256:  e2254c5c439e26a0...
I (1045) cpu_start: ESP-IDF:          v5.1.1
I (1050) cpu_start: Min chip rev:     v0.0
I (1055) cpu_start: Max chip rev:     v0.99 
I (1060) cpu_start: Chip rev:         v0.1
I (1065) heap_init: Initializing. RAM available for dynamic allocation:
I (1072) heap_init: At 3FCA1918 len 00047DF8 (287 KiB): DRAM
I (1078) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (1085) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (1092) esp_psram: Adding pool of 7808K of PSRAM memory to heap allocator
I (1099) spi_flash: detected chip: gd
I (1103) spi_flash: flash io: qio
W (1107) rmt(legacy): legacy driver is deprecated, please migrate to `driver/rmt_tx.h` and/or `driver/rmt_rx.h`
I2C sda:18 scl:17 int:47

i2c_driver started correctly
I (1123) sleep: Configure to isolate all GPIO pins in sleep state
I (1130) sleep: Enable automatic switching of GPIO sleep configuration
I (1137) coexist: coex firmware version: 80b0d89
I (1143) coexist: coexist rom version e7ae62f
I (1148) app_start: Starting scheduler on CPU0
I (1153) app_start: Starting scheduler on CPU1
I (1153) main_task: Started on CPU0
I (1163) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1173) main_task: Calling app_main()
app_main started. DISP_BUF_SIZE:15360 LV_HOR_RES_MAX:480 V_RES_MAX:320
I (1183) main_task: Returned from app_main()
I (1193) lvgl_helpers: Display hor size: 480, ver size: 320
I (1203) lvgl_helpers: Display buffer size: 15360
I (1203) lvgl_helpers: Initializing Parallel driver for display
I (1203) gpio: GPIO[13]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (1223) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (1223) gpio: GPIO[0]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (1243) I80: Initialize Intel 8080 bus
6:6 7:7 4:4 5:5 2:2 3:3 0:8 1:1
start_pulse:40 clock:41
epd_row_width:992
I (1243) I80: 8080 esp_lcd_new_panel_io_i80 done
update_screen() 300 ms
I (336423) L58: l58_init() Touch initialized
I (336423) gpio: GPIO[47]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:1 
epdiy_flush 1 x:0 y:0 w:480 h:32
epdiy_flush 2 x:0 y:32 w:480 h:32
epdiy_flush 3 x:0 y:64 w:480 h:32
epdiy_flush 4 x:0 y:96 w:480 h:32
epdiy_flush 5 x:0 y:128 w:480 h:32
epdiy_flush 6 x:0 y:160 w:480 h:32
epdiy_flush 7 x:0 y:192 w:480 h:32
epdiy_flush 8 x:0 y:224 w:480 h:32
epdiy_flush 9 x:0 y:256 w:480 h:32
epdiy_flush 10 x:0 y:288 w:480 h:32
W (338353) i2c-touch: Read failed
epdiy_flush 11 x:0 y:0 w:480 h:32
epdiy_flush 12 x:0 y:32 w:480 h:24
W (339653) i2c-touch: Read failed
epdiy_flush 13 x:0 y:0 w:480 h:32
epdiy_flush 14 x:0 y:32 w:480 h:24
W (340953) i2c-touch: Read failed
W (342003) i2c-touch: Read failed
W (343053) i2c-touch: Read failed
W (344103) i2c-touch: Read failed
W (345153) i2c-touch: Read failed
W (346203) i2c-touch: Read failed
epdiy_flush 15 x:240 y:6 w:156 h:50
epdiy_flush 16 x:0 y:56 w:480 h:32
epdiy_flush 17 x:0 y:88 w:480 h:32
epdiy_flush 18 x:0 y:120 w:480 h:32
epdiy_flush 19 x:0 y:152 w:480 h:32
epdiy_flush 20 x:0 y:184 w:480 h:32
epdiy_flush 21 x:0 y:216 w:480 h:32
epdiy_flush 22 x:0 y:248 w:480 h:32
epdiy_flush 23 x:0 y:280 w:480 h:32
epdiy_flush 24 x:0 y:312 w:480 h:8
W (348563) i2c-touch: Read failed
epdiy_flush 25 x:0 y:56 w:480 h:32
epdiy_flush 26 x:0 y:88 w:480 h:32
epdiy_flush 27 x:0 y:120 w:480 h:32
epdiy_flush 28 x:0 y:152 w:480 h:32
epdiy_flush 29 x:0 y:184 w:480 h:32
epdiy_flush 30 x:0 y:216 w:480 h:32
epdiy_flush 31 x:0 y:248 w:480 h:32
epdiy_flush 32 x:0 y:280 w:480 h:32
epdiy_flush 33 x:0 y:312 w:480 h:8
W (350873) i2c-touch: Read failed
epdiy_flush 34 x:0 y:56 w:480 h:32
epdiy_flush 35 x:0 y:88 w:480 h:32
epdiy_flush 36 x:0 y:120 w:480 h:32
epdiy_flush 37 x:0 y:152 w:480 h:32
epdiy_flush 38 x:0 y:184 w:480 h:32
epdiy_flush 39 x:0 y:216 w:480 h:32
epdiy_flush 40 x:0 y:248 w:480 h:32
epdiy_flush 41 x:0 y:280 w:480 h:32
epdiy_flush 42 x:0 y:312 w:480 h:8
W (353143) i2c-touch: Read failed
epdiy_flush 43 x:0 y:56 w:480 h:32
epdiy_flush 44 x:0 y:88 w:480 h:32
epdiy_flush 45 x:0 y:120 w:480 h:32
epdiy_flush 46 x:0 y:152 w:480 h:32
epdiy_flush 47 x:0 y:184 w:480 h:32
epdiy_flush 48 x:0 y:216 w:480 h:32
epdiy_flush 49 x:0 y:248 w:480 h:32
epdiy_flush 50 x:0 y:280 w:480 h:32
epdiy_flush 51 x:0 y:312 w:480 h:8
W (355413) i2c-touch: Read failed
epdiy_flush 52 x:0 y:56 w:480 h:32
epdiy_flush 53 x:0 y:88 w:480 h:32
epdiy_flush 54 x:0 y:120 w:480 h:32
epdiy_flush 55 x:0 y:152 w:480 h:32
epdiy_flush 56 x:0 y:184 w:480 h:32
epdiy_flush 57 x:0 y:216 w:480 h:32
epdiy_flush 58 x:0 y:248 w:480 h:32
epdiy_flush 59 x:0 y:280 w:480 h:32
epdiy_flush 60 x:0 y:312 w:480 h:8

Any suggestions or guidance on troubleshooting these new issues would be incredibly helpful.

Thanks in advance for your support and the amazing work on this LVGL port!

martinberlin commented 4 months ago

Sorry but Lilygo ESP32S3 version will not be supported in epdiy for several reasons:

You can read about this here: https://github.com/vroland/epdiy/issues/203 It was mainly my decision but also in accordance with epdiy main repository owner. So you will have to use Lilygo driver or use my fork in this branch, but is not officially supported, hence I'm closing here as won't fix'

https://github.com/martinberlin/epdiy-rotation/tree/lilygos3