Seeeduino Xiao dead/unable to upload sketches after code upload (SOLVED)

Here’s what happened

  1. I upload sketch
  2. Board no longer appears via usb (no com port when plugged in)
  3. I try to get to bootloader mode and the Xiao pops up as a storage device
  4. I upload bootloader file from the Xiao github half following this video
  5. File disappears and new files (CURRENT.UF2, INDEX.HTM and INFO_UF2.TXT appear as in video
  6. Does not work and stays in bootloader mode.

Im confused and have now wasted hours on this fruitless venture.


Here’s how I solved it:

  1. Go into bootloader mode as is listed on the official wiki

  2. Install Circuit Python by dragging the UF2 file onto your Xiao (I found that windows would lock up when trying to do this so you might have to use linux as I did (I used Ubuntu 18.04 on the Jetson Nano))

  3. Upload an arduino sketch to revert from circuit python

Basically, thank you Adafruit for having decent software with an easy ability to revert that fixed previously faulty software (I assume)


More detail for anyone who had the same hell figuring this out. So I can’t avoid blaming the board for allowing code to brick it in such a manner, but here’s the error in my code that led to it being bricked.

I think I was calling Serial.print before Serial was available. Somehow this did not play nicely and caused the board to stay stuck, unable to connect with Serial for sketch uploads even in bootloader mode.

Ther fix as described was to install cyrcuit python then follow their uninstall instructions of simply uploading a sketch. There might be another way but this is what worked for me. Yes I tried all the files from the Xiao bootloader wiki section. None worked (even after I realized that the UF2 file was the only relevant one). Only circuit python worked.

I imagine this is due to a bug somewhere in the code for this board but this is the depth at which I can give you information.

2 Likes

I found this, and while it did help me unbrick my Xiaos, I have to update it because it isn’t so complicated.
The Adafruit software has nothing to do with the fix, and is totally irrelevant.

  1. Put the device into bootloader mode (quick double-short the RST pins).
  2. The device should appear as storage
  3. Just delete the U2F file you see there.
  4. Flash anything onto it. If you’re wise, you’ll flash something guaranteed to work, like Blink.

I have bricked and unbricked 4 Xiaos now, 5 seconds of work each time. Whether it should brick when I put in a wrong pin number is another question…

1 Like

Having the same issue, but this fix doesn’t do anything for me.

Upload sketch which worked on another Xiao, but presumably has a bug in it;
Sketch -among other things- controls an external LED, which it turns on and is then supposed to blink periodically. In stead the LED simply turns on and stays on, indicating the sketch started but got stuck.
Double tap reset pin, get a file system with CURRENT.UF2;
Try to delete it, replace it by circuitpython sketch, anything at all;
Reset by unplugging USB → file system resets to the way it was before
Reset by tapping reset pin → Xiao goes back to the broken sketch and gets stuck again

Alltroughout I cannot flash anything, even Blink or BareMinimum because of this error:
“Failed to upgrade target. Error is: Serial port could not be opened on COM28”

Same problem : did you find what’s wrong ?

Hi there,
Yes, It was a problem between the keyboard and the FLOOR!
You certainly are not following any current guide with that info.
You don’t delete the UF2 files for any reason that’s just nonsense. You do Drag and drop new one’s to it though , further he doesn’t appear to understand the difference in the modes and how to tell, or switch , or what the port outcomes will be. Just throwing everything you know or DON’T at it isn’t going to fix anything. the seduino Xiao is one of the weakest MCU imo. Xiao Nrf52840 is the best one IMO. There are so many ways to fix a bad bootloader documented it’s funny.

Just make a uf2 or a demo, like blinking the LED and use that anytime your experimental code crashes the PAD… button to BL mode and drag and drop it on there. That’s it. It will reset itself and start blinking.
Check out the DRAG and DROP files thread (search is your friend) READ the whole thread and you’ll be a wizard :mage: in NO time. :+1:

HTH
GL :slight_smile: PJ

if you still are having issues, post up the code we can get you squared away. :v: