“ESP32-C3-MINI (SMD)”的版本间的差异

来自丢石头百科
第23行: 第23行:
 
<p>有关SoC支持的概述,请查看[https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html 支持的SoC表格],您可以在其中找到特定芯片是处于稳定版还是开发版发布状态。</p>
 
<p>有关SoC支持的概述,请查看[https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html 支持的SoC表格],您可以在其中找到特定芯片是处于稳定版还是开发版发布状态。</p>
 
</div>
 
</div>
 +
 +
* 稳定版链接:
 +
https://espressif.github.io/arduino-esp32/package_esp32_index.json
 +
 +
* 开发版链接:
 +
https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
  
 
稳定版链接:
 
稳定版链接:
第37行: 第43行:
  
 
中国用户可能在使用上述链接时遇到连接和下载速度问题。请使用我们的Jihulab镜像:
 
中国用户可能在使用上述链接时遇到连接和下载速度问题。请使用我们的Jihulab镜像:
 +
 +
* 稳定版链接:
 +
https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json
 +
 +
* 开发版链接:
 +
https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_dev_index_cn.json
  
 
稳定版链接:
 
稳定版链接:
第60行: 第72行:
 
* 启动Arduino并打开首选项窗口。
 
* 启动Arduino并打开首选项窗口。
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_preferences.png|thumb|Arduino IDE 首选项窗口]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_preferences.png" alt="Arduino IDE 首选项窗口" width="500" />
  
 
* 在"附加开发板管理器URL"字段中输入上述发布链接之一。您可以添加多个URL,用逗号分隔。
 
* 在"附加开发板管理器URL"字段中输入上述发布链接之一。您可以添加多个URL,用逗号分隔。
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_preferences_boards_manager_url.png|thumb|Arduino IDE 附加开发板管理器URL字段]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_preferences_boards_manager_url.png" alt="Arduino IDE 附加开发板管理器URL字段" width="500" />
  
 
* 从工具 > 开发板菜单打开开发板管理器,安装esp32平台(安装后不要忘记从工具 > 开发板菜单中选择您的ESP32开发板)。
 
* 从工具 > 开发板菜单打开开发板管理器,安装esp32平台(安装后不要忘记从工具 > 开发板菜单中选择您的ESP32开发板)。
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_boards_manager_menu.png|thumb|Arduino IDE 开发板管理器菜单]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_boards_manager_menu.png" alt="Arduino IDE 开发板管理器菜单" width="500" />
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_boards_manager_esp32.png|thumb|Arduino IDE 开发板管理器ESP32安装]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_boards_manager_esp32.png" alt="Arduino IDE 开发板管理器ESP32安装" width="500" />
  
 
中国用户必须选择带有"-cn"后缀的软件包版本,并手动执行更新。此地区不支持自动更新,因为它们针对的是没有"-cn"后缀的默认软件包,这会导致下载失败。
 
中国用户必须选择带有"-cn"后缀的软件包版本,并手动执行更新。此地区不支持自动更新,因为它们针对的是没有"-cn"后缀的默认软件包,这会导致下载失败。
第107行: 第119行:
 
* 选择克隆现有仓库
 
* 选择克隆现有仓库
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/git_gui_clone_repository.png|thumb|Git GUI 克隆现有仓库]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/git_gui_clone_repository.png" alt="Git GUI 克隆现有仓库" width="500" />
  
 
<syntaxhighlight lang="text">
 
<syntaxhighlight lang="text">
第119行: 第131行:
 
** 点击克隆开始克隆仓库
 
** 点击克隆开始克隆仓库
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/git_gui_setup_repository.png|thumb|Git GUI 设置仓库]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/git_gui_setup_repository.png" alt="Git GUI 设置仓库" width="500" />
  
 
草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。
 
草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。
第182行: 第194行:
 
# 在工具 > 开发板菜单中选择您的开发板
 
# 在工具 > 开发板菜单中选择您的开发板
  
