|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .github/ | H | - | - | 629 | 561 |
| .gitlab/ | H | - | - | 3,203 | 2,402 |
| components/ | H | - | - | 5,689,746 | 3,621,130 |
| docs/ | H | - | - | 165,543 | 113,169 |
| examples/ | H | - | - | 291,189 | 218,336 |
| tools/ | H | - | - | 150,374 | 129,735 |
| .codespellrc | H A D | 04-Nov-2024 | 278 | 5 | 4 |
| .editorconfig | H A D | 11-Oct-2022 | 616 | 38 | 28 |
| .flake8 | H A D | 02-Nov-2022 | 8.6 KiB | 166 | 155 |
| .gitignore | H A D | 26-Sep-2024 | 1.6 KiB | 112 | 85 |
| .gitlab-ci.yml | H A D | 12-Aug-2024 | 1.3 KiB | 36 | 29 |
| .gitmodules | H A D | 27-May-2025 | 6 KiB | 153 | 129 |
| .mypy.ini | H A D | 26-Feb-2021 | 985 | 27 | 19 |
| .pre-commit-config.yaml | H A D | 26-May-2025 | 8.8 KiB | 245 | 233 |
| .pylintrc | H A D | 17-Aug-2023 | 21.1 KiB | 642 | 466 |
| .readthedocs.yml | H A D | 16-Feb-2024 | 538 | 22 | 10 |
| .shellcheckrc | H A D | 05-Oct-2023 | 164 | 6 | 4 |
| .vale.ini | H A D | 17-Oct-2023 | 3.3 KiB | 120 | 92 |
| CMakeLists.txt | H A D | 15-Oct-2024 | 11.7 KiB | 292 | 250 |
| COMPATIBILITY.md | H A D | 11-May-2024 | 5 KiB | 117 | 68 |
| COMPATIBILITY_CN.md | H A D | 11-May-2024 | 5.1 KiB | 118 | 68 |
| CONTRIBUTING.md | H A D | 05-May-2022 | 314 | 7 | 3 |
| Kconfig | H A D | 07-May-2025 | 28.1 KiB | 682 | 549 |
| LICENSE | H A D | 17-Aug-2016 | 11.1 KiB | 203 | 169 |
| README.md | H A D | 14-Oct-2024 | 9.3 KiB | 133 | 75 |
| README_CN.md | H A D | 14-Oct-2024 | 9.3 KiB | 133 | 75 |
| ROADMAP.md | H A D | 16-Sep-2024 | 5.8 KiB | 124 | 78 |
| ROADMAP_CN.md | H A D | 26-Sep-2024 | 5.5 KiB | 123 | 78 |
| SECURITY.md | H A D | 11-May-2023 | 532 | 10 | 5 |
| SUPPORT_POLICY.md | H A D | 12-May-2022 | 3.6 KiB | 59 | 36 |
| SUPPORT_POLICY_CN.md | H A D | 12-May-2022 | 3.3 KiB | 59 | 36 |
| add_path.sh | H A D | 11-Nov-2020 | 721 | 19 | 10 |
| conftest.py | H A D | 30-Apr-2025 | 17.9 KiB | 517 | 383 |
| export.bat | H A D | 06-Jan-2025 | 2 KiB | 76 | 63 |
| export.fish | H A D | 06-Jan-2025 | 966 | 30 | 23 |
| export.ps1 | H A D | 06-Jan-2025 | 864 | 28 | 15 |
| export.sh | H A D | 06-Jan-2025 | 2.2 KiB | 70 | 51 |
| install.bat | H A D | 06-Jan-2025 | 2.2 KiB | 76 | 61 |
| install.fish | H A D | 06-Jan-2025 | 1 KiB | 38 | 25 |
| install.ps1 | H A D | 06-Jan-2025 | 1.5 KiB | 39 | 23 |
| install.sh | H A D | 06-Jan-2025 | 1 KiB | 42 | 29 |
| pytest.ini | H A D | 10-May-2024 | 955 | 36 | 30 |
| sdkconfig.rename | H A D | 06-Jun-2023 | 2 KiB | 28 | 26 |
| sgconfig.yml | H A D | 10-Apr-2024 | 32 | 3 | 2 |
| sonar-project.properties | H A D | 17-Aug-2023 | 530 | 25 | 18 |
README.md
1# Espressif IoT Development Framework
2
3* [中文版](./README_CN.md)
4
5ESP-IDF is the development framework for Espressif SoCs supported on Windows, Linux and macOS.
6
7# ESP-IDF Release Support Schedule
8
9
10
11- Please read [the support policy](SUPPORT_POLICY.md) and [the documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html) for more information about ESP-IDF versions.
12- Please see the [End-of-Life Advisories](https://www.espressif.com/en/support/documents/advisories?keys=&field_type_of_advisory_tid%5B%5D=817) for information about ESP-IDF releases with discontinued support.
13
14# ESP-IDF Release and SoC Compatibility
15
16The following table shows ESP-IDF support of Espressif SoCs where ![alt text][preview] and ![alt text][supported] denote preview status and support, respectively. The preview support is usually limited in time and intended for beta versions of chips. Please use an ESP-IDF release where the desired SoC is already supported.
17
18|Chip | v5.0 | v5.1 | v5.2 | v5.3 | v5.4 | |
19|:----------- | :---------------------:| :--------------------: | :--------------------: | :--------------------: | :--------------------: |:------------------------------------------------------------------- |
20|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
21|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
22|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
23|ESP32-S3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_S3) |
24|ESP32-C2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32-C2) |
25|ESP32-C6 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_C6) |
26|ESP32-H2 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32_H2) |
27|ESP32-P4 | | | | ![alt text][supported] | ![alt text][supported] |[Announcement](https://www.espressif.com/en/news/ESP32-P4) |
28|ESP32-C5 | | | | | ![alt text][preview] |[Announcement](https://www.espressif.com/en/news/ESP32-C5) |
29|ESP32-C61 | | | | | ![alt text][preview] |[Announcement](https://www.espressif.com/en/products/socs/esp32-c61) |
30
31[supported]: https://img.shields.io/badge/-supported-green "supported"
32[preview]: https://img.shields.io/badge/-preview-orange "preview"
33
34There are variants of revisions for a series of chips. See [Compatibility Between ESP-IDF Releases and Revisions of Espressif SoCs](https://github.com/espressif/esp-idf/blob/master/COMPATIBILITY.md) for the details of the compatibility between ESP-IDF and chip revisions.
35
36Espressif SoCs released before 2016 (ESP8266 and ESP8285) are supported by [RTOS SDK](https://github.com/espressif/ESP8266_RTOS_SDK) instead.
37
38# Developing With ESP-IDF
39
40## Setting Up ESP-IDF
41
42See https://idf.espressif.com/ for links to detailed instructions on how to set up the ESP-IDF depending on chip you use.
43
44**Note:** Each SoC series and each ESP-IDF release has its own documentation. Please see Section [Versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html) on how to find documentation and how to checkout specific release of ESP-IDF.
45
46### Non-GitHub forks
47
48ESP-IDF uses relative locations as its submodules URLs ([.gitmodules](.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/set-submodules-to-github.sh](tools/set-submodules-to-github.sh) after git clone.
49
50The 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.
51
52## Finding a Project
53
54As well as the [esp-idf-template](https://github.com/espressif/esp-idf-template) project mentioned in Getting Started, ESP-IDF comes with some example projects in the [examples](examples) directory.
55
56Once you've found the project you want to work with, change to its directory and you can configure and build it.
57
58To start your own project based on an example, copy the example project directory outside of the ESP-IDF directory.
59
60# Quick Reference
61
62See 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:
63
64## Setup Build Environment
65
66(See the Getting Started guide listed above for a full list of required steps with more details.)
67
68* Install host build dependencies mentioned in the Getting Started guide.
69* Run the install script to set up the build environment. The options include `install.bat` or `install.ps1` for Windows, and `install.sh` or `install.fish` for Unix shells.
70* Run the export script on Windows (`export.bat`) or source it on Unix (`source export.sh`) in every shell environment before using ESP-IDF.
71
72## Configuring the Project
73
74* `idf.py set-target <chip_name>` sets the target of the project to `<chip_name>`. Run `idf.py set-target` without any arguments to see a list of supported targets.
75* `idf.py menuconfig` opens a text-based configuration menu where you can configure the project.
76
77## Compiling the Project
78
79`idf.py build`
80
81... will compile app, bootloader and generate a partition table based on the config.
82
83## Flashing the Project
84
85When the build finishes, it will print a command line to use esptool.py to flash the chip. However you can also do this automatically by running:
86
87`idf.py -p PORT flash`
88
89Replace 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, `idf.py flash` will try to flash the first available serial port.
90
91This will flash the entire project (app, bootloader and partition table) to a new chip. The settings for serial port flashing can be configured with `idf.py menuconfig`.
92
93You don't need to run `idf.py build` before running `idf.py flash`, `idf.py flash` will automatically rebuild anything which needs it.
94
95## Viewing Serial Output
96
97The `idf.py monitor` target uses the [esp-idf-monitor tool](https://github.com/espressif/esp-idf-monitor) to display serial output from Espressif SoCs. esp-idf-monitor also has a range of features to decode crash output and interact with the device. [Check the documentation page for details](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/idf-monitor.html).
98
99Exit the monitor by typing Ctrl-].
100
101To build, flash and monitor output in one pass, you can run:
102
103`idf.py flash monitor`
104
105## Compiling & Flashing Only the App
106
107After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table:
108
109* `idf.py app` - build just the app.
110* `idf.py app-flash` - flash just the app.
111
112`idf.py app-flash` will automatically rebuild the app if any source files have changed.
113
114(In normal development there's no downside to reflashing the bootloader and partition table each time, if they haven't changed.)
115
116## Erasing Flash
117
118The `idf.py 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 `idf.py erase-flash`.
119
120This can be combined with other targets, ie `idf.py -p PORT erase-flash flash` will erase everything and then re-flash the new app, bootloader and partition table.
121
122# Resources
123
124* Documentation for the latest version: https://docs.espressif.com/projects/esp-idf/. This documentation is built from the [docs directory](docs) of this repository.
125
126* [Beginner's Guide to Key Concepts and Resources of ESP-IDF](https://youtu.be/J8zc8mMNKtc?feature=shared)
127
128* The [esp32.com forum](https://esp32.com/) is a place to ask questions and find community resources.
129
130* [Check the Issues section on github](https://github.com/espressif/esp-idf/issues) if you find a bug or have a feature request. Please check existing Issues before opening a new one.
131
132* If you're interested in contributing to ESP-IDF, please check the [Contributions Guide](https://docs.espressif.com/projects/esp-idf/en/latest/contribute/index.html).
133