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?¶
Step1 : Upload DAPLink firmware to Xiao¶
Install ArduinoIDE¶
Upload firmware¶
Ref. Seeed Studio XIAO SAMD 21 DAPLink
- Download the simple_daplink_xiao.uf2 files. Or download here
- Connect Xiao into PC
- Entering the bootloader mode by short double click like this
- An external drive “Arduino” will appear.
- Drag and drop the .uf2 file to “Arduino” drive
- Done! (Two Blue LEDs ON)
Ref. How to use Arduino Boards as DAPLink Device
Ref. Getting Started with Seeed Studio XIAO SAMD21
-
In Seeed_Arduino_DAPLink repositories, Code -> Download ZIP Or download from here
-
Open ArduinoIDE and Sketch -> Include Library -> Add .ZIP Library… and select the .zip file.
- In Adafruit_TinyUSB_Arduino repositories, Code -> Download ZIP Or download from here
- Open ArduinoIDE and Sketch -> Include Library -> Add .ZIP Library… and select the .zip file.
- Open simple_daplink from File -> Examples -> Seeed_Arduino_DAPLink -> simple_daplink
- Add Additional boards manager URLs
https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
- Install ArduinoSAMD board library for Seeed
Tools-> Board -> Board Managers Search samd seeeed and install - Connect Xiao into PC and Set Board: Seeeduino XIAO, Port:…(Seeedion XIAO)
- Set USB Stack: TinyUSB
- 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”
-
Menu Arduino IDE -> Preferences
-
Add Additional boards manager URLs
https://www.mattairtech.com/software/arduino/package_MattairTech_index.json
-
Install mattairtech SAM D|L|C core for Arduino
Tools-> Board -> Board Managers
SearchSAM mattair
and install
- Board: Generic D11C14A
- Port: ....(Seeeduino XIAO)
- Serial Config: TWO_UART…
- Programmer: Atmel EDBG
- Burn bootloader
- 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¶
Note
The pinheader that I used in this WS is Conthrough, Part Number: XB-3-4. Maker site
Useful Link¶
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