Unable to build LVGL micropython for RP

My aim is to build LVGL micropython for Raspberry Pi Pico on Windows. I executed the following commands but got an error in step5.
`

  1. git clone https://github.com/lvgl/lv_micropython.git
  2. cd lv_micropython
  3. git submodule update --init --recursive lib/lv_bindings
  4. make -C ports/rp2 BOARD=PICO submodules
  5. make -j -C mpy-cross
    `

The error looks like this

     make: Entering directory 'C:/Users/xx/lv_micropython/mpy-cross'
     Use make V=1 or set BUILD_VERBOSE in your environment to increase build 
     verbosity.
     process_begin: CreateProcess(NULL, uname -s, ...) failed.
     Makefile:10: pipe: No error
     FIND: Parameter format not correct
     Access denied - ../LIB/LV_BINDINGS/LVGL/SRC
     Access denied - ../LIB/LV_BINDINGS/LVGL/EXAMPLES
     Access denied - ../LIB/LV_BINDINGS/DRIVER/GENERIC
     File not found - -TYPE
     File not found - F
     File not found - -NAME
     "LVGL-GEN build/lvgl/lv_mpy.c"
     The syntax of the command is incorrect.
     make: *** [../py/py.mk:45: build/lvgl/lv_mpy.c] Error 1
     make: Leaving directory 'C:/Users/xx/lv_micropython/mpy-cross'

Can I get some help on this?

100% sure the problem has nothing to do with lv_micropython.
Pretty sure the problem has something to do with your system and how you installed the git bash & co. I can´t help with Windows, did you try on a Linux machine / VM / LiveCD ?

Rather get help from micropython forum, because this one is specific to micropython bindings for LVGL.

I relatively new to LVGL. My aim is to use LVGL micropython on Raspberry pi Pico. I checked this repo, this also says about micropython bindings for LVGL. I am trying the same.

Start https://github.com/micropython/micropython/tree/master/ports/windows and make sure your can build a basic micropython image for Pi Pico, upload it and make sure it works. Once you have a working toolchain, you cna give a try on LVGL + micropython.

I uploaded the micropython firmware to the Pi Pico board and use Thonny as an IDE, uploaded micropython examples like blinking LED to board and executed the programs. Its Working… :slight_smile:

That´s a good small little step. Uploading a pre-compiled firmware and toying with it is a very different thing than setting up a toolchain and compiling from source.

No worries we´re all beginners at some point, and all stand on the shoulders of giants.

Do yourself a favor and start with micropython without LVGL:

  • learn about setting the compilation toolchain, building the image, integrating a third-party C library and so on. This will easily eat days of your time, if not weeks depending where you start.

Once you gain this knowledge you can come back to micropython with LVGL.
But this forum here is specific to LVGL micropython: you should post only for LVGL related problem. Like precise questions about LVGL in the restricted context of lv_micropython.

Wish you a nice self-learning adventure !

@ACBIAS suggestion is very good - start with upstream Micropython. Make sure you can build it, before trying to build it with LVGL.

Personally I don’t use Windows as a development platform, so my best suggestion for you is to move to Linux.
If you only have Windows, you can still run linux with WSL or VirtualBox

I think i was getting the above error since I was using a Windows system. I installed the extra tools as mentioned here and generated a uf2 file and was able to run a micropython code.

Now i am trying LVGL with micropython. I am connecting the RP2040 to a TFT Display with ST7796 as the driver

Boy what is xx ? have you spaces or special chars in path? STOP place project into

Blockquote

make: Entering directory ‘C:/Users/xx/lv_micropython/mpy-cross’

Blockquote

thats the username

Or girl, i ask for spaces or ä…ô in this ofcourse username…

There are no spaces or special chars in the path

I learnt that driver ST7796 is similar to ili9xxx driver. So I wrote the micropython script like this

import lvgl as lv
import ili9xxx
from machine import SPI, Pin


lv.init()
spi = SPI(1, baudrate=27000000, sck=Pin(10), mosi=Pin(11), miso=Pin(8))
drv = ili9xxx.Ili9341(spi=spi, dc=23, cs=29, rst=28)```

But I am getting this error 
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ImportError: no module named 'ili9xxx'

The module you´re looking for is lib/lv_bindings/driver/generic/ili9xxx.py
and it depends from lib/lv_bindings/driver/generic/st77xx.py
There you will also find test scripts for various TFT displays

You should close this topic and mark it as solved since you can now successfully build lv_micropython for RP2040.

It´s generally good to be as precise as you can when asking for help.
You can still open another topic if/when needed.

I did want to say one thing. Don’t try to compile the binding on Windows. Use WSL which is built into Windows and compile it that way. It is a lot easier to do.

I tried porting lv_micropython to RP pico following the steps you have detailed. However, the final or 6th step

  1. make -j -C ports/rp2 BOARD=PICO USER_C_MODULES=../../lib/lv_bindings/bindings.cmake

results in an error that says that the /lv_bindinds/bindings.cmake file was not found. This file exists yet the error appears. Can you please guide?

BTW, I am building this on Bash terminal on Ubuntu installed on WSL2

Now I’ve successfully managed to port LVGL micropython for Pico. For the sake of newbies and everyone who needs this help… kindly follow the 6 steps after you have installed the pre-requisites below on a linux distro…

  1. Use any Linux distro preferably on WSL2 on windows. Don’t work from Windows cmd.
  2. Install the toolchain none-arm-eabi-gcc from [https://developer.arm.com/] use the stand-alone toolchain
  3. Install CMake use… apt-install cmake
  4. Install build-essential use… apt install build-essential
    only then was I able to make or build the firmware.elf file which will be in the ports/rpw/build-pico folder…

I’ll load this as the firmware into the Raspberry Pi Pico using R-pi boot-loader and then hopefully we’ve crossed the biggest hurdles.