How to unbrick a dead Xiao SAMD21-Seeeduino XIAO (only green led is on) using Raspberry Pi Pico

Wrong connection etc. If your device becomes invisible on your computer and you see a green LED on your device, it means that your device is bricked.

You need a programmer to recover your device from this situation. however, if you have another xiao or a pi pico, you can use these devices as a programmer.

Check this thread to use another xiao as a daplink device.
How to unbrick a dead XIAO using a XIAO(DAPLink) and OpenOCD

Thx to msfujino for great work.

If you have a pi pico and want to use it as a daplink device follow the steps below.

  1. Make sure you have Arduino IDE and Pico Setup installed on your computer.

  2. Download the file in the link below and extract it to C:/
    XIAO_BootloaderRescueTool_DAPLink

*Everything you need is in this zip

  1. Connect Pico to your computer by pressing the bootsel button.Transfer the UF2 file named freedap_DAPlink_rp2040 in the extracted folder to Pico.
    Now you can use Pico as a daplink device.

  2. Connect Xiao’s VCC pin to Pico’s VBUS pin, GND pin to Pico’s GND pin, SWCLK pin to Pico’s GP11 pin, SWDIO pin to Pico’s GP12 pin.
    Connect the Pico to your computer.
    To see the location of Xiao’s SWCLK and SWDIO pins >> pinouts.png

  3. If the green LEDs of both devices are on, run the flash.bat file. Script will run and and the bootloader will be written.

*If the command prompt does not detect your username correctly open the flash.bat file in the extracted folder to edit it. Replace “%USERNAME%”’ with your username and save it.

—Everything is OK when you see the screen here >> reco_ok.jpeg

** If your computer doesn’t see both devices when the process is finished, restart your computer and connect Xiao.

** If the same problem persists, delete COM Ports from device manager and reconnect devices.

Have a good day…

1 Like

To unbrick a dead Xiao SAMD21-Seeeduino XIAO using a Raspberry Pi Pico, you can follow these steps:

  1. Prepare the Raspberry Pi Pico: a. Ensure that you have a working Raspberry Pi Pico board and the necessary micro USB cable. b. Connect the Raspberry Pi Pico to your computer using the micro USB cable.
  2. Install the necessary software: a. Download and install the Thonny Python IDE on your computer. b. Open Thonny and ensure that it recognizes the connected Raspberry Pi Pico.
  3. Prepare the Xiao SAMD21-Seeeduino XIAO: a. Remove any connections to the Xiao board and ensure it is not connected to power. b. Locate the SWD pins on the Xiao board. These are usually labeled SWDIO and SWCLK. c. Connect the SWDIO pin of the Xiao board to the GP14 pin on the Raspberry Pi Pico. d. Connect the SWCLK pin of the Xiao board to the GP15 pin on the Raspberry Pi Pico. e. Connect the GND pin of the Xiao board to any GND pin on the Raspberry Pi Pico.
  4. Flash the Xiao SAMD21 firmware: a. Open Thonny Python IDE and select the Raspberry Pi Pico as the target device. b. Write and execute a Python script on the Raspberry Pi Pico to flash the Xiao firmware onto the SAMD21 chip.

hah nice work, you can follow this way… @KaydenDamian

Okay guys, this is a very valuable post, but there are a couple of nuances, for example, I am an ordinary ordinary user, and I do not have such a path in my directory, C:\Users%USERNAME%\AppData\Local\Arduino15\packages\arduino\tools*openocd\0.10.0-arduino7\bin\openocd*
I downloaded the distribution separately from here Download OpenOCD for Windows and created the appropriate folder, however, I get the following error:


Post #2 how to make a recovery using thonny is not clear at all, apparently you still need to be a programmer :frowning:

The easiest way to do this is to follow the link below.
Show the part of the screen that is off the screen on the right side of the screenshot.

How to unbrick a dead XIAO using a XIAO(DAPLink) and OpenOCD

If you have a pi pico, you can successfully recover your xiao by following the steps in this guide. You can access other guides from the link. You don’t need to be a software developer to do these operations. Please make sure you follow the order of operations correctly.

1 Like

everywhere all write that “OpenOCD that comes with Arduino IDE” BUT I reinstalled arduino ide 3 times and there is no OpenOCD library, so I installed OpenOCD using MSYS2 and then changed the path in flash.bat to the following: "C:\msys64\mingw64\bin\openocd -f flash.cfg -s C:\msys64\mingw64\share\openocd\scripts "
now, when I try to flash, I have this error:

that post doesn’t really suit me, I don’t have a second xiao, only a pi pico

Are you using Windows or Linux?
If Windows, it should be here.
C:\Users\xxxxxx\AppData\Local\Arduino15\packages\arduino\tools\openocd\

Unfortunately, my environment was completely different.
openocd

Please uninstall ide, delete all files belonging to ide and process, set the system language to English, and then install ide again. Try again, making sure you follow all the steps in order. Open the flash.bat file with a text editor and make sure the file paths match yours.


okay, guys, I found it, I needed to install os rp2040boards from the “board manager”
If someone like me comes across this topic, I hope he will succeed