sudo apt update && sudo apt install -y \
python3 \
git \
python3-pip \
python3-virtualenv \
python3-venv \
wget \
flex \
bison \
gperf \
cmake \
libusb-1.0-0-dev
git clone https://github.com/v923z/micropython-ulab.git ulab && \
git clone https://github.com/micropython/micropython.git
export BUILD_DIR=$(pwd)
cd $BUILD_DIR/micropython/
git clone -b v5.2.3 --recursive https://github.com/espressif/esp-idf.git
cd $BUILD_DIR/micropython/esp-idf
./install.sh esp32
. ./export.sh
which idf.py
cd $BUILD_DIR/micropython/ports/esp32
cd $BUILD_DIR/micropython/mpy-cross
make
cd $BUILD_DIR/micropython/ports/esp32
make submodules
cd $BUILD_DIR/micropython/ports/esp32
cat << EOT | tee makefile
BOARD = ESP32_GENERIC
USER_C_MODULES = $(BUILD_DIR)/ulab/code/micropython.cmake
include Makefile
EOT
cmake .
make