目录
4、将它放入开发板管理器地址中,按确定。接下来会自动下载索引,有可能会出现下面的错误
arduino 安装esp32 开发板
1、获取支持的非官方开发板地址
1、在首选项里面选择开发板管理器地址
下面的地址你们可以复制我的
http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
也可以按照下面的方法获取
2、点击下图的“点击获取支持的非官方开发板地址列表”

3、寻找你想要的开发板地址

4、将它放入开发板管理器地址中,按确定。
接下来会自动下载索引,有可能会出现下面的错误
一些索引无法更新:
“https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json”:
dial tcp: lookup raw.githubusercontent.com: getaddrinfow: The
requested name is valid, but no data of the requested type was found.:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json`
但这不要紧,继续就好了。
5、打开开发板管理器
接下来需要选择 工具 → 开发板 → 开发板管理器 来添加开发板
搜索esp32

6、点击安装
期间会安装很多文件,安装目录为下面的路径(注意需要打开隐藏文件显示才能看到)
C:\Users\AppData\Local\Arduino15\staging\packages
7、安装遇到失败
这时候你的网络可能会出现些问题,导致下载失败,
Failed to install platform: arduino:esp32. Error: 2 UNKNOWN: Get
“https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-win32-0.11.0-esp32-20221026.zip”:
read tcp 192.168.31.116:58315->20.205.243.166:443: wsarecv: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed
because connected host has failed to respond
这时候可以把显示的网址复制到浏览器,搜索下载,(有可能需要外网)
https://github.com/espressif/openocd-esp32/releases/download/v0.11.0-esp32-20221026/openocd-esp32-win32-0.11.0-esp32-20221026.zip
将下载的文件放进下面的路径(无需解压)
C:\Users\AppData\Local\Arduino15\staging\packages
继续点击下面的安装
重复这一步骤直到安装成功
安装成功后会在 C:\Users\AppData\Local\Arduino15\packages 处生成esp32包