% ssh ubuntu@192.168.0.12
WARNING: Your password has expired.
You must change your password now and login again!
Connection to 192.168.0.12 closed.
% ssh ubuntu@192.168.0.12
ubuntu@ubuntu:~$ pwd
/home/ubuntu
$ sudo apt update
$ sudo apt install libudev-dev
$ sudo apt install make
$ sudo apt install build-essential
$ git clone https://github.com/ataradov/edbg.git
$ ls
edbg
$ cd edbg/
$ ls
Makefile
$ make all
$ ./edbg -h
CMSIS-DAP SWD programmer. Built Dec 11 2021 16:05:43.
Usage: ./edbg [options]
Options:
-h, --help print this help message and exit
-b, --verbose print verbose messages
-e, --erase perform a chip erase before programming
-p, --program program the chip
-v, --verify verify memory
-k, --lock lock the chip (set security bit)
-u, --unlock unlock the chip (forces chip erase in most cases)
-r, --read read the whole content of the chip flash
-f, --file <file> binary file to be programmed or verified; also read output file name
-t, --target <name> specify a target type (use '-t list' for a list of supported target types)
-l, --list list all available debuggers
-s, --serial <number> use a debugger with a specified serial number or index in the list
-c, --clock <freq> interface clock frequency in kHz (default 16000)
-o, --offset <offset> offset for the operation
-z, --size <size> size for the operation
-F, --fuse <options> operations on the fuses (use '-F help' for details)
$ cd ~
$ git clone https://github.com/mattairtech/ArduinoCore-samd.git
$ ls
ArduinoCore-samd edbg
$ cd ArduinoCore-samd/bootloaders/zero/binaries
$ ls | grep D11C14A
sam_ba_Generic_D11C14A_SAMD11C14A.bin
sam_ba_sdcard_Generic_D11C14A_SAMD11C14A.bin
$ cp sam_ba_Generic_D11C14A_SAMD11C14A.bin ~/edbg/
$ cd ~/edbg
$ ls
edbg
sam_ba_Generic_D11C14A_SAMD11C14A.bin
$ sudo ./edbg -h
CMSIS-DAP SWD programmer. Built Dec 11 2021 16:05:43.
Usage: ./edbg [options]
Options:
-h, --help print this help message and exit
-b, --verbose print verbose messages
-e, --erase perform a chip erase before programming
-p, --program program the chip
-v, --verify verify memory
-k, --lock lock the chip (set security bit)
-u, --unlock unlock the chip (forces chip erase in most cases)
-r, --read read the whole content of the chip flash
-f, --file <file> binary file to be programmed or verified; also read output file name
-t, --target <name> specify a target type (use '-t list' for a list of supported target types)
-l, --list list all available debuggers
-s, --serial <number> use a debugger with a specified serial number or index in the list
-c, --clock <freq> interface clock frequency in kHz (default 16000)
-o, --offset <offset> offset for the operation
-z, --size <size> size for the operation
-F, --fuse <options> operations on the fuses (use '-F help' for details)
$ sudo ./edbg -l
Attached debuggers:
0: 1DFBFE6050575230372E3120FF160724 - Seeed CMSIS-DAP
$ sudo ./edbg -b -t samd11 -epv -f sam_ba_Generic_D11C14A_SAMD11C14A.bin -s 0
Debugger: Seeed Seeed CMSIS-DAP 1 2.0.0 (SJ)
Clock frequency: 16.0 MHz
Target: SAM D11C14A (Rev B)
Erasing... done.
Programming.... done.
Verification.... done.
$ lsusb
Bus 001 Device 037: ID 2886:802f Seeed Technology Co., Ltd. CMSIS-DAP
Bus 001 Device 041: ID 16d0:0557 MCS Generic SAMD11C14A