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 minicom
mkdir -p ~/esp
cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd ~/esp/esp-idf
./install.sh all
. ./export.sh
alias get_idf='. $HOME/esp/esp-idf/export.sh'
idf.py -p /dev/ttyUSB0 flash
sudo minicom -b 115200 -8 -D /dev/ttyUSB0 < /dev/tty
chmod +x ~/etc/flash.sh
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
cd ~/esp/hello_world
idf.py set-target esp32
idf.py menuconfig
idf.py build
~/esp/flash.sh
make -C mpy-cross
cd ports/esp32
make submodules
make
cd micropython/examples/usercmodule/cppexample
make -C mpy-cross
cd ports/esp32
make submodules
make