<xmp>用法:esptool [-h] [--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32h2,esp32p4}] [--port PORT]
[--baud BAUD] [--before {default_reset,usb_reset,no_reset,no_reset_no_sync}] [--after {hard_reset,soft_reset,no_reset,no_reset_stub}] [--no-stub] [--trace]
[--override-vddsdio [{1.8V,1.9V,OFF}]] [--connect-attempts CONNECT_ATTEMPTS]
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}
...
esptool.py v4.7.0 - Espressif 芯片 ROM 启动加载程序工具
位置参数:
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,merge_bin,get_security_info,version}
运行 esptool.py {command} -h 获取更多帮助
load_ram 将映像下载到 RAM 并执行
dump_mem 将任意内存转储到磁盘
read_mem 读取任意内存位置
write_mem 读-修改-写任意内存位置
write_flash 将二进制数据写入闪存
run 在闪存中运行应用程序代码
image_info 从二进制文件(启动加载程序或应用程序)转储头信息
make_image 从二进制文件创建应用程序映像
elf2image 从 ELF 文件创建应用程序映像
read_mac 从 OTP ROM 读取 MAC 地址
chip_id 从 OTP ROM 读取芯片 ID
flash_id 读取 SPI 闪存制造商和设备 ID
read_flash_status 读取 SPI 闪存状态寄存器
write_flash_status 写入 SPI 闪存状态寄存器
read_flash 读取 SPI 闪存内容
verify_flash 验证二进制数据与闪存的一致性
erase_flash 对 SPI 闪存进行芯片擦除
erase_region 擦除闪存的某个区域
merge_bin 将多个原始二进制文件合并为一个文件以便后续闪存
get_security_info 获取某些安全相关数据
version 打印 esptool 版本
选项:
-h, --help 显示此帮助信息并退出
--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32h2,esp32p4}, -c {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32h2,esp32p4}
目标芯片类型
--port PORT, -p PORT 串行端口设备
--baud BAUD, -b BAUD 刷写/读取时使用的串行端口波特率
--before {default_reset,usb_reset,no_reset,no_reset_no_sync}
连接到芯片之前的操作
--after {hard_reset,soft_reset,no_reset,no_reset_stub}, -a {hard_reset,soft_reset,no_reset,no_reset_stub}
esptool.py 完成后执行的操作
--no-stub 禁用启动闪存器存根,仅与 ROM 启动加载器通信。某些功能将不可用。
--trace, -t 启用 esptool.py 交互的追踪级别输出。
--override-vddsdio [{1.8V,1.9V,OFF}]
覆盖 ESP32 VDDSDIO 内部电压调节器(小心使用)
--connect-attempts CONNECT_ATTEMPTS
连接尝试次数,负数或 0 表示无限。默认值:7。</xmp>
<xmp>{
"configurations": [
{
"name": "ESP32-S3-v5.1.4",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "linux_x64" ],
"buildRoot": "${projectDir}\\build_5.1.4_s3",
"installRoot": "${projectDir}\\install",
"cmakeCommandArgs": "--warn-uninitialized",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"environments": [
{
"FLASH_COM_PORT": "COM6",
"FLASH_BAUD": "921600",
"environment": "linux_x64",
"IDF_TARGET": "esp32s3"
},
{
"IDF_PATH": "D:\\Espressif\\v5.1.4\\esp-idf",
"IDF_TOOLS_PATH": "d:/Espressif/idf_tools",
"IDF_PYTHON_ENV_PATH": "d:\\Espressif\\idf_tools\\python_env\\idf5.1_py3.11_env",
"PYTHON": "${env.IDF_PYTHON_ENV_PATH}/Scripts/python.exe",
"OPENOCD_SCRIPTS": "d:\\Espressif\\idf_tools\\tools\\openocd-esp32\\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
"IDF_CCACHE_ENABLE": "1",
"ESP_ROM_ELF_DIR": "d:\\Espressif\\idf_tools\\tools\\esp-rom-elfs\230320/",
"IDF_TARGET": "esp32s3",
"PATH": "d:\\Espressif\\idf_tools\\tools\\xtensa-esp-elf-gdb\.1_20231023\\xtensa-esp-elf-gdb\\bin;d:\\Espressif\\idf_tools\\tools\\riscv32-esp-elf-gdb\.1_20231023\\riscv32-esp-elf-gdb\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32-elf\\esp-12.2.0_20230208\\xtensa-esp32-elf\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32s2-elf\\esp-12.2.0_20230208\\xtensa-esp32s2-elf\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32s3-elf\\esp-12.2.0_20230208\\xtensa-esp32s3-elf\\bin;d:\\Espressif\\idf_tools\\tools\\riscv32-esp-elf\\esp-12.2.0_20230208\\riscv32-esp-elf\\bin;d:\\Espressif\\idf_tools\\tools\\esp32ulp-elf\.35_20220830\\esp32ulp-elf\\bin;d:\\Espressif\\idf_tools\\tools\\cmake\.24.0\\bin;d:\\Espressif\\idf_tools\\tools\\openocd-esp32\\v0.12.0-esp32-20230921\\openocd-esp32\\bin;d:\\Espressif\\idf_tools\\tools\\ninja\.10.2;d:\\Espressif\\idf_tools\\tools\\idf-exe\.0.3;d:\\Espressif\\idf_tools\\tools\\ccache\.8\\ccache-4.8-windows-x86_64;d:\\Espressif\\idf_tools\\tools\\dfu-util\
<xmp>{
"configurations": [
{
"name": "ESP32-S3-v5.1.4",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "linux_x64" ],
"buildRoot": "${projectDir}\\build_5.1.4_s3",
"installRoot": "${projectDir}\\install",
"cmakeCommandArgs": "--warn-uninitialized",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"environments": [
{
"FLASH_COM_PORT": "COM6",
"FLASH_BAUD": "921600",
"environment": "linux_x64",
"IDF_TARGET": "esp32s3"
},
{
"IDF_PATH": "D:\\Espressif\\v5.1.4\\esp-idf",
"IDF_TOOLS_PATH": "d:/Espressif/idf_tools",
"IDF_PYTHON_ENV_PATH": "d:\\Espressif\\idf_tools\\python_env\\idf5.1_py3.11_env",
"PYTHON": "${env.IDF_PYTHON_ENV_PATH}/Scripts/python.exe",
"OPENOCD_SCRIPTS": "d:\\Espressif\\idf_tools\\tools\\openocd-esp32\\v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
"IDF_CCACHE_ENABLE": "1",
"ESP_ROM_ELF_DIR": "d:\\Espressif\\idf_tools\\tools\\esp-rom-elfs\\20230320/",
"IDF_TARGET": "esp32s3",
"PATH": "d:\\Espressif\\idf_tools\\tools\\xtensa-esp-elf-gdb\\12.1_20231023\\xtensa-esp-elf-gdb\\bin;d:\\Espressif\\idf_tools\\tools\\riscv32-esp-elf-gdb\\12.1_20231023\\riscv32-esp-elf-gdb\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32-elf\\esp-12.2.0_20230208\\xtensa-esp32-elf\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32s2-elf\\esp-12.2.0_20230208\\xtensa-esp32s2-elf\\bin;d:\\Espressif\\idf_tools\\tools\\xtensa-esp32s3-elf\\esp-12.2.0_20230208\\xtensa-esp32s3-elf\\bin;d:\\Espressif\\idf_tools\\tools\\riscv32-esp-elf\\esp-12.2.0_20230208\\riscv32-esp-elf\\bin;d:\\Espressif\\idf_tools\\tools\\esp32ulp-elf\\2.35_20220830\\esp32ulp-elf\\bin;d:\\Espressif\\idf_tools\\tools\\cmake\\3.24.0\\bin;d:\\Espressif\\idf_tools\\tools\\openocd-esp32\\v0.12.0-esp32-20230921\\openocd-esp32\\bin;d:\\Espressif\\idf_tools\\tools\\ninja\\1.10.2;d:\\Espressif\\idf_tools\\tools\\idf-exe\\1.0.3;d:\\Espressif\\idf_tools\\tools\\ccache\\4.8\\ccache-4.8-windows-x86_64;d:\\Espressif\\idf_tools\\tools\\dfu-util\\0.11\\dfu-util-0.11-win64;d:\\Espressif\\idf_tools\\tools\\esp-rom-elfs\\20230320;${env.PATH};"
},
{
"PYTHONNOUSERSITE": "True",
"IDF_TOOLS_TOOLS": "${env.IDF_TOOLS_PATH}/tools"
}
],
"cmakeToolchain": "${env.IDF_PATH}/tools/cmake/toolchain-esp32s3.cmake"
},
{
"name": "ESP32-S3-v5.2.1",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "linux_x64" ],
"buildRoot": "${projectDir}\\build_5.2.1_s3",
"installRoot": "${projectDir}\\install",
"cmakeCommandArgs": "--warn-uninitialized",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"environments": [
{
"FLASH_COM_PORT": "COM6",
"FLASH_BAUD": "921600",
"environment": "linux_x64",
"IDF_TARGET": "esp32s3"
},
{
"IDF_TOOLS_PATH": "d:/Espressif/idf_tools",
"OPENOCD_SCRIPTS": "d:/Espressif/idf_tools/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
"IDF_CCACHE_ENABLE": "1",
"ESP_ROM_ELF_DIR": "d:/Espressif/idf_tools/tools/esp-rom-elfs/20230320/",
"IDF_PATH": "d:/Espressif/v5.2.1/esp-idf",
"PYTHON": "d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env/Scripts/python.exe",
"IDF_PYTHON_ENV_PATH": "d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env",
"IDF_TARGET": "esp32s3",
"PATH": "d:/Espressif/v5.2.1/esp-idf/components/espcoredump;d:/Espressif/v5.2.1/esp-idf/components/partition_table;d:/Espressif/idf_tools/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin;d:/Espressif/idf_tools/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin;d:/Espressif/idf_tools/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin;d:/Espressif/idf_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin;d:/Espressif/idf_tools/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin;d:/Espressif/idf_tools/tools/cmake/3.24.0/bin;d:/Espressif/idf_tools/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin;d:/Espressif/idf_tools/tools/ninja/1.11.1;d:/Espressif/idf_tools/tools/idf-exe/1.0.3;d:/Espressif/idf_tools/tools/ccache/4.8/ccache-4.8-windows-x86_64;d:/Espressif/idf_tools/tools/dfu-util/0.11/dfu-util-0.11-win64;d:/Espressif/idf_tools/tools/esp-rom-elfs/20230320;d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env/Scripts;d:/Espressif/v5.2.1/esp-idf/tools;d:/Espressif/idf_tools/tools/idf-git/2.39.2/cmd;${env.PATH};"
},
{
"PYTHONNOUSERSITE": "True",
"IDF_TOOLS_TOOLS": "${env.IDF_TOOLS_PATH}/tools"
}
],
"variables": [
{
"name": "IDF_TARGET",
"value": "esp32s3",
"type": "STRING"
},
{
"name": "CMAKE_MAKE_PROGRAM",
"value": "${env.IDF_TOOLS_TOOLS}\\ninja\\1.11.1\\ninja.exe",
"type": "FILEPATH"
},
{
"name": "CCACHE_ENABLE",
"value": "1",
"type": "STRING"
},
{
"name": "ESP_PLATFORM",
"value": "1",
"type": "STRING"
}
],
"cmakeToolchain": "${env.IDF_PATH}/tools/cmake/toolchain-esp32s3.cmake",
"_cmakeExecutable": "${env.IDF_TOOLS_TOOLS}/cmake/3.24.0/bin/cmake.exe"
}
]
}</xmp>
.11\\dfu-util-0.11-win64;d:\\Espressif\\idf_tools\\tools\\esp-rom-elfs\230320;${env.PATH};"
},
{
"PYTHONNOUSERSITE": "True",
"IDF_TOOLS_TOOLS": "${env.IDF_TOOLS_PATH}/tools"
}
],
"cmakeToolchain": "${env.IDF_PATH}/tools/cmake/toolchain-esp32s3.cmake"
},
{
"name": "ESP32-S3-v5.2.1",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "linux_x64" ],
"buildRoot": "${projectDir}\\build_5.2.1_s3",
"installRoot": "${projectDir}\\install",
"cmakeCommandArgs": "--warn-uninitialized",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"environments": [
{
"FLASH_COM_PORT": "COM6",
"FLASH_BAUD": "921600",
"environment": "linux_x64",
"IDF_TARGET": "esp32s3"
},
{
"IDF_TOOLS_PATH": "d:/Espressif/idf_tools",
"OPENOCD_SCRIPTS": "d:/Espressif/idf_tools/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/share/openocd/scripts",
"IDF_CCACHE_ENABLE": "1",
"ESP_ROM_ELF_DIR": "d:/Espressif/idf_tools/tools/esp-rom-elfs/20230320/",
"IDF_PATH": "d:/Espressif/v5.2.1/esp-idf",
"PYTHON": "d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env/Scripts/python.exe",
"IDF_PYTHON_ENV_PATH": "d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env",
"IDF_TARGET": "esp32s3",
"PATH": "d:/Espressif/v5.2.1/esp-idf/components/espcoredump;d:/Espressif/v5.2.1/esp-idf/components/partition_table;d:/Espressif/idf_tools/tools/xtensa-esp-elf-gdb/12.1_20231023/xtensa-esp-elf-gdb/bin;d:/Espressif/idf_tools/tools/riscv32-esp-elf-gdb/12.1_20231023/riscv32-esp-elf-gdb/bin;d:/Espressif/idf_tools/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin;d:/Espressif/idf_tools/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin;d:/Espressif/idf_tools/tools/esp32ulp-elf/2.35_20220830/esp32ulp-elf/bin;d:/Espressif/idf_tools/tools/cmake/3.24.0/bin;d:/Espressif/idf_tools/tools/openocd-esp32/v0.12.0-esp32-20230921/openocd-esp32/bin;d:/Espressif/idf_tools/tools/ninja/1.11.1;d:/Espressif/idf_tools/tools/idf-exe/1.0.3;d:/Espressif/idf_tools/tools/ccache/4.8/ccache-4.8-windows-x86_64;d:/Espressif/idf_tools/tools/dfu-util/0.11/dfu-util-0.11-win64;d:/Espressif/idf_tools/tools/esp-rom-elfs/20230320;d:/Espressif/idf_tools/python_env/idf5.2_py3.11_env/Scripts;d:/Espressif/v5.2.1/esp-idf/tools;d:/Espressif/idf_tools/tools/idf-git/2.39.2/cmd;${env.PATH};"
},
{
"PYTHONNOUSERSITE": "True",
"IDF_TOOLS_TOOLS": "${env.IDF_TOOLS_PATH}/tools"
}
],
"variables": [
{
"name": "IDF_TARGET",
"value": "esp32s3",
"type": "STRING"
},
{
"name": "CMAKE_MAKE_PROGRAM",
"value": "${env.IDF_TOOLS_TOOLS}\\ninja\.11.1\\ninja.exe",
"type": "FILEPATH"
},
{
"name": "CCACHE_ENABLE",
"value": "1",
"type": "STRING"
},
{
"name": "ESP_PLATFORM",
"value": "1",
"type": "STRING"
}
],
"cmakeToolchain": "${env.IDF_PATH}/tools/cmake/toolchain-esp32s3.cmake",
"_cmakeExecutable": "${env.IDF_TOOLS_TOOLS}/cmake/3.24.0/bin/cmake.exe"
}
]
}</xmp>
0