X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=ao-tools%2Fao-flash%2Fao-flash-samd21;fp=ao-tools%2Fao-flash%2Fao-flash-samd21;h=1b3dc87bce342491eb0e3cfea66640bad4572f2a;hb=be0a7f000250704bcdbad82aa4ef4d9966fc6307;hp=0000000000000000000000000000000000000000;hpb=c869985188ce9d28c332e449b36c4c88077cd587;p=fw%2Faltos diff --git a/ao-tools/ao-flash/ao-flash-samd21 b/ao-tools/ao-flash/ao-flash-samd21 new file mode 100755 index 00000000..1b3dc87b --- /dev/null +++ b/ao-tools/ao-flash/ao-flash-samd21 @@ -0,0 +1,22 @@ +#!/bin/sh +case "$#" in +1) + ;; +*) + echo "usage: $0 ..." + exit 1 + ;; +esac + +openocd \ + -f interface/stlink.cfg \ + -c 'transport select hla_swd' \ + -c 'set CPUTAPID 0x0bc11477' \ + -f target/at91samdXX.cfg \ + -c 'adapter speed 10' \ + -c init \ + -c 'reset init' \ + -c 'at91samd bootloader 0' \ + -c 'reset init' \ + -c "program $1" \ + -c "shutdown"