-
Notifications
You must be signed in to change notification settings - Fork 343
winsetup
Windows doesn’t have a built-in “make” environment, so you will need a GNU-compatible environment.
Espressif uses the MSYS2 environment to provide this.
You don’t need to use this environment all the time (you can use Eclipse or some other front-end), but it runs behind the scenes.
Download the Windows all-in-one toolchain & MSYS2 zip file from dl.espressif.com
Unzip the zip file to C:\ (or some other location, but this guide assumes C:) and it will create an msys32 directory with a pre-prepared environment.
Open a MSYS2 MINGW32 terminal window by running C:\msys32\mingw32.exe.
The environment in this window is a bash shell.
In some cases you may need to restart your PC after first run of mingw32.exe
!
Use this window in the following steps setting up development environment for ESP32 MicroPython.
In open mingw32 window run the folowing commands:
- Clone the repository:
git clone https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo.git
- Change the working directory to
MicroPython_ESP32_psRAM_LoBo/MicroPython_BUILD
cd MicroPython_ESP32_psRAM_LoBo
cd MicroPython_BUILD
- First you must run
menuconfig
to create the defaultsdkconfig
configuration file
./BUILD.sh menuconfig
On first run esp-idf and toolchain wil be unpacked.
You may get false errorunpacking 'esp-idf' FAILED
.
Just run./BUILD.sh menuconfig
again, the toolchain will be unpacked successfully.
In menuconfig change the com port to windows COMx which is used to comunicate with your ESP32 board.
→ Serial flasher config → Default serial port
You don't need to change anything else to build the default firmware. Later, you may want to configure the MicroPython build to better suit your needs.
- Builld your MicroPython firmware:
./BUILD.sh all
- and flash it to your ESP32 board:
./BUILD.sh flash
- You may now connect to you board, run:
./BUILD.sh monitor
or use some other serial terminal program, like Putty, to connect to the board.
You can also consult the Build Wiki to learn about more build options.
Building on Windows may be quite slow.
Use-jN
option and/or temporarily disable the antivirus program to make it faster.
If you are using Windows 10, you can also install Windows Subsystem for Linux and build the same way as on Linux.
To enable serial port support on the Windows Subsystem for Linux read this.
The instructions under Setup MicroPython build environment are the same.