Xiao bricked and not responding anymore

Hi,

Somehow my Xiao is bricked. Power led is on, not recognized as Com or any other device. Reset pin doesn’t work to put it into external media device. The code on it doesn’t run anymore.

Is there a way to get it back alive?

1 Like

I have got an old JTAG device and some USBASP programmer. Can I burn the original bootloader found in \Seeeduino\hardware\samd\1.7.8\bootloaders\XIAOM0? What are the pinouts? What software to use? I’ve never done this before…

Running into the same problem as you. Sounds like it is possible to flash the bootloader looking here: Possible Reset Boot Loader Problem?

I’m crossing my fingers that I can use my Arduino Uno to reflash it, also haven’t done this before.

Sounds like there’s a bug with those reset pins on this device, I’ve found a ton of people running into this same issue.

2 Likes

I’m a bit stuck here.
The XIAO has MISO/MOSI pins. I have a USBAsp programmer lying arround, connecting the MISO/MOIS/SCK pins and +3.3v/GND.

Trying to connect to the XIAO via Khazama and reading the flash for test I get a
target doesn’t answer
AVR device initialize and ready accepting instructions
Device signature: 0x000000
Yikes! Invalid device signature
Expected signature for ATMEGA8 is 1E 93 07

Probably ATMEGA8 isn’t the right choice, but what do I select?

I also tried uploading via Programmer in Arduiono IDE without luck:
Board: Seeeduino XIAO
USB Stack: Arduino
Programmer: USPasp

Then “Upload via Programmer” I get

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xxx\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xxx\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xxx\Documents\Arduino\libraries -fqbn=Seeeduino:samd:seeed_XIAO_m0:usbstack=arduino,debug=on -ide-version=10812 -build-path C:\Users\XXX~1\AppData\Local\Temp\arduino_build_808433 -warnings=none -build-cache C:\Users\XXX~1\AppData\Local\Temp\arduino_cache_529529 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0 -prefs=runtime.tools.CMSIS-5.4.0.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.openocd.path=C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1 -prefs=runtime.tools.CMSIS-Atmel-1.2.1.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1 -prefs=runtime.tools.bossac.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.8.0-48-gb176eee.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.8.0-48-gb176eee -prefs=runtime.tools.arduinoOTA.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.7.0-arduino3 -verbose C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.8\bootloaders\XIAOM0\sketch_aug06a\sketch_aug06a.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xxx\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xxx\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xxx\Documents\Arduino\libraries -fqbn=Seeeduino:samd:seeed_XIAO_m0:usbstack=arduino,debug=on -ide-version=10812 -build-path C:\Users\XXX~1\AppData\Local\Temp\arduino_build_808433 -warnings=none -build-cache C:\Users\XXX~1\AppData\Local\Temp\arduino_cache_529529 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0 -prefs=runtime.tools.CMSIS-5.4.0.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS\5.4.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.arm-none-eabi-gcc-7-2017q4.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4 -prefs=runtime.tools.openocd.path=C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.openocd-0.10.0-arduino7.path=C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.10.0-arduino7 -prefs=runtime.tools.CMSIS-Atmel.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1 -prefs=runtime.tools.CMSIS-Atmel-1.2.1.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\CMSIS-Atmel\1.2.1 -prefs=runtime.tools.bossac.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.7.0-arduino3 -prefs=runtime.tools.bossac-1.8.0-48-gb176eee.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.8.0-48-gb176eee -prefs=runtime.tools.arduinoOTA.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.bossac-1.7.0-arduino3.path=C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\tools\bossac\1.7.0-arduino3 -verbose C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.8\bootloaders\XIAOM0\sketch_aug06a\sketch_aug06a.ino
Using board 'seeed_XIAO_m0' from platform in folder: C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.8
Using core 'arduino' from platform in folder: C:\Users\xxx\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.7.8
Detecting libraries used...
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"sketch_aug06a.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10812 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -g -DDEBUG=1 -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/Core/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/DSP/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS-Atmel\\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\variants\\XIAO_m0" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\sketch\\sketch_aug06a.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"sketch_aug06a.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10812 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -g -DDEBUG=1 -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/Core/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/DSP/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS-Atmel\\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\variants\\XIAO_m0" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\sketch\\sketch_aug06a.ino.cpp" -o "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"sketch_aug06a.ino\"\"\"" -DF_CPU=48000000L -DARDUINO=10812 -DARDUINO_SEEED_XIAO_M0 -DARDUINO_ARCH_SAMD -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -g -DDEBUG=1 -DARDUINO_SAMD_ZERO -D__SAMD21__ -D__SAMD21G18A__ -DARM_MATH_CM0PLUS -DSEEED_XIAO_M0 -DUSB_VID=0x2886 -DUSB_PID=0x802F -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed\"" "-DUSB_PRODUCT=\"Seeed XIAO M0\"" -g -DDEBUG=1 "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/Core/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/DSP/Include/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS-Atmel\\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\cores\\arduino" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\variants\\XIAO_m0" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\sketch\\sketch_aug06a.ino.cpp" -o "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\sketch\\sketch_aug06a.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: C:\Users\XXX~1\AppData\Local\Temp\arduino_build_808433\core\variant.cpp.o
Using precompiled core: C:\Users\XXX~1\AppData\Local\Temp\arduino_cache_529529\core\core_Seeeduino_samd_seeed_XIAO_m0_usbstack_arduino,debug_on_631709388176fffe9084d3d1037a5df2.a
Linking everything together...
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-g++" "-LC:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433" -Os -Wl,--gc-sections -save-temps "-TC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\variants\\XIAO_m0/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.map" --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -u _printf_float -u _scanf_float -Wl,--wrap,_write -u __wrap__write -o "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.elf" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\sketch\\sketch_aug06a.ino.cpp.o" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433\\core\\variant.cpp.o" -Wl,--start-group "-LC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\CMSIS\\5.4.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math "-LC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\hardware\\samd\\1.7.8\\variants\\XIAO_m0" -lm "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/..\\arduino_cache_529529\\core\\core_Seeeduino_samd_seeed_XIAO_m0_usbstack_arduino,debug_on_631709388176fffe9084d3d1037a5df2.a" -Wl,--end-group
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.elf" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.bin"
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.elf" "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.hex"
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\Seeeduino\\tools\\arm-none-eabi-gcc\\7-2017q4/bin/arm-none-eabi-size" -A "C:\\Users\\XXX~1\\AppData\\Local\\Temp\\arduino_build_808433/sketch_aug06a.ino.elf"
Sketch uses 42964 bytes (16%) of program storage space. Maximum is 262144 bytes.
java.lang.NullPointerException
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingProgrammer(SerialUploader.java:295)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:90)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2047)
	at java.lang.Thread.run(Thread.java:748)

