Hi,
I successfully run lvgl on the RP2040 Pico board in a C++ build using Free RTOS under Eclipse IDE on MacBook M1 Pro host.
I want to experiment with duplicating the application using micropython, but I’m having some trouble with the built image.
To avoid porting the build to Eclipse for the moment, I perform a CLI build as follows (note necessary slight modifications from the lv_micropython readme):
git clone https://github.com/lvgl/lv_micropython.git lv_micropython
cd lv_micropython
git submodule update --init --recursive lib/lv_bindings
make -C mpy-cross
make -C ports/rp2 submodules
cd ports/rp2
make USER_C_MODULES=…/…/lib/lv_bindings/bindings.cmake
[100%] Linking CXX executable firmware.elf
text data bss dec hex filename
798248 96 204316 1002660 f4ca4 /Users/campbell/Projects/pico/lv_micropython-1.18-3/lv_micropython-1.18-4/ports/rp2/build-PICO/firmware.elf
[100%] Built target firmware
This produces a binary which runs micropython fine, I’m able to drive Neopixels for example, except that lvgl isn’t happy. Thonny shell output:
MicroPython v1.18-599-gbf62dfc78 on 2022-02-20; Raspberry Pi Pico with RP2040
Type “help()” for more information.
help(‘modules’)
main gc uasyncio/core uio
_boot lodepng uasyncio/event ujson
_onewire lvgl uasyncio/funcs uos
_rp2 machine uasyncio/lock urandom
_thread math uasyncio/stream ure
_uasyncio micropython ubinascii uselect
builtins neopixel ucollections ustruct
cmath onewire uctypes usys
dht rp2 uerrno utime
ds18x20 uarray uhashlib uzlib
framebuf uasyncio/init uheapq
Plus any modules on the filesystemimport lvgl
help(lvgl)
object <module ‘lvgl’> is of type module
name – lvgl
obj
… the shell crashes in the middle of outputting the help text. No REPL follows. Board is subsequently unresponsive.
The build is exactly as above; I have not added my custom ili9486 display driver at this stage, so this is clean off GitHub.
My next steps will be to port the build to Eclipse so that I can single step the issue using a picoprobe, but initially I’d be very grateful if someone could confirm that the build steps I followed above are correct.