Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
bootloader:openocd [2021/01/30 17:32] admin [OpenOCD with the Raspberry Pi] |
bootloader:openocd [2021/01/30 17:39] admin [OpenOCD & Raspberry Pi] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== OpenOCD | + | ====== OpenOCD |
{{: | {{: | ||
- | On a Raspberry Pi following the openOCD manual by [[https:// | + | On a Raspberry Pi following the openOCD manual by [[https:// |
Install: | Install: | ||
$ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev htop | $ sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev htop | ||
Line 9: | Line 10: | ||
$ git clone http:// | $ git clone http:// | ||
$ cd openocd/ | $ cd openocd/ | ||
- | Configure & install: | + | Configure & Install: |
$ ./ | $ ./ | ||
$ ./configure --enable-sysfsgpio --enable-bcm2835gpio | $ ./configure --enable-sysfsgpio --enable-bcm2835gpio | ||
$ make | $ make | ||
$ sudo make install | $ sudo make install | ||
- | Check | + | Check |
$ cd / | $ cd / | ||
$ ls | $ ls | ||
- | Make a folder: | + | New Folder: |
$ cd ~ | $ cd ~ | ||
$ mkdir bootloader | $ mkdir bootloader | ||
$ cd bootloader | $ cd bootloader | ||
- | Download the bootloader: | + | Download the Bootloader: |
$ 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: |