I’m sorry, XIAO is arm Cortex-m0 architecture, you can’t use tools like USBasp.You can use the SWD interface, Jlink, CMSIS-DAP and other tools for debugging.

1 Like

Thanks, just ordered an J-Link programmer and waiting for arrival.

Just received my J-Link Programmer and downloaded SEGGER JFlash

But when trying Target->connect I get following error:

  • InitTarget() end
  • RESET (pin 15) high, but should be low. Please check target hardware.

Target->Programming gives following error:

Auto programming target (8192 bytes, 1 range) …

  • Connecting …
  • ERROR: Failed to connect.
    Could not establish a connection to target.
  • ERROR: Could not auto program target, not connected

I connected from JTAG
pin 7 -> XIAO SWDIO
pin 9 -> XIAO SWDCLK
pin 15 -> XIAO RESET
pin 4 -> XIAO GND

Plugged XIAO into USB for power

I checked continuity on reset of the XIAO board pins, they aren’t closed. Why does the JFLASH think, the reset pin is high?

XIAO has a dedicated SWD interface, which is not attached to a nearby pin.

hi, any update on this? Were you able to flash xiao using j-link?

I bricked my xiao as well, same behaviour as yours :frowning:

hi, i was able to unbrick a dead xiao… the steps are mentioned here:

1 Like

See how to use a Segger Edu with the Xiao at https://embeddedcomputing.weebly.com/seeeduino-xiao-m0.html

1 Like

where is the 3.3v connected to? The segger j-link only provides 5v.
https://www.segger.com/products/debug-probes/j-link/technology/interface-description/

