Possible Reset Boot Loader Problem?

I’m stuck with this same problem; any more info on how to flash a new bootloader? I’m not quite understanding how to pull that off.

1 Like

The J-Link EDU mini can be had for < $20 for non-commercial use, and can be used to re-flash the boot-loader if necessary; you’ll need to either solder wires to the SWD pads on back of the XAIO, or construct some sort of a jig; but I’d try rebooting your host computer first, as it appears sometimes the host’s USB Driver Deamon gets confused, and won’t properly recognize the XIAO’s serial port from time to time (at least on my Mac).

I’ve seen a few places mention using a Raspberry Pi as a SWD programmer, might give that a shot. Once that’s setup how do you actually flash the firmware?

I already tried multiple computers, pretty sure it’s the XIAO. The reset pins don’t do anything on either machine.

I already managed to fry my first XIAO, hoping the second one isn’t also.

Sorry I don’t know about use of the Raspberry Pi as an SWD programmer, but Segger offers free basic SW for use with their J-Link product, capable of re-flashing the XIAO boot-loader. Maybe some one else can answer your question.

Oh no that’s actually helpful thank you. I was thinking there was going to be some standard
SWD commands or something I’d need to learn. Looks like this OpenOCD library for Raspberry Pi can do it. I’ll just need to learn how OpenOCD does the flashing process.

Hi, Is the bootloader code publicly available?

Also, can i upload a different bootloader? like optiboot?

our bootloader is open source. Just checked out optiboot, and it seems only support AVR chips?

hey, thanks to you i came across openocd and was able to repair my xiao bootloader - here is how

1 Like

Hi, I was able to repair the bootloader using the cheap Chinese ST-LINK V2 and OpenOCD for Windows.

@msfujino Yes, Of course.

I’m trying to repair my 3 XIAO’s. Something about the way I use them and my Wio lite MG126 has causede me to be unable to program any of them. I’ve been through

  • resetting the devices
  • re-connecting the devices
  • rebooting my PC
  • resetting the products twice quickly
  • uninstalling the devices from device manager
  • deleting the usb controller
  • removing the registry entries associated with VID/PID

and I still can’t upload to them.

Now I’m trying Black Magic Probe (Jeff Probe BMP Clone). I’ve soldered connections to Reset, SWCLK and SWDIO and have connected to them to the appropriate pins on the included JTAG ribbon cable. I performed a continuity check on them and am positive the pins are correct. I’m definitely connecting power to the BMP as well as powering the XIAO/Wio using external pwoer. I also connected the UART interface to the appropriate TX/RX pins using a grove connector.

The problem is that I’m stupid and don’t know

  • WHERE to find the “bootloader” source file that needs to get uploaded
  • HOW to send it.
  • I actually don’t even know WHAT the “bootloader” does.
  • I thought that resetting twice quickly puts the device into bootloader mode but I actually have no idea what that is or why it would be used.

There are so many programming devices, protocols, toolchains, firmware, flags, and enough documentation to have sent me down rabbit holes for over a month now.

I don’t care what method I use but I need to find A method of programming the bootloader(?)
In Arduino IDE I don’t know what to do to program the target.

I followed the VSCode/PlatformIO instructions and it does communicate through CLI so I see the target system and upload port but it hangs when it’s sending firmware.bin.

Programming using SWD in Atmel studio with a Blackmagic Probe is a total mystery.

Things like baud rates, GDB commands, bootloader file location, would be good to see as a how to.

I understand that this probably isn’t a Seeedstudio manufacturing issue but I was hoping to leverage any debugger/uploading experience anyone has.

I’ve asked for some direction on many different forums. It just so happens that the problems people are having on this forum are exactly like mine.

1 Like

Would you be so kind as to show how you did it? I have two of these bricked (one by trying the Raspberrypi method). Would like to know how to do it with the stlink. I have stlink v2 and stlink v3.

Thanks

Hi, tannenba
Please refer to my post below.

Thank you, I did and unbricked the good one…other is dead :frowning: This is much easier than trying with the Pi.

1 Like

How to use the jlink edu to flash it. I’ve tried and got nowhere. Which jlink flasher to use?
Thank you

Hi @tannenba ,

Please follow the link below and go into Debugging section to learn how to use Segger J-Link EDU with the Seeeduino XIAO.

Please check this forum topic as well if you find any further problems.

Regards,
Lakshantha

Thanks, will try when I get time.

1 Like

Hello, I have 3 damaged XIAO as well. I am able to upload the bootloader thru SEGGER and a CMSIS-DAP probe but the XIAO does not go into bootloading mode. The Orange LED is flashing fast. I see that the memory gets some code up to 0x2000 which is the proper bootloader size. Any pointer to what the fast flashing orange means ? Thks.

Out of curiosity, can you check what I tried? I think I ran into the same problem and found a janky but non debugger requiring solution

Dear all, I had the same problem with a dead XIAO and found a very simple fix:

for simplicity, I copy the procedure out of the above link:

  1. Press and release the reset button on your board quickly twice. You should now see the LED on the board pulsing, which means the bootloader is running. The double press causes the bootloader to run indefinitely (until the board is reset, powered off, or an upload is done), which means you don’t need to get the timing of the reset just right.
  2. Select the port of your board from the Tools > Port menu. The port number may be different when the bootloader is running so don’t assume you already have the correct port selected.
  3. Start an upload in the Arduino IDE.

The trick is to reset TWICE. As my board does not have a reset button, I simply connected the reset contacts twice (just like a double click with a mouse). Magically, Windows recognized the board immediately.

Good luck, Ludwig