So far lvgl is at least twitching, but not really coming alive.
From the examples and the lvgl documentation I was assuming that lvgl doesn't need any real display, because the hardware should be driven by whatever the "callbacks" do. So I created the following test script:
Code: Select all
import lvgl as lv
def my_flush_cb(*args):
print("my_flush_cb():", args)
def my_set_px_cb(*args):
print("my_set_px_cb():", args)
def my_rounder_cb(*args):
print("my_rounder_cb():", args)
disp_buf1 = lv.disp_buf_t()
buf1_1 = bytearray(480*10)
lv.disp_buf_init(disp_buf1,buf1_1, None, len(buf1_1)//4)
disp_drv = lv.disp_drv_t()
lv.disp_drv_init(disp_drv)
disp_drv.buffer = disp_buf1
disp_drv.flush_cb = my_flush_cb
disp_drv.set_px_cb = my_set_px_cb
disp_drv.rounder_cb = my_rounder_cb
disp_drv.hor_res = 480
disp_drv.ver_res = 320
lv.disp_drv_register(disp_drv)
Note that except for the additional set_px and rounder callbacks, this is pretty much exactly the example from the lv_micropython README.
It all works up to the last line (call to disp_drv_register). At that point I get:
Code: Select all
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x401054fa PS : 0x00060b30 A0 : 0x8010554c A1 : 0x3ffc8f70
A2 : 0x3ffe7ca0 A3 : 0x00000080 A4 : 0x3ffe7c80 A5 : 0x3ffe7c78
A6 : 0x3ffe7d75 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffc8f60
A10 : 0x00000048 A11 : 0x3ffe7c80 A12 : 0x00000004 A13 : 0x3ffe7c84
A14 : 0x000002ec A15 : 0x00000000 SAR : 0x0000001e EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000048 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0xffffffff
ELF file SHA256: 0000000000000000000000000000000000000000000000000000000000000000
Backtrace: 0x401054fa:0x3ffc8f70 0x40105549:0x3ffc8fa0 0x400fb59c:0x3ffc8fc0 0x40103d5d:0x3ffc8fe0 0x401334a5:0x3ffc9000 0x4012edf6:0x3ffc9020 0x400df02d:0x3ffc9040 0x400df095:0x3ffc9060 0x400ec8af:0x3ffc9080 0x400e31bc:0x3ffc9120 0x400df02d:0x3ffc9190 0x400df05a:0x3ffc91b0 0x4013e2dc:0x3ffc91d0 0x4013e544:0x3ffc9270 0x400f3f98:0x3ffc92b0 0x4008e26d:0x3ffc92e0
Rebooting...
While playing with all this I also realized that building uPy firmware binaries with LittlevGL preinstalled is impractical. The physical display size and color depth are compile time options in the C code. We would essentially have to build separate binaries for every display type.
Regards, Jan