Skip to content
Espressif IoT Development Framework. Official development framework for ESP32.
C C++ Python CMake Assembly Makefile Other
Branch: master
Clone or download

Latest commit

mahavirj Merge branch 'bugfix/fix_flake8_warning' into 'master'
bugfix: fix flake8 warning for esp-cryptoauthlib submodule

See merge request espressif/esp-idf!8865
Latest commit 7d75213 May 21, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
.github gh_action: fix python lint May 20, 2020
components Merge branch 'feature/esp_wroom32_se_example' into 'master' May 21, 2020
docs Merge branch 'feature/new_camera_module_supported_on_esp32-s2-kaluga-… May 21, 2020
examples Merge branch 'feature/esp_wroom32_se_example' into 'master' May 21, 2020
make bootloader: Set the bootloader optimization level separately to the app Feb 27, 2020
tools ci: do fetch submodules for python lint May 20, 2020
.editorconfig cmake: Use cmake_lint project, tidy up all CMake source files Apr 29, 2018
.flake8 bugfix: fix flake8 warning for esp-cryptoauthlib submodule May 21, 2020
.gitignore Add JTAG related example tests May 5, 2020
.gitlab-ci.yml ci: do fetch submodules for python lint May 20, 2020
.gitmodules secure_element: atecc608_ecdsa example May 21, 2020
.readthedocs.yml docs: Remove building of zipped HTML docs from build process and cons… Jul 8, 2019
CMakeLists.txt cmake: error out on building in IDF_PATH root dir Apr 7, 2020
CONTRIBUTING.rst docs: Fix broken URLs & permanent redirects Mar 23, 2020
Kconfig Fix missed deprecated Kconfig option caused by tabs in sdkconfig.rename Apr 30, 2020
LICENSE Initial public version Aug 17, 2016 Mention S2 chips as well in the main README Apr 30, 2020 Mention S2 chips as well in the main README Apr 30, 2020 add chinese translation for support period policy Nov 11, 2019 add chinese translation for support period policy Nov 11, 2019 tools: {install,export}.{bat,sh} tools Jul 1, 2019
export.bat tools: {install,export}.{bat,sh} tools Jul 1, 2019 tools: export.{sh,fish}: add to PATH Apr 2, 2020
export.ps1 tools: add install.ps1, export.ps1 Aug 27, 2019 tools/check_python_dependencies: print diagnostic info on failure Apr 16, 2020
install.bat tools: install.bat: bail out if call fails Jul 23, 2019 tool: fix Mar 27, 2020
install.ps1 tools: add install.ps1, export.ps1 Aug 27, 2019 tools: {install,export}.{bat,sh} tools Jul 1, 2019
requirements.txt esp-idf: Update esptool and add reedsolo and bitstring into requireme… May 14, 2020
sdkconfig.rename cmake: Add new compiler optimization levels definitions Sep 6, 2019

Espressif IoT Development Framework

ESP-IDF is the official development framework for the ESP32 and ESP32-S Series SoCs.

Developing With ESP-IDF

Setting Up ESP-IDF

See setup guides for detailed instructions to set up the ESP-IDF:

Non-GitHub forks

ESP-IDF uses relative locations as its submodules URLs (.gitmodules). So they link to GitHub. If ESP-IDF is forked to a Git repository which is not on GitHub, you will need to run the script tools/ after git clone. The script sets absolute URLs for all submodules, allowing git submodule update --init --recursive to complete. If cloning ESP-IDF from GitHub, this step is not needed.

Finding a Project

As well as the esp-idf-template project mentioned in Getting Started, ESP-IDF comes with some example projects in the examples directory.

Once you've found the project you want to work with, change to its directory and you can configure and build it.

To start your own project based on an example, copy the example project directory outside of the ESP-IDF directory.

Quick Reference

See the Getting Started guide links above for a detailed setup guide. This is a quick reference for common commands when working with ESP-IDF projects:

Setup Build Environment

(See Getting Started guide for a full list of required steps with details.)

  • Install host build dependencies mentioned in Getting Started guide.
  • Add tools/ directory to the PATH
  • Run python -m pip install -r requirements.txt to install Python dependencies

Configuring the Project menuconfig

  • Opens a text-based configuration menu for the project.
  • Use up & down arrow keys to navigate the menu.
  • Use Enter key to go into a submenu, Escape key to go out or to exit.
  • Type ? to see a help screen. Enter key exits the help screen.
  • Use Space key, or Y and N keys to enable (Yes) and disable (No) configuration items with checkboxes "[*]"
  • Pressing ? while highlighting a configuration item displays help about that item.
  • Type / to search the configuration items.

Once done configuring, press Escape multiple times to exit and say "Yes" to save the new configuration when prompted.

Compiling the Project build

... will compile app, bootloader and generate a partition table based on the config.

Flashing the Project

When the build finishes, it will print a command line to use to flash the chip. However you can also do this automatically by running: -p PORT flash

Replace PORT with the name of your serial port (like COM3 on Windows, /dev/ttyUSB0 on Linux, or /dev/cu.usbserial-X on MacOS. If the -p option is left out, flash will try to flash the first available serial port.

This will flash the entire project (app, bootloader and partition table) to a new chip. The settings for serial port flashing can be configured with menuconfig.

You don't need to run build before running flash, flash will automatically rebuild anything which needs it.

Viewing Serial Output

The monitor target uses the idf_monitor tool to display serial output from ESP32 or ESP32-S Series SoCs. idf_monitor also has a range of features to decode crash output and interact with the device. Check the documentation page for details.

Exit the monitor by typing Ctrl-].

To build, flash and monitor output in one pass, you can run: flash monitor

Compiling & Flashing Only the App

After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table:

  • app - build just the app.
  • app-flash - flash just the app. app-flash will automatically rebuild the app if any source files have changed.

(In normal development there's no downside to reflashing the bootloader and partition table each time, if they haven't changed.)

Erasing Flash

The flash target does not erase the entire flash contents. However it is sometimes useful to set the device back to a totally erased state, particularly when making partition table changes or OTA app updates. To erase the entire flash, run erase_flash.

This can be combined with other targets, ie -p PORT erase_flash flash will erase everything and then re-flash the new app, bootloader and partition table.


You can’t perform that action at this time.