No problem, you can ask me, I just reply a bit delayed.
So:
- Fonts: yes, loading has changed, and it is working. But you have to init FS first, and assign a letter to FS driver. In my example letter “S” is assigned to FS driver.
My font_helper.py:
import lvgl as lv
FONTS_LVGL_PATH = "S:fonts"
def load(name, lvgl_path: str = FONTS_LVGL_PATH):
font = lv.font_t()
if lv.binfont_load(font, f"{lvgl_path}/{name}"):
return font
return None
-
Partition issue: you can change the size, or just copy-paste the partitions file from other board (I use GENERIC_SPIRAM board)
-
LV_COLOR_FORMAT
-NATIVE_RESERVED
: at the moment display drivers don’t work onmulti-instance
branch, I have a PR for it (Update LVGL and fix pixel size detection by PGNetHun · Pull Request #298 · lvgl/lv_binding_micropython · GitHub), which contains the fix, it just needs to be merged tomulti-instance
branch (or you can copy-paste the changes to your repo). I have not tested ST7735, due to I have only ILI9341 and ST7789.
There is also a separate discussion about replacing these display drivers with a new generic way, but that will be finished later: MicroPython Display Drivers part 2 - #3 by bdbarnett
For building and deploying things to device, I have some bash scripts created:
env-variables.sh
ESPIDF=~/esp/esp-idf-4-4-5
MICROPYTHON=~/src/lv_micropython
#BOARD=GENERIC
BOARD=GENERIC_SPIRAM
source $ESPIDF/export.sh
clean.sh
. ./env-variables.sh
# Clean mpy-cross
cd $MICROPYTHON/mpy-cross
make clean
# Clean Unix port
cd $MICROPYTHON/ports/unix
make clean
make clean VARIANT=dev
# Clean ESP32 port boards
cd $MICROPYTHON/ports/esp32
BOARD=GENERIC
make clean BOARD=$BOARD
BOARD=GENERIC_SPIRAM
make clean BOARD=$BOARD
build-generic-spiram.sh
. ./env-variables.sh
BOARD=GENERIC_SPIRAM
cd $MICROPYTHON
make -C mpy-cross
cd $MICROPYTHON/ports/esp32
make submodules
make BOARD=$BOARD V=1
deploy.sh
. ./env-variables.sh
cd $MICROPYTHON/ports/esp32
make deploy BOARD=$BOARD