当前位置: 首页 > news >正文

使用pip安装esp32的擦除、写入固件的esptool库

esptool库可以为esp32的开发板烧录新的固件,但是如果为了烧录固件就要装esp-idf软件包,甚至需要用make编译安装很久,实在太费时费力了!

好消息就是,esp提供了python的esptool库,这样只要使用pip安装上这个工具库,就可以使用了,非常简单方便。

pip安装esptool库:

pip install esptool

安装完成后显示:

Successfully installed argcomplete-3.5.1 bitarray-2.9.3 bitstring-4.2.3 ecdsa-0.19.0 esptool-4.8.1 intelhex-2.3.0 pyserial-3.5 reedsolo-1.7.0

这时候就可以使用esptool了,不过跟其它库不一样的是,执行命令需要带上py后嘴,也就是

需要执行

esptool.py --help
esptool.py --help
usage: esptool [-h][--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32c61,esp32c5,esp32c5beta3,esp32h2,esp32p4}][--port PORT] [--baud BAUD][--port-filter PORT_FILTER][--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,read_flash_sfdp,merge_bin,get_security_info,version}...esptool.py v4.8.1 - Espressif chips ROM Bootloader Utilitypositional arguments:{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,read_flash_sfdp,merge_bin,get_security_info,version}Run esptool.py {command} -h foradditional helpload_ram            Download an image to RAM and executedump_mem            Dump arbitrary memory to diskread_mem            Read arbitrary memory locationwrite_mem           Read-modify-write to arbitrary memorylocationwrite_flash         Write a binary blob to flashrun                 Run application code in flashimage_info          Dump headers from a binary file(bootloader or application)make_image          Create an application image from binaryfileself2image           Create an application image from ELF fileread_mac            Read MAC address from OTP ROMchip_id             Read Chip ID from OTP ROMflash_id            Read SPI flash manufacturer and device IDread_flash_status   Read SPI flash status registerwrite_flash_status  Write SPI flash status registerread_flash          Read SPI flash contentverify_flash        Verify a binary blob against flasherase_flash         Perform Chip Erase on SPI flasherase_region        Erase a region of the flashread_flash_sfdp     Read SPI flash SFDP (Serial FlashDiscoverable Parameters)merge_bin           Merge multiple raw binary files into asingle file for later flashingget_security_info   Get some security-related dataversion             Print esptool versionoptions:-h, --help            show this help message and exit--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32c61,esp32c5,esp32c5beta3,esp32h2,esp32p4}, -c {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32c61,esp32c5,esp32c5beta3,esp32h2,esp32p4}Target chip type--port PORT, -p PORT  Serial port device--baud BAUD, -b BAUD  Serial port baud rate used whenflashing/reading--port-filter PORT_FILTERSerial port device filter, can bevid=NUMBER, pid=NUMBER, name=SUBSTRING--before {default_reset,usb_reset,no_reset,no_reset_no_sync}What to do before connecting to the chip--after {hard_reset,soft_reset,no_reset,no_reset_stub}, -a {hard_reset,soft_reset,no_reset,no_reset_stub}What to do after esptool.py is finished--no-stub             Disable launching the flasher stub, onlytalk to ROM bootloader. Some featureswill not be available.--trace, -t           Enable trace-level output of esptool.pyinteractions.--override-vddsdio [{1.8V,1.9V,OFF}]Override ESP32 VDDSDIO internal voltageregulator (use with care)--connect-attempts CONNECT_ATTEMPTSNumber of attempts to connect, negativeor 0 for infinite. Default: 7.

 

http://www.lryc.cn/news/486035.html

相关文章:

  • 传奇996_23——杀怪掉落,自动捡取,捡取动画
  • 【030】基于51单片机甲醛检测报警器【Proteus仿真+Keil程序+报告+原理图】
  • 微信小程序:vant组件库安装步骤
  • 处理namespace问题:Namespace not specified for AGP 8.0.0
  • C++(Qt)软件调试---内存分析工具Heob(26)
  • Redis五大基本类型——String字符串命令详解(命令用法详解+思维导图详解)
  • Flutter中的Material Theme完全指南:从入门到实战
  • Python 第三方库 PyQt5 的安装
  • CSS基础也要进行模电实验
  • 贴代码框架PasteForm特性介绍之markdown和richtext
  • 3D Gaussian Splatting 代码层理解之Part3
  • Ceph 中PG与PGP的概述
  • 已解决:spark代码中sqlContext.createDataframe空指针异常
  • flutter字体大小切换案例 小字体,标准字体,大字体,超大字体案例
  • 智慧建造-运用Trimble技术将梦幻水族馆变为现实【上海沪敖3D】
  • 【NOIP提高组】计算系数
  • IDEA部署AI代写插件
  • 【阅读记录-章节1】Build a Large Language Model (From Scratch)
  • 微服务day08
  • JAVA接入WebScoket行情接口
  • 使用Axios函数库进行网络请求的使用指南
  • Vue2+ElementUI:用计算属性实现搜索框功能
  • 抖音热门素材去哪找?优质抖音视频素材网站推荐!
  • spring-cache concurrentHashMap 自定义过期时间
  • 解析传统及深度学习目标检测方法的原理与具体应用之道
  • shell数组
  • 高斯混合模型回归(Gaussian Mixture Model Regression,GMM回归)
  • 【3D Slicer】的小白入门使用指南八
  • 【流量分析】常见webshell流量分析
  • 基于树莓派的边缘端 AI 目标检测、目标跟踪、姿态估计 视频分析推理 加速方案:Hailo with ultralytics YOLOv8 YOLOv11