Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bootloader:openocd [2021/01/30 17:33] admin |
bootloader:openocd [2021/01/30 17:58] (current) admin [Acknowledge & Links] |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| {{: | {{: | ||
| - | On a Raspberry Pi following the openOCD | + | To install the [[http:// |
| Install: | Install: | ||
| Line 25: | Line 25: | ||
| $ wget https:// | $ wget https:// | ||
| $ wget https:// | $ wget https:// | ||
| - | $ wget " | + | $ wget " |
| Make your Config File: | Make your Config File: | ||
| $ nano openocd.cfg | $ nano openocd.cfg | ||
| Add: | Add: | ||
| + | source [find interface/ | ||
| + | transport select swd | ||
| + | |||
| + | set CHIPNAME at91samd21g18 | ||
| + | source [find target/ | ||
| + | |||
| + | # did not yet manage to make a working setup using srst | ||
| + | # | ||
| + | reset_config srst_nogate | ||
| + | |||
| + | adapter srst delay 100 | ||
| + | adapter srst pulse_width 100 | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | init | ||
| + | targets | ||
| + | reset halt | ||
| + | |||
| + | #at91samd chip-erase | ||
| + | #at91samd restore | ||
| + | at91samd bootloader 0 | ||
| + | program samd21_sam_ba.bin verify | ||
| + | #program bootloader-XIAO_m0-v3.7.0-33-g90ff611-dirty.bin verify | ||
| + | #flash write_image unlock bootloader-XIAO_m0-v3.7.0-33-g90ff611-dirty.bin | ||
| + | at91samd bootloader 8192 | ||
| + | |||
| + | reset | ||
| + | shutdown | ||
| + | ... and run it | ||
| $ sudo openocd -f openocd.cfg | $ sudo openocd -f openocd.cfg | ||
| If needed change the Raspberry Pi interface file: | If needed change the Raspberry Pi interface file: | ||
| $ sudo nano / | $ sudo nano / | ||
| $ sudo nano / | $ sudo nano / | ||
| + | Change: | ||
| + | # Each of the SWD lines need a gpio number set: swclk swdio | ||
| + | # Header pin numbers: 23 22 | ||
| + | bcm2835gpio_swd_nums 25 24 | ||
| + | |||
| + | # If you define trst or srst, use appropriate reset_config | ||
| + | # Header pin numbers: TRST - 26, SRST - 18 | ||
| + | bcm2835gpio_trst_num 7 | ||
| + | bcm2835gpio_srst_num 18 | ||
| ---- | ---- | ||
| - | ==== HEX files ===== | + | ==== Bootloader |
| - [[https:// | - [[https:// | ||
| Line 44: | Line 84: | ||
| ---- | ---- | ||
| ==== Pinout ==== | ==== Pinout ==== | ||
| + | |||
| + | SWD | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| **Arduino MKR ZERO**\\ | **Arduino MKR ZERO**\\ | ||
| Line 69: | Line 115: | ||
| ==== Acknowledge & Links ==== | ==== Acknowledge & Links ==== | ||
| + | [[http:// | ||
| + | [[http:// | ||
| [[https:// | [[https:// | ||
| + | [[https:// | ||
| ---- | ---- | ||