I connected from JTAG
pin 7 -> XIAO SWDIO (underneath the board)
pin 9 -> XIAO SWDCLK (underneath the board)
pin 15 -> XIAO RESET (underneath the board)
pin 4 -> XIAO GND
pin 1 -> XIAO +5v

My XIAO looks different from the bottom. It has SWDIO, SWDCLCK, RESET, GND on the left and VIN, GND on the right.

Connect the 5V from the Segger J-Link to the 5V of the Xiao and the VTref of the Segger J-Link to the 3V3 of the Xiao.

VTref is very important to ensure correct voltage of the signals.

This is the target reference voltage.
It is used to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from Vdd of the target board and must not have a series resistor.

In the picture on my previous post: red=5V, orange=3V3, black=GND, etc.

I’m having problems with my XIAO and My Wio Lite. I don’t think they are bricked but I can’t get a clear direction from anyone. There’s also a high barrier to entry and lack of beginner documentation as far as how to even use a programmer. I don’t know where people learn this shit.

Hi @Criticalpoint
Here are the beginner documents for Wio Lite W600, Wio Lite MG126 and Seeeduino XIAO.

Thank you for all your responses. I really like the your products and more importantly the support Seeed provides.

I understand that you have no way of knowing what level of experience any random forum user may have. Some people overestimate their own experience but I try to be realistic. There’s more that I don’t know than I do know.

Having said that I am familiar with the product pages and wiki’s.

The problem people are having is that across different platforms (at least windows/macos) the USB host controller seems to get confused as to what mode the device is in whereas uploading is concerned.

Whatever the real issue is the solution I seem to keep running into is using a programmer to upload.

I’m muddling my way through setting up the Jeff Probe (Blackmagic Probe Clone) using PlatformIO on windows 10. I was able to make a connection to the Wio MG126 last night but the CLI still hangs when uploading the program.

What I am hoping someone could help me out with is understanding what the “bootloader” and “firmware” are. Are they the same? Is it easier on these SAM chips for one to get corrupted? How is using SWD to upload the project/bootloader/firmware (again I don’t know the difference) better than using native USB? Is there any way to avoid issues with uploading.

Hi @Criticalpoint
BootLoader is a small program that runs before the operating system runs. Through this small program, you can initialize the hardware device, thereby bringing the system’s software and hardware environment to a proper state, so as to prepare for the final call to the operating system.
Firmware is generally stored in the electrically erasable read-only memory EEPROM or FLASH chip in the device and is generally a program that can be upgraded by the user through a specific refresh program. A bit similar to PC bios. For independently operable electronic products, firmware generally refers to its operating system.
Sometimes, there are maybe wrong when you upload code which will cause the bootloader to corrupted.
Because XIAO uses ARM® Cortex®-M0+ CPU, there are only two ways to debug the Interface of the ARM cortex, SW-DP or JTAG-DP.
I am not clear how to avoid issues with uploading.

Had similar situation. It was caused by a pointer overrun [ran off the edge of an array!]. That bricked it, I guess because it messed up the USB internals such that the XIAO couldn’t connect/communicate with my desktop PC [running Arduino IDE].

So, what I did was [and I tried this over and over around 5 times], I disconnected the the USB cable, then I did a Ctrl-U to get the compiler going, then I hurriedly reconnected USB to the XIAO. I tried changing the timing slightly each time, until finally I got it to upload!

My working theory was, based on the USB connect/disconnect musical tones that Windows issues to indicate USB connection status, It sounded like, after connecting the USB cable, a connection was happening, then moments later, it disconnected – probably because of the code crash. When I managed to get the timing such that the upload started BEFORE the code crash, it could happen, because having a good connection, the Arduino IDE was able to issue a reset, preventing the crash incident, so the upload could start!!

Don’t know if that’s true, or not, but by golly it worked!! Which is good, in my case, because the XIAO is sealed inside a selenite tower!!! Whew!!!

UPDATE: This also works [for me at least]: Ctrl-U, unplug USB and wait for Dee-Doo-Dum, plug back in!
Also, it helps to place a long delay – like 5 seconds – in the Setup() function.

Like:
void Setup()
{
#if MODE_DEVELOPMENT
delay(5000);
#endif
}

[“indent preformatted text by 4 spaces” … NOT!]