update: 添加代码

This commit is contained in:
DuRuofu
2025-02-16 09:22:48 +08:00
parent 621725c132
commit a209d1b057
46 changed files with 2375 additions and 20 deletions

View File

@@ -1,4 +1,8 @@
# 常见问题与解决
## 索引
[[toc]]
## 1. 头文件无法跳转,没有代码提示
**问题**
@@ -43,7 +47,7 @@
![](attachments/20240129232230.png)
## 2.开发板在Windows下可以显示端口但在Linux下找不到
## 2. 开发板在Windows下可以显示端口但在Linux下找不到
**问题**
@@ -56,7 +60,7 @@
安装对应型号的串口驱动程序,上网搜索安装教程一般都能找到。
## 3.Linux下烧录代码报错没有串口权限
## 3. Linux下烧录代码报错没有串口权限
**问题**
@@ -78,4 +82,53 @@ sudo chmod a+rw /dev/ttyUSB0
但是注意`sudo chmod a+rw /dev/ttyUSB0` 的权限更改是暂时的,只会在当前设备被使用的会话期间生效。一旦系统重启或者设备断开并重新连接,设备节点(例如 /dev/ttyUSB0可能会重新被创建且权限会被重置为默认状态。
可以使用下面的命令,永久为用户添加串口权限:`sudo usermod -aG dialout username`,设置后重启方能生效。
可以使用下面的命令,永久为用户添加串口权限:`sudo usermod -aG dialout username`,设置后重启方能生效。
## 4. 开发板烧录代码时出现MD5校验错误
![](attachments/Pasted%20image%2020250210094506.png)
解决办法如下:
![](attachments/Pasted%20image%2020250210094818.png)
需要在IDF环境下使用命令]
```bash
esptool.py --port PORT write_flash_status --non-volatile 0
```
其中的PORT需要修改为实际连接的开发板端口。
## 5. 烧录报错:无法验证闪存芯片连接(未收到串行数据。)
报错信息如下:
```bash
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 15.32MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: fc:e8:c0:7c:b4:24
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
A fatal error occurred: Unable to verify flash chip connection (No serial data received.).
CMake Error at run_serial_tool.cmake:66 (message):
/home/duruofu/.espressif/python_env/idf5.3_py3.10_env/bin/python;;/home/duruofu/esp32/esp-idf-v5.3/components/esptool_py/esptool/esptool.py;--chip;esp32
failed.
FAILED: CMakeFiles/flash /home/duruofu/project/Mock-IoT-Device-ESP32/build/CMakeFiles/flash
```
解决办法:
重新烧录引导程序长按BOOT键然后按复位键再次烧录代码即可成功烧录。