Hi everyone,
I’m new to working with ESP-IDF, and I’ve been trying to build the lv_micropython firmware for my ESP32-S3 development board. I followed the steps from the official repository but ran into issues during the build process. Here’s what I’ve done so far:
Step 1:
sudo apt-get install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
Step 2:
git clone GitHub - lvgl/lv_micropython: Micropython bindings to LVGL for Embedded devices, Unix and JavaScript
cd lv_micropython
git submodule update --init --recursive lib/lv_bindings
Step 3:
git clone -b v4.4 --recursive GitHub - espressif/esp-idf: Espressif IoT Development Framework. Official development framework for Espressif SoCs.
cd ~/esp – idf
git submodule update --init –recursive
step 4 :
./install.sh
source export.sh
idf.py –version : ESP-IDF v4.4
step 5:
cd ~/lv_micropython/ports/esp32
make submodules
make
Unfortunately, the build fails with multiple errors, such as:
- Implicit declaration of functions (
I2S_TIMING_REG
, I2S_CONF_REG
, adc_gpio_init
).
- Unknown symbols (
SPI_HOST
, HSPI_HOST
, VSPI_HOST
, ADC1_GPIO36_CHANNEL
, etc.).
- Warnings treated as errors (
cc1: some warnings being treated as errors
).
error: implicit declaration of function ‘I2S_TIMING_REG’; did you mean ‘I2S_RX_TIMING_REG’?
error: ‘SPI_HOST’ undeclared here (not in a function); did you mean ‘SPI3_HOST’?
error: ‘ADC1_GPIO36_CHANNEL’ undeclared here (not in a function); did you mean ‘ADC1_GPIO6_CHANNEL’?
Is the issue between lv_bindings and the ESP-IDF version I’m using. Should I switch to ESP-IDF v5.x? Or is there something else I might be missing?
I would really appreciate any advice or guidance on how to resolve this.
This is a binding I have been working on. It is a lot easier to get up and running with it. GitHub - lvgl-micropython/lvgl_micropython: LVGL module for MicroPython
1 Like
Easier to get up and running isn’t it?
No doubt, less hassle makes it so much better.
I just got one of the waveshare boards and was hoping to find lvgl or lv_micropython already built… what platform did you use to build lv_micropython… should I be able to install that on the waveshare device using thonny
Thonny has issues with the ESP32 because it doesn’t perform a hard reset after uploading files. A soft reset is performed and this causes the ESP32 to core panic because the hardware setting for the pins don’t get reset. My suggestion is to use mpremote which is included with micropython.
I’m trying to build the lvgl_micropython firmware for my ESP32-S3-WROOM-1-N16R8 (16MB flash, Octal SPI). Here are the steps I followed:
git clone GitHub - lvgl-micropython/lvgl_micropython: LVGL module for MicroPython
cd lvgl_micropython
python3 make.py esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7796 INDEV=xpt2046 flash-size=16MB octal-flash
However, I encounter the following error during the build:
/home/graham/lvgl_micropython/lib/micropython/ports/esp32/machine_hw_spi.c: In function ‘machine_hw_spi_device_make_new’:
/home/graham/lvgl_micropython/lib/micropython/ports/esp32/machine_hw_spi.c:645:38: error: statement with no effect [-Werror=unused-value]
645 | if (dual || quad || octal) flags != SPI_DEVICE_HALFDUPLEX;
cc1: some warnings being treated as errors
The last couple of commits I made broke it. I am working on fixing so what you mneed to do to get it to run on that board if the following…
git clone https://github.com/lvgl-micropython/lvgl_micropython
cd lvgl_micropython
git checkout 19dedff21b43b9c5152418c27743a7a86b52ee55
git pull
python3 make.py esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7796 INDEV=xpt2046 flash-size=16MB octal-flash
I’ve programmed a lot of ESP32 devices with Thonny… with MQTT and node red on raspberry pi using ESP32 devices as remote IO controlling everything from circulation pump on a on demand hot water heater to controlling an airplane servo which mechanically turned a natural gas heater off or hi or low. I already have the waveshare with this same sort of setup I just need the lvgl component… preferably a precompiled one if someone is willing to share
I’ve tried everything, but I’m still getting a white screen.
I’ve double-checked all the wires, and there are no errors in the terminal or Thonny.
Despite this, the screen remains white with nothing displayed on it.
Could the screen be the problem? I’m using this one: AliExpress link.
For the code, I’m using the one from the repository (SPI bus with SPI touch on the same SPI bus).
However, without LVGL, I’m able to make the screen turn red.
sometimes im getting this error:
Type “help()” for more information.
Traceback (most recent call last):
File “”, line 76, in
File “task_handler.py”, line 42, in init
TypeError: