COMMON COMMAND¶
TOC¶
Use | Command |
---|---|
Create Project | idf.py create_project <project_name> |
Set Target | idf.py set_target <target> |
Configure | idf.py menuconfig |
Create Component | idf.py create_component <component_name> |
Add Component from ESP Component Register | idf.py add-dependency <component_name> |
Build | idf.py build |
Flash | idf.py -p <port> flash |
Monitor | idf.py -p <port> monitor |
Build & Flash & Monitor | idf.py build flash monitor |
CREATE PROJECT¶
Command Prototype
Example
SET TARGET¶
Command Prototype
Example
CONFIGURE¶
Command Prototype
Example
Note
In ESP32 projects, we usually configure the project using the menuconfig
command. The menuconfig
command opens a configuration interface where you can configure various options of the project. This configuration interface is generated by the Kconfig
file in the project. The values of these configuration options are saved in the sdkconfig
file in the project.
In short, the logical relationship of the configuration system is: Kconfig
-> menuconfig
-> sdkconfig
. We define configuration options in the Kconfig
file, configure these options using the menuconfig
command, and then save the values of these configuration options in the sdkconfig
file.
CREATE COMPONENT¶
Command Prototype
Note
The -C
option is used to specify the path of the project.
<project_path>
is the path of the project.
<component_name>
is the name of the component.
Example
ADD COMPONENT FROM ESP COMPONENT REGISTER¶
Command Prototype
Example
BUILD¶
Command Prototype
Example
FLASH¶
Command Prototype
Example
Tip
For short, most of time, you can use idf.py flash
and the computer will automatically detect the port.
MONITOR¶
Command Prototype
Example
Tip
For short, most of time, you can use idf.py monitor
and the computer will automatically detect the port.
BUILD & FLASH & MONITOR¶
This is a combination of the above commands.
Command Prototype
Example