Hi All,
I purchased a 4.3" LCD board with an esp32s3 chip for the purpose of playing with micropython and having a board that had a variety of input and output options. I’ve struggled for the last couple of weeks trying to get an lv_micropython build.
I can build micropython (@master), I’ve built the esp-idf display demos and deployed those to the board, so I have confidence in my build environment and the hardware.
I’ve tried building lv_micropython on OSX and Linux, I’ve tried building the release/v8 build with the 4.4 esp-idf and the top of tree (@master) build with esp-idf 5.1.2. I’ve had no luck at all. I know that I probably need @kdschlosser 's lv_bindings build for the RGB panel driver, but even just trying to build the esp32 port without anything exotic fails for me. Below I’ve documented the processes I’ve tried (at least the most basic variation of them) and the failures they’ve generated.
My primary goal is to play with micropython on the board, and of course be able to output things to the display, not necessarily become an master in lvgl and lv_micropython… I guess what I’m saying is that if someone could build a firmware binary for me… I’d take it
Any help would be greatly appreciated.
Regards.
Lance
OS: OSX 11.7.10
Python: 3.8 (so gevent will work)
ESP-IDF: v4.4
lv_micropython: release/v8
Docs: https://github.com/lvgl/lv_micropython/blob/master/ports/esp32/README.md#setting-up-the-toolchain-and-esp-idf
## Start from scratch
% rm -rf esp .espressif
% mkdir esp
% cd esp
## Get v4.4 of esp-idf (lv_micropython and esp32s3 supported)
% git clone -b v4.4 --recursive https://github.com/espressif/esp-idf.git
% cd esp-idf
% git submodule update --init --recursive
% ./install.sh all
% . ./export.sh
## Clone lv_micropython (use release/v8 branch hoping for stability)
% cd .. (to ~/esp)
% git clone -b release/v8 https://github.com/lvgl/lv_micropython.git
# I know I need an RGB LCD driver, which isn't in this release, but just
# trying to get something to compile.
% cd lv_micropython
% git submodule update --init --recursive lib/lv_bindings
% make -C mpy-cross
% cd ports/esp32
% make submodules
% make
FAIL::
[1148/1578] Generating ../../genhdr/qstr.i.last
FAILED: genhdr/qstr.i.last /Users/lance/esp/lv_micropython/ports/esp32/build-GENERIC/genhdr/qstr.i.last
<SNIP>
Lots of redefined warnings.. e.g.:
In file included from /Users/lance/esp/esp-idf/components/esp_hw_support/include/soc/spinlock.h:11,
from /Users/lance/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:42,
from /Users/lance/esp/esp-idf/components/freertos/include/freertos/portable.h:51,
from /Users/lance/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:63,
from /Users/lance/esp/lv_micropython/ports/esp32/mpconfigport.h:10,
from /Users/lance/esp/lv_micropython/py/mpconfig.h:62,
from /Users/lance/esp/lv_micropython/py/mpstate.h:31,
from /Users/lance/esp/lv_micropython/py/runtime.h:29,
from /Users/lance/esp/lv_micropython/py/argcheck.c:30:
/Users/lance/esp/esp-idf/components/soc/esp32s3/include/soc/cpu.h:24: warning: "RSR" redefined
#define RSR(reg, curval) asm volatile ("rsr %0, " #reg : "=r" (curval));
Then a python traceback:
Traceback (most recent call last):
File "/Users/lance/esp/lv_micropython/py/makeqstrdefs.py", line 203, in <module>
preprocess()
File "/Users/lance/esp/lv_micropython/py/makeqstrdefs.py", line 73, in preprocess
for output in p.imap(pp(flags), chunks):
File "/usr/local/Cellar/python@3.8/3.8.18_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
File "/usr/local/Cellar/python@3.8/3.8.18_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/Users/lance/esp/lv_micropython/py/makeqstrdefs.py", line 57, in run
return subprocess.check_output(args.pp + flags + files)
File "/usr/local/Cellar/python@3.8/3.8.18_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/Cellar/python@3.8/3.8.18_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/Users/lance/.espressif/tools/xtensa-esp32s3-elf/esp-2021r2-8.4.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc'
<SNIP>
returned non-zero exit status 1.
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
make: *** [all] Error 2
#####################################
OS: Debian 12 (bookworm)
Python: 3.11.2
ESP-IDF: 5.1.2 (latest per docs)
lv_micropython: master branch
## Start from scratch
% rm -rf esp .espressif
% mkdir esp
% cd esp
% git clone -b v5.1.2 --recursive https://github.com/espressif/esp-idf.git
% cd esp-idf
% ./install.sh all
% . ./export.sh
% cd .. (to ~esp)
% git clone https://github.com/lvgl/lv_micropython.git
% cd lv_micropython
% git submodule update --init --recursive lib/lv_bindings
% make -C mpy-cross
% cd ports/esp32
% make submodules
% make
FAILED:
[1/1] idf (5.1.2)
CMake Error at /home/pi/esp/esp-idf/tools/cmake/build.cmake:266 (message):
Failed to resolve component 'esp_adc_cal'.
Call Stack (most recent call first):
/home/pi/esp/esp-idf/tools/cmake/build.cmake:302 (__build_resolve_and_add_req)
/home/pi/esp/esp-idf/tools/cmake/build.cmake:303 (__build_expand_requirements)
/home/pi/esp/esp-idf/tools/cmake/build.cmake:595 (__build_expand_requirements)
/home/pi/esp/esp-idf/tools/cmake/project.cmake:547 (idf_build_process)
CMakeLists.txt:67 (project)