From ElectroDragon
Jump to navigation Jump to search




Windows Setup Guide

  • Download Mwing from here
  • Unzip to C: should work like c:\msys32\mingw32.exe, and make dir mkdir -p ~/esp
  • Git clone ESP-IDF by commands: cd ~/esp and git clone --recursive
  • Set PATH: create file at folder C:/msys32/etc/profile.d/, add line export IDF_PATH="C:/msys32/home/user-name/esp/esp-idf", notice to replace the user-name
  • Copy code hello_world -> cd ~/esp and cp -r $IDF_PATH/examples/get-started/hello_world .
  • Config serial port cd ~/esp/hello_world and make menuconfig, for example config port to COM3 in windows -> Serial flasher config > Default serial port
  • make flash or make monitor

Linux Setup Guide

Get start
  • create esp folder, and install three parts:
  1. esp-idf # development framwork
  2. xtensa-esp32-elf # toolchain
  3. <myapp-or-anyname> #esp-idf-template example ( turn of wifi, and blink led GPIO4, gpio_set_direction(GPIO_NUM_4, GPIO_MODE_OUTPUT);)
  4. <.. any other your apps>
  • first install all dependencies: sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial
Install toolchain and Clone ESP-IDF

Install toolchain

  • In esp folder:
unzip toolchain: tar -xzf xtensa*.tar.gz

Install ESP-IDF

Set PATH for linux

Set xtensa PATH



  • Run a export command for esp-idf and run menu:
export IDF_PATH=~/esp/esp-idf
  • and check if it can work by: printenv IDF_PATH

Set both when boot

  • nano ~/.bashrc, add two lines at bottom
export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
export IDF_PATH=~/esp/esp-idf
Start project
cd ~/esp
cp -r $IDF_PATH/examples/get-started/hello_world .
  • project folder, config it: make menuconfig
  • make and flash with download tool: make flash

Other Interpreter

Pre-built Virtual Envinorment