compile micropython with USER_C_MODULES

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
mmx64
Posts: 10
Joined: Sat Aug 28, 2021 8:24 am

compile micropython with USER_C_MODULES

Post by mmx64 » Fri Feb 11, 2022 1:33 pm

Hello, im trying to compile micropython for esp32 with this https://github.com/russhughes/st7789_mpy lcd driver,
i followed all instructions

Code: Select all

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential libffi-dev git pkg-config cmake virtualenv python3-pip python3-virtualenv
git clone -b v4.2 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf/
git pull
cd esp-idf
git checkout v4.2
git submodule update --init --recursive
./install.sh
source export.sh
cd ..
git clone https://github.com/micropython/micropython.git
git clone https://github.com/russhughes/st7789_mpy.git
cd micropython/
git submodule update --init
cd mpy-cross/
make
cd ..
cd ports/esp32
cp ../../../st7789_mpy/fonts/bitmap/vga1_16x16.py modules
cp ../../../st7789_mpy/fonts/truetype/NotoSans_32.py modules
cp ../../../st7789_mpy/fonts/vector/scripts.py modules
until here i have no error

Code: Select all

ports/esp32/ make

Code: Select all

ports/esp32/ make USER_C_MODULES=../../../../st7789_mpy/st7789/micropython.cmake FROZEN_MANIFEST="" FROZEN_MPY_DIR=$UPYDIR/modules
this command runs oki, compiles oky, i write firmware to esp32 all works oki

Can anyone please help me to compile this LCD library and a MCP2515 library
I found this https://github.com/dedalqq/esp32-mcp2515, or if anyone has any sugestions?
Thanks!

sushyoshi
Posts: 21
Joined: Sat Feb 05, 2022 9:25 am

Re: compile micropython with USER_C_MODULES

Post by sushyoshi » Tue Apr 26, 2022 3:47 am

mmx64 wrote:
Fri Feb 11, 2022 1:33 pm
Hello, im trying to compile micropython for esp32 with this https://github.com/russhughes/st7789_mpy lcd driver,
i followed all instructions

Code: Select all

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential libffi-dev git pkg-config cmake virtualenv python3-pip python3-virtualenv
git clone -b v4.2 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf/
git pull
cd esp-idf
git checkout v4.2
git submodule update --init --recursive
./install.sh
source export.sh
cd ..
git clone https://github.com/micropython/micropython.git
git clone https://github.com/russhughes/st7789_mpy.git
cd micropython/
git submodule update --init
cd mpy-cross/
make
cd ..
cd ports/esp32
cp ../../../st7789_mpy/fonts/bitmap/vga1_16x16.py modules
cp ../../../st7789_mpy/fonts/truetype/NotoSans_32.py modules
cp ../../../st7789_mpy/fonts/vector/scripts.py modules
until here i have no error

Code: Select all

ports/esp32/ make

Code: Select all

ports/esp32/ make USER_C_MODULES=../../../../st7789_mpy/st7789/micropython.cmake FROZEN_MANIFEST="" FROZEN_MPY_DIR=$UPYDIR/modules
this command runs oki, compiles oky, i write firmware to esp32 all works oki

Can anyone please help me to compile this LCD library and a MCP2515 library
I found this https://github.com/dedalqq/esp32-mcp2515, or if anyone has any sugestions?
Thanks!
Hello,

Were you able to build a new firmware with the ST7789 driver?

I am also having trouble doing what you described. I am very new to this and I would like if you could share the whole process.
Since I only have windows, I am using Oracle VM with Ubuntu to do this.

Any help is appreciated on describing the process.

Post Reply