[[File:https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_board_selection.png|thumb|Arduino IDE 开发板选择]]
+
<img src="https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino_ide_board_selection.png" alt="Arduino IDE 开发板选择" width="500" />
  
 
# 选择开发板连接的COM端口
 
# 选择开发板连接的COM端口

2025年8月6日 (三) 11:38的版本

安装

安装前准备

我们建议您使用您喜欢的IDE安装支持,但根据您的操作系统,还有其他选项可用。要安装Arduino-ESP32支持,您可以使用以下选项之一。

注意

中国用户可能在使用GitHub时遇到连接和下载速度问题。请使用我们的Jihulab镜像作为仓库源: https://jihulab.com/esp-mirror/espressif/arduino-esp32.git

https://jihulab.com/esp-mirror/espressif/arduino-esp32.git

使用Arduino IDE安装

这是直接从Arduino IDE安装Arduino-ESP32的方法。

注意

有关SoC支持的概述,请查看支持的SoC表格,您可以在其中找到特定芯片是处于稳定版还是开发版发布状态。

  • 稳定版链接:

https://espressif.github.io/arduino-esp32/package_esp32_index.json

  • 开发版链接:

https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

稳定版链接:

https://espressif.github.io/arduino-esp32/package_esp32_index.json

开发版链接:

https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

中国用户可能在使用上述链接时遇到连接和下载速度问题。请使用我们的Jihulab镜像:

  • 稳定版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json

  • 开发版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_dev_index_cn.json

稳定版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json

开发版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_dev_index_cn.json

注意

从Arduino IDE版本1.6.4开始,Arduino允许使用开发板管理器安装第三方平台包。我们提供适用于Windows、macOS和Linux的软件包。

要使用开发板管理器开始安装过程,请按照以下步骤操作:

  • 安装1.8级或更高版本的当前上游Arduino IDE。当前版本位于arduino.cc网站。
  • 启动Arduino并打开首选项窗口。

<img src="arduino_ide_preferences.png" alt="Arduino IDE 首选项窗口" width="500" />

  • 在"附加开发板管理器URL"字段中输入上述发布链接之一。您可以添加多个URL,用逗号分隔。

<img src="arduino_ide_preferences_boards_manager_url.png" alt="Arduino IDE 附加开发板管理器URL字段" width="500" />

  • 从工具 > 开发板菜单打开开发板管理器,安装esp32平台(安装后不要忘记从工具 > 开发板菜单中选择您的ESP32开发板)。

<img src="arduino_ide_boards_manager_menu.png" alt="Arduino IDE 开发板管理器菜单" width="500" />

<img src="arduino_ide_boards_manager_esp32.png" alt="Arduino IDE 开发板管理器ESP32安装" width="500" />

中国用户必须选择带有"-cn"后缀的软件包版本,并手动执行更新。此地区不支持自动更新,因为它们针对的是没有"-cn"后缀的默认软件包,这会导致下载失败。

  • 重启Arduino IDE。

Windows(手动安装)

警告

Arduino ESP32核心v2.x.x不能在Windows 8.x x86(32位)、Windows 7或更早版本上使用。Windows 32位操作系统不再受此工具链支持。 Arduino ESP32 v1.0.6仍然可以在WIN32上工作。您可能需要安装python 3.8.x,因为它是Windows 7支持的最新版本。

在Windows上安装Arduino ESP32支持的步骤:

步骤1

  1. arduino.cc下载并安装最新的Arduino IDE Windows安装程序
  2. git-scm.com下载并安装Git
  3. 启动Git GUI并执行以下步骤:

arduino.cc下载并安装最新的Arduino IDE Windows安装程序

Windows Installer

git-scm.com下载并安装Git 启动Git GUI并执行以下步骤:

Git GUI
  • 选择克隆现有仓库

<img src="git_gui_clone_repository.png" alt="Git GUI 克隆现有仓库" width="500" />

