Skip to content

Commit 23d3e1d

Browse files
LynnL4claude
andcommitted
feat(data): flashing/upload troubleshooting coverage
- new linux-port-permission entry (dialout group + reboot, fuser -k, ModemManager) - 'Permission denied'/'串口被占用' routed to it - new flash-success-but-no-run entry (RESET after upload, USB CDC On Boot, wrong-board check, brownout, Blink sanity check) - knowledge: manual rescue flashing (esptool erase_flash/write_flash, bossac for SAMD) for boards the IDE refuses - Chinese symptom vocabulary on all flashing entries; routing verified 10/10 for the real-world battery (一直Connecting / 烧录失败 / 找不到 串口 / 烧录成功但没反应 / 怎么进入烧录模式 ...) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a62bf89 commit 23d3e1d

2 files changed

Lines changed: 122 additions & 0 deletions

File tree

packages/xiao-assistant/data/docs/troubleshooting.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
- connecting timeout
77
- no serial port
88
- cannot flash
9+
- 怎么进入烧录模式
10+
- 进入下载模式
11+
- 无法进入bootloader
12+
- 按键烧录
13+
- 烧录模式
14+
- boot模式
15+
- download mode
16+
- enter bootloader
917
boards:
1018
- esp32c3
1119
- esp32s3
@@ -40,6 +48,10 @@
4048
- device descriptor failed
4149
- unknown device
4250
- driver error
51+
- 找不到串口
52+
- 没有串口
53+
- 识别不到设备
54+
- 未知设备
4355
boards:
4456
- esp32c3
4557
- esp32s3
@@ -67,6 +79,11 @@
6779
- espcomm_open
6880
- failed to connect
6981
- sync failed
82+
- 烧录失败
83+
- 刷机失败
84+
- 上传超时
85+
- 连接开发板失败
86+
- 一直显示Connecting
7087
boards:
7188
- esp32c3
7289
- esp32s3
@@ -116,6 +133,9 @@
116133
- blank serial monitor
117134
- serial not working
118135
- no data in monitor
136+
- 串口监视器没有输出
137+
- 串口没有数据
138+
- 监视器空白
119139
boards:
120140
- esp32c3
121141
- esp32s3
@@ -282,3 +302,66 @@
282302
- 'Increase connection interval: BLE.setConnectionInterval(0x06, 0x12)'
283303
- Avoid WiFi and BLE simultaneous use on ESP32 (shared radio)
284304
wikiUrl: https://wiki.seeedstudio.com/XIAO_BLE/
305+
- id: linux-port-permission
306+
title: Serial port permission denied or busy (Linux)
307+
symptoms:
308+
- permission denied
309+
- access denied
310+
- could not open port
311+
- device or resource busy
312+
- port busy
313+
- 无法打开串口
314+
- 串口被占用
315+
- 没有权限
316+
- permission denied opening serial port
317+
boards: &id001
318+
- rp2040
319+
- rp2350
320+
- ra4m1
321+
- samd21
322+
- esp32c6
323+
- esp32c3
324+
- mg24
325+
- mg24-sense
326+
- nrf52840
327+
- nrf52840-sense
328+
- nrf54l15
329+
- nrf54l15-sense
330+
- esp32c5
331+
- nrf54lm20a
332+
- nrf54lm20a-sense
333+
- esp32s3
334+
- esp32s3-sense
335+
category: usb
336+
diagnosis:
337+
- 'Run: ls -l /dev/ttyACM* - the group is usually dialout; your user is probably not in it'
338+
- 'If the port exists but upload says busy: another program (serial monitor, previous upload, ModemManager) holds it'
339+
- 'Confirm with: groups - dialout must be listed'
340+
solutions:
341+
- 'Add yourself to the dialout group and REBOOT (logging out is often not enough): sudo usermod -aG dialout $USER && sudo reboot'
342+
- 'Free a busy port: sudo fuser -k /dev/ttyACM0 (or close the other serial monitor)'
343+
- 'Disable ModemManager if it grabs the port on plug-in: sudo systemctl stop ModemManager'
344+
wikiUrl: https://wiki.seeedstudio.com/SeeedStudio_XIAO_Series_Introduction/
345+
- id: flash-success-but-no-run
346+
title: Upload succeeds but the board does nothing (dead after flash)
347+
symptoms:
348+
- upload success but nothing happens
349+
- board dead after flash
350+
- program not running
351+
- flash ok but no output
352+
- 烧录成功但没反应
353+
- 上传成功但程序不运行
354+
- 烧录后没反应
355+
boards: *id001
356+
category: upload
357+
diagnosis:
358+
- The flash almost certainly succeeded - the sketch is just not starting or its output is invisible
359+
- 'ESP32 series: after flashing, USB CDC On Boot must be Enabled (Tools menu) or Serial output never appears'
360+
- Wrong board selected in the IDE compiles+uploads fine for a different chip and appears dead
361+
- Insufficient USB power can brown-out the MCU right after boot
362+
solutions:
363+
- Press RESET once after upload (some boards halt in the bootloader until reset)
364+
- 'ESP32: Tools > USB CDC On Boot > Enabled, then re-upload'
365+
- Verify Tools > Board matches your exact XIAO model, and the COM port still belongs to the board
366+
- Try a different USB port/cable (prefer a rear motherboard port or powered hub); watch the power LED
367+
- 'Sanity check: upload the plain Blink example - if it runs, the issue is in your sketch (e.g. blocking while(!Serial))'

packages/xiao-assistant/data/knowledge/esp32-gotchas.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,42 @@
102102
code: "const int LED = 10; // external LED via 150ohm on D10\n\nvoid setup() {\n pinMode(LED, OUTPUT);\n}\n\nvoid loop() {\n digitalWrite(LED, HIGH);\n delay(500);\n digitalWrite(LED, LOW);\n delay(500);\n\
103103
}"
104104
workaround: 'On the wiki: "there is no LED_BUILTIN available for the XIAO ESP32C3, you can use an external LED instead."'
105+
- id: manual-flash-rescue
106+
title: Manual rescue flashing when the IDE cannot upload at all
107+
tags:
108+
- upload
109+
- flash
110+
- esptool
111+
- bossac
112+
- rescue
113+
- 烧录
114+
- 刷机
115+
- 救援
116+
boards:
117+
- esp32c3
118+
- esp32s3
119+
- esp32s3-sense
120+
- esp32c6
121+
- esp32c5
122+
- samd21
123+
- ra4m1
124+
category: upload
125+
severity: medium
126+
source: support-ticket
127+
summary: When the IDE repeatedly fails to connect, flashing manually with esptool (ESP32) or bossac (SAMD) rescues the board.
128+
problem: IDE upload loops on "Connecting..." and never succeeds; the board may have a half-erased firmware and looks bricked.
129+
solution: Force download mode (hold BOOT / for SAMD21 double-tap reset) and flash or erase manually.
130+
code: '# ESP32 series: full erase, then let the IDE retry
131+
132+
esptool.py --port /dev/ttyACM0 erase_flash
133+
134+
135+
# ESP32: flash a known-good binary manually at slow speed
136+
137+
esptool.py --port /dev/ttyACM0 --baud 115200 write_flash 0x0 firmware.bin
138+
139+
140+
# SAMD21 (bossac comes with the Seeeduino core)
141+
142+
bossac -d --port=/dev/ttyACM0 -U -i -e -w firmware.bin -R'
143+
workaround: If esptool still cannot open the port on Linux, check the dialout group and that no serial monitor holds it.

0 commit comments

Comments
 (0)