To compile with ESP-IDF you need to get the following packages:

CentOS 7:sudo yum install git wget make ncurses-devel flex bison gperf python pyserial

Ubuntu and Debian:sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial

openSUSE:sudo zypper install gcc git wget make ncurses-devel flex bison gperf python python-serial

Arch:sudo pacman -S --needed gcc git make ncurses flex bison gperf python2-pyserial python-pyserial

Mac OS:sudo easy_install pipsudo pip install pyserial

git clone <https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo.git>

You may want to use --depth clone option to limit the git history to only the latest commit.The download will be much smaller and faster.

You can also download the repository as a zip file (using Clone or download button on the first repository page) and unpack it to some directory. You will not be able to use git pull to update the repository, but otherwise the building process is the same.

Xtensa toolchains and esp-idf are provided as tar archives. They will be automatically unpacked on first run of BUILD.sh script

Warning: If running on Windows, you may get false error unpacking 'esp-idf' FAILED. Run ./BUILD.sh again, the toolchain will be unpacked successfully.

Change the working directory to MicroPython_BUILD directory

To change some ESP32 & Micropython options or to create initial sdkconfig run:

./BUILD.sh menuconfig

To build the MicroPython firmware, run:

./BUILD.sh

You can use -jn option to make the build process faster. If using too high n the build may fail because of race condition, if that happens, run build again or run without the -j option.

If no errors are detected, you can now flash the MicroPython firmware to your board. Run:

./BUILD.sh flash