Clone Existing Repository
  • 选择源和目标
    • 草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。
    • 源位置:https://github.com/espressif/arduino-esp32.git
    • 目标目录:[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32
    • 点击克隆开始克隆仓库

<img src="git_gui_setup_repository.png" alt="Git GUI 设置仓库" width="500" />

草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。

C:/Users/[YOUR_USER_NAME]/Documents/Arduino

源位置:https://github.com/espressif/arduino-esp32.git

https://github.com/espressif/arduino-esp32.git

目标目录:[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32

点击克隆开始克隆仓库

Clone

步骤2

步骤3

  • 打开指向[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32的Git Bash会话,执行`git submodule update --init --recursive`
  • 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe

打开指向[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32的Git Bash会话,执行`git submodule update --init --recursive`

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32
git submodule update --init --recursive

打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools
get.exe

步骤4

  • 当`get.exe`完成时,您应该在目录中看到以下文件
get.exe

步骤5

  1. 插入您的ESP32开发板并等待驱动程序安装(或手动安装可能需要的任何驱动程序)
  2. 启动Arduino IDE
  3. 在工具 > 开发板菜单中选择您的开发板

<img src="arduino_ide_board_selection.png" alt="Arduino IDE 开发板选择" width="500" />

  1. 选择开发板连接的COM端口
  2. 编译并上传(上传时可能需要按住boot按钮)

如何更新到最新代码

  1. 启动Git GUI,您应该在"打开最近的仓库"下看到该仓库。点击它!
Git GUI
Open Recent Repository
  1. 从菜单Remote选择Fetch from > origin
Remote
Fetch from
origin
  1. 等待git拉取任何更改,然后关闭Git GUI
  2. 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe
Git GUI
[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools
get.exe

Linux

Debian/Ubuntu

  • arduino.cc安装最新的Arduino IDE。
  • 打开终端并执行以下命令(复制 -> 粘贴并按回车):
sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python3 get-pip.py && \
sudo pip3 install pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python3 get.py
  • 重启Arduino IDE。
  • 如果您已将Arduino安装到~/,请从mkdir -p ~/Arduino/hardware开始修改安装,如下所示:
cd ~/Arduino/hardware
mkdir -p espressif && \
cd espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python3 get.py

Fedora

注意

命令$ sudo dnf -y install arduino很可能会安装旧版本。

$ sudo dnf -y install arduino
  • 打开终端并执行以下命令(复制 -> 粘贴并按回车):
sudo usermod -a -G dialout $USER && \
sudo dnf install git python3-pip python3-pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py
  • 重启Arduino IDE。

openSUSE

  • arduino.cc安装最新的Arduino IDE。
  • 打开终端并执行以下命令(复制 -> 粘贴并按回车):
sudo usermod -a -G dialout $USER && \
if [ `python --version 2>&1 | grep '2.7' | wc -l` = "1" ]; then \
sudo zypper install git python-pip python-pyserial; \
else \
sudo zypper install git python3-pip python3-pyserial; \
fi && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py
  • 重启Arduino IDE。

macOS

  • arduino.cc安装最新的Arduino IDE。
  • 打开终端并执行以下命令(复制 -> 粘贴并按回车):
mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py

其中~/Documents/Arduino代表您的草图本位置,如"Arduino" > "首选项" > "草图本位置"(在IDE启动后)中所示。相应地调整上述命令。

~/Documents/Arduino
  • 如果您收到以下错误,请通过xcode-select --install安装命令行开发工具,然后再次尝试上述命令:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • 运行命令:
xcode-select --install
  • 如果在运行python get.py时收到错误:IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590),请尝试使用python3代替python
  • 如果在运行python get.py时收到以下错误:urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED,请转到Macintosh HD > Applications > Python3.6文件夹(或任何其他python版本),并运行以下脚本:Install Certificates.command和Update Shell Profile.command
  • 重启Arduino IDE。