ps:这是你为了点灯最繁琐的一次
1.软件下载
- vscode下载地址:Documentation for Visual Studio Code
- esp_idf下载地址:https://dl.espressif.cn/dl/esp-idf/?idf=4.4 (从上往下第三)
2.软件安装
- 可以均默认安装,但建议不要放在C盘,记住安装路径
3.vscode插件安装

4.环境pip和工具pip安装更新(关键)
- 管理员运行终端(管理员应该是必须的)
- 找到工具python地址
- 设置国内镜像
D:\Espressif\tools\idf-python\3.11.2 \python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
空格前替换为自己的路径 然后删除空格 如果返回结果如下 C:\Windows\System32>D:\Espressif\tools\idf-python\3.11
.2\python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple D:\Espressif\tools\idf-python\3.11.2\python.exe: No module named pip
则说明没安装pip 先跳到下面的命令安装pip
- 安装工具pip
D:\Espressif\tools\idf-python\3.11.2 \python.exe -m ensurepip
空格前替换为自己的路径 然后删除空格 如果返回结果如下 C:\Windows\System32>D:\Espressif\tools\idf-python\3.11.2\python.exe -m ensurepip Looking in links: c:\Users\10035\AppData\Local\Temp\tmpex20y7k1 Processing c:\users\10035\appdata\local\temp\tmpex20y7k1\setuptools-65.5.0-py3-none-any.whl Processing c:\users\10035\appdata\local\temp\tmpex20y7k1\pip-22.3.1-py3-none-any.whl Installing collected packages: setuptools, pip WARNING: The scripts pip3.11.exe and pip3.exe are installed in 'D:\Espressif\tools\idf-python\3.11.2\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-22.3.1 setuptools-65.5.0
则说明安装成功 但没添加环境变量 这一步之后返回上一步 设置国内镜像 方便下载 C:\Windows\System32>D:\Espressif\tools\idf-python\3.11.2\python -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
Writing to C:\Users\10035\AppData\Roaming\pip\pip.ini 这个返回说明设置好了
- 添加系统环境变量(不确定是否必须)
- 升级pip版本
D:\Espressif\tools\idf-python\3.11.2 \python.exe -m pip install --upgrade pip
空格前替换为自己的路径 然后删除空格 如果返回结果如下 C:\Windows\System32>D:\Espressif\tools\idf-python\3.11.2\python.exe -m pip install --upgrade pip Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pip in d:\espressif\tools\idf-python\3.11.2\lib\site-packages (22.3.1) Collecting pip Downloading https://pypi.tuna.tsinghua.edu.cn/packages/29/a2/d40fb2460e883eca5199c62cfc2463fd261f760556ae6290f88488c362c0/pip-25.1.1-py3-none-any.whl (1.8 MB) ---------------------------------------- 1.8/1.8 MB 182.4 kB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.3.1 Uninstalling pip-22.3.1: Successfully uninstalled pip-22.3.1 WARNING: The scripts pip.exe, pip3.11.exe and pip3.exe are installed in 'D:\Espressif\tools\idf-python\3.11.2\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-25.1.1 则说明更新成功
- 安装更新环境pip,换路径上面的流程再来一遍
D:\Espressif\python_env\idf5.4_py3.11_env\Scripts 类似这个路径
5.配置IDF插件
- 打开vscode 在搜索栏输入>configesp 选择配置esp_idf扩展 选择ADVANCED
- 修改下面两个路径 (一般会自动识别路径)
- 选择使用现用工具 并保存
- 等待下载完成,完成页面如下 到这环境已经完成配置
6.烧录第一个例程(点灯)
- 选择例程 选择文件夹后例程会自动生成
- 选择芯片和端口 选择ESP32S3之后会出现三个选项 对应三种下载模式 USB JTAG(内置 USB 调试与下载)PROG(GPIO0下载模式) PROG-2(GPIO2下载模式) 这里直接选择最常用的PROG模式
- 修改你硬件对应的IO口 点下面图标打开idf 终端 然后输入idf.py 通过键盘修改配置
(修改后直接改变的是sdkconfig 而sdkconfig.h是编译后生成的 所以先编译即可 sdkconfig.s3这是对应芯片的备份 用于切换芯片时直接拷贝到sdkconfig 所以实际起作用的还是sdkconfig) - 左下工具栏构建 烧录 监视 一步到位 第一次编译会慢一点 之后修改再编译就快了 编译后选择下载方式 直接选UART下载
- 最终的效果就是一个1s间隔闪烁的LED 这大概是过程最繁琐的点灯了吧。