Last active
December 29, 2020 05:50
-
-
Save k0d/1592045dbe8b29927457067b686f1198 to your computer and use it in GitHub Desktop.
samd21 with openecd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```brew install openocd``` | |
make a file called openocd.cfg in a folder containing... | |
# Atmel-ICE JTAG/SWD in-circuit debugger. | |
interface cmsis-dap | |
# Chip info | |
set CHIPNAME at91samd21g18 | |
source [find target/at91samdXX.cfg] | |
copy your bootloader to the same folder and call it bootloader.bin | |
```openocd -f openocd.cfg -c "at91samd bootloader 0; program bootloader.bin; at91samd bootloader 1024; exit reset"``` | |
NOTE: fix the bootloader size in bytes (1024...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally got around to trying this!
I needed to add an init to get it to flash, but it works great, thanks!
openocd -f openocd.cfg -c "init; at91samd bootloader 0; program bootloader.bin; at91samd bootloader 1024; exit reset"