|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| .github/ | | 11-Mar-2024 | - | 234 | 174 |
| .gitlab/ | | 11-Mar-2024 | - | 237 | 202 |
| components/ | | 11-Mar-2024 | - | 1,380,687 | 894,804 |
| docs/ | | 11-Mar-2024 | - | 87,809 | 60,312 |
| examples/ | | 11-Mar-2024 | - | 282,810 | 228,116 |
| make/ | | 11-Mar-2024 | - | 1,465 | 833 |
| tools/ | | 11-Mar-2024 | - | 467,527 | 445,238 |
| west/ | | 11-Mar-2024 | - | 113 | 76 |
| zephyr/ | | 11-Mar-2024 | - | 6,004 | 4,146 |
| .editorconfig | D | 11-Mar-2024 | 735 | 44 | 33 |
| .flake8 | D | 11-Mar-2024 | 8.7 KiB | 166 | 156 |
| .gitignore | D | 11-Mar-2024 | 1.3 KiB | 91 | 68 |
| .gitlab-ci.yml | D | 11-Mar-2024 | 4.8 KiB | 133 | 86 |
| .gitmodules | D | 11-Mar-2024 | 754 | 19 | 15 |
| .pre-commit-config.yaml | D | 11-Mar-2024 | 2.7 KiB | 78 | 68 |
| .pylintrc | D | 11-Mar-2024 | 18.3 KiB | 604 | 454 |
| .readthedocs.yml | D | 11-Mar-2024 | 538 | 22 | 10 |
| CMakeLists.txt | D | 11-Mar-2024 | 4.8 KiB | 129 | 108 |
| CONTRIBUTING.rst | D | 11-Mar-2024 | 2.5 KiB | 63 | 38 |
| Kconfig | D | 11-Mar-2024 | 16.2 KiB | 403 | 317 |
| LICENSE | D | 11-Mar-2024 | 11.1 KiB | 203 | 169 |
| README.md | D | 11-Mar-2024 | 5.9 KiB | 109 | 59 |
| README_CN.md | D | 11-Mar-2024 | 5.9 KiB | 116 | 64 |
| SUPPORT_POLICY.md | D | 11-Mar-2024 | 3.5 KiB | 84 | 62 |
| SUPPORT_POLICY_CN.md | D | 11-Mar-2024 | 3.2 KiB | 56 | 35 |
| add_path.sh | D | 11-Mar-2024 | 721 | 19 | 10 |
| export.bat | D | 11-Mar-2024 | 2 KiB | 71 | 59 |
| export.fish | D | 11-Mar-2024 | 2.2 KiB | 73 | 59 |
| export.ps1 | D | 11-Mar-2024 | 2.7 KiB | 75 | 51 |
| export.sh | D | 11-Mar-2024 | 5.3 KiB | 159 | 115 |
| install.bat | D | 11-Mar-2024 | 529 | 23 | 18 |
| install.fish | D | 11-Mar-2024 | 435 | 20 | 12 |
| install.ps1 | D | 11-Mar-2024 | 520 | 18 | 11 |
| install.sh | D | 11-Mar-2024 | 463 | 22 | 14 |
| requirements.txt | D | 11-Mar-2024 | 1.5 KiB | 39 | 33 |
| sdkconfig.rename | D | 11-Mar-2024 | 1.9 KiB | 29 | 26 |
README.md
1# Espressif IoT Development Framework
2
3* [中文版](./README_CN.md)
4
5ESP-IDF is the official development framework for the **ESP32** and **ESP32-S** Series SoCs provided for Windows, Linux and macOS.
6
7# Developing With ESP-IDF
8
9## Setting Up ESP-IDF
10
11See setup guides for detailed instructions to set up the ESP-IDF:
12
13| Chip | Getting Started Guides for ESP-IDF |
14|:----:|:----|
15| <img src="docs/_static/chip-esp32.svg" height="85" alt="ESP32"> | <ul><li>[stable](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/) version</li><li>[latest (master branch)](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/) version</li></ul> |
16| <img src="docs/_static/chip-esp32-s2.svg" height="100" alt="ESP32-S2"> | <ul><li>[latest (master branch)](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/) version</li></ul> |
17
18**Note:** Each ESP-IDF release has its own documentation. Please see Section [Versions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/versions.html) how to find documentation and how to checkout specific release of ESP-IDF.
19
20### Non-GitHub forks
21
22ESP-IDF uses relative locations as its submodules URLs ([.gitmodules](.gitmodules)). So they link to GitHub.
23If ESP-IDF is forked to a Git repository which is not on GitHub, you will need to run the script
24[tools/set-submodules-to-github.sh](tools/set-submodules-to-github.sh) after git clone.
25The script sets absolute URLs for all submodules, allowing `git submodule update --init --recursive` to complete.
26If cloning ESP-IDF from GitHub, this step is not needed.
27
28## Finding a Project
29
30As 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.
31
32Once you've found the project you want to work with, change to its directory and you can configure and build it.
33
34To start your own project based on an example, copy the example project directory outside of the ESP-IDF directory.
35
36# Quick Reference
37
38See 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:
39
40## Setup Build Environment
41
42(See the Getting Started guide listed above for a full list of required steps with more details.)
43
44* Install host build dependencies mentioned in the Getting Started guide.
45* 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.
46* Run the export script on Windows (`export.bat`) or source it on Unix (`source export.sh`) in every shell environment before using ESP-IDF.
47
48## Configuring the Project
49
50* `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.
51* `idf.py menuconfig` opens a text-based configuration menu where you can configure the project.
52
53## Compiling the Project
54
55`idf.py build`
56
57... will compile app, bootloader and generate a partition table based on the config.
58
59## Flashing the Project
60
61When 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:
62
63`idf.py -p PORT flash`
64
65Replace 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.
66
67This 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`.
68
69You don't need to run `idf.py build` before running `idf.py flash`, `idf.py flash` will automatically rebuild anything which needs it.
70
71## Viewing Serial Output
72
73The `idf.py monitor` target uses the [idf_monitor tool](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/idf-monitor.html) 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](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/idf-monitor.html).
74
75Exit the monitor by typing Ctrl-].
76
77To build, flash and monitor output in one pass, you can run:
78
79`idf.py flash monitor`
80
81## Compiling & Flashing Only the App
82
83After the initial flash, you may just want to build and flash just your app, not the bootloader and partition table:
84
85* `idf.py app` - build just the app.
86* `idf.py app-flash` - flash just the app.
87
88`idf.py app-flash` will automatically rebuild the app if any source files have changed.
89
90(In normal development there's no downside to reflashing the bootloader and partition table each time, if they haven't changed.)
91
92## Erasing Flash
93
94The `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`.
95
96This 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.
97
98# Resources
99
100* Documentation for the latest version: https://docs.espressif.com/projects/esp-idf/. This documentation is built from the [docs directory](docs) of this repository.
101
102* The [esp32.com forum](https://esp32.com/) is a place to ask questions and find community resources.
103
104* [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.
105
106* 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).
107
108
109