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.
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.
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
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.
To unbrick a dead Xiao SAMD21-Seeeduino XIAO using a Raspberry Pi Pico, you can follow these steps:
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.
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.
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.
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.
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:
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.
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:
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