Skip to content

Bali Fab Fest WS

Schedule

  • Oct 15 (Sat) 14:00-18:00 @Fab Lab CL1-FL
  • Oct 16 (Sun) 09:00-12:30 @Bedawang Nala 4
  • Oct 17 (Mon) 14:00-18:00 @Fab Lab CL2-FL
  • Oct 18 (Tue) 14:00-18:00 @Fab Lab CL2-FL

What is Seeeduino Xiao (Seeed Studio XIAO SAMD21)

Ref. Notice on Product Name Change

Specification Xiao SAMD21
CPU: ARM Cortex-M0+ (SAMD21G18)

Software compatibility: Arduino IDE

Interface: USB Type-C

Size: 21x17.5 mm

Cost: $5.40

more info on official site

What to do in this WS?


PC Xiao SAMD21

ArduinoIDE


Win/Mac/Linux?
Upload DAPLink firmware
Bootloader

PC Xiao SAMD21 SAMD11C board

ArduinoIDE


Win/Mac/Linux?
Upload DAPLink firmware
DAPLink

Burn
Bootloader

D11C.serial

Why?

  • Burning bootloader from commercial board is required only once
  • Easy for beginner using only Arduino IDE
  • A programmer costs $15+, but Xiao only $5
  • No need to set up OpenOCD/edbg environment in PC
  • edbg on macOS works(?)

How?

Install ArduinoIDE

Upload firmware


Ref. Seeed Studio XIAO SAMD 21 DAPLink

  1. Download the simple_daplink_xiao.uf2 files. Or download here
  2. Connect Xiao into PC
  3. Entering the bootloader mode by short double click like this
  4. An external drive “Arduino” will appear.
  5. Drag and drop the .uf2 file to “Arduino” drive
  6. Done! (Two Blue LEDs ON)

Ref. How to use Arduino Boards as DAPLink Device
Ref. Getting Started with Seeed Studio XIAO SAMD21

  1. In Seeed_Arduino_DAPLink repositories, Code -> Download ZIP Or download from here

  2. Open ArduinoIDE and Sketch -> Include Library -> Add .ZIP Library… and select the .zip file.

  3. In Adafruit_TinyUSB_Arduino repositories, Code -> Download ZIP Or download from here
  4. Open ArduinoIDE and Sketch -> Include Library -> Add .ZIP Library… and select the .zip file.
  5. Open simple_daplink from File -> Examples -> Seeed_Arduino_DAPLink -> simple_daplink
  6. Add Additional boards manager URLs https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
  7. Install ArduinoSAMD board library for Seeed
    Tools-> Board -> Board Managers Search samd seeeed and install
  8. Connect Xiao into PC and Set Board: Seeeduino XIAO, Port:…(Seeedion XIAO)
  9. Set USB Stack: TinyUSB
  10. Verify and Upload

Attention

If you have error Compilation error: cannot declare variable 'usb_hid' to be of abstract type 'Adafruit_USBD_HID',
roll back the Adafruit TinyUSB Library by Adafruit to v0.10.5
Sketch -> Include Library -> Manage Libraries…
- Install 0.10.5
- Uninstall 1.14.1

11. Done!! (Two Blue LEDs ON)

Step2 : Burn Bootloader to SAMD11C board

Connection

Xiao SAMD21
(Programmer)
USB-D11C-serial
(Target board)
GND
A10
A9
A8
GND
CLK
DIO
RST

DAP_config.h

Wiring



Target board power supply from PC


Target board power supply from Xiao’s 5V pin


Target board power supply from PC


Target board power supply from Xiao’s 5V pin

Install mattairtech / fab-sam board

Note

fab-sam is a Fab community fork of the original MattairTech SAM D|L|C Core.
Using this core is recommended in Fab Academy.

https://raw.githubusercontent.com/qbolsee/ArduinoCore-fab-sam/master/json/package_Fab_SAM_index.json

Choose Programmer:”CMSIS-DAP”

  1. Menu Arduino IDE -> Preferences

  2. Add Additional boards manager URLs
    https://www.mattairtech.com/software/arduino/package_MattairTech_index.json

  3. Install mattairtech SAM D|L|C core for Arduino
    Tools-> Board -> Board Managers

    Search SAM mattair and install

  4. Board: Generic D11C14A
  5. Port: ....(Seeeduino XIAO)
  6. Serial Config: TWO_UART…
  7. Programmer: Atmel EDBG
  8. Burn bootloader
  9. Done! Generic D11C14A target board is recognized in Port

Note

Please make sure you have installed the latest ArduinoIDE 2.0.0 for this to work!

Extra

Xiao_SMD_board


Download Eagle sch brd

Note

The pinheader that I used in this WS is Conthrough, Part Number: XB-3-4. Maker site

Embedded Computing : The $5 programmer-debugger

Special Thanks to Seeed for sponsoring the Xiao boards


WIP: upload free_dap firmware to SWD D11C by uf2 file

Ref. Programmers Summary

Download

class site: free_dap_d11c_mini.bin

Converter

Ref. .bin_.uf2_converter_site(JP)

Converter site: UF2

Download free_dap_d11c_mini.uf2 from thin repo

Note

UF2 (USB Flashing Format) is a name of a file format, developed by Microsoft, that is particularly suitable for flashing devices over MSC devices.
Ref. Seeed-Studio/uf2-samdx1

Attention

To use uf2 file, UF2 Bootloader is requiered in the board before hand.

uf2conv – Packing and unpacking UF2 files

uf2conv – Packing and unpacking UF2 files


Last update: February 7, 2024