Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
samd21:bootloader [2020/12/29 21:26] admin [... with a Raspberry Pi] |
samd21:bootloader [2020/12/30 21:15] (current) admin [... with a Segger J-Link Programmer] |
||
---|---|---|---|
Line 5: | Line 5: | ||
==== ... with a Raspberry Pi ==== | ==== ... with a Raspberry Pi ==== | ||
- | One has to install OpenOCD on a Raspberry Pi:\\ | + | One has to install OpenOCD on a Raspberry Pi (RaspbianBuster):\\ |
Update and install some tools: | Update and install some tools: | ||
- | sudo apt-get update | + | |
- | sudo apt-get install git autoconf libtool make pkg-config libusb-1.0-0 libusb-1.0-0-dev htop | + | |
Download OpenOCD from [[http:// | Download OpenOCD from [[http:// | ||
- | git clone http:// | + | |
Compile: | Compile: | ||
- | cd openocd-code | + | |
- | ./ | + | |
- | ./configure --enable-sysfsgpio --enable-bcm2835gpio | + | |
- | make | + | |
- | sudo make install | + | |
- | List of Interfaces: | + | List all Interfaces: |
- | cd / | + | |
- | ls | + | |
- | Wiring | + | Make a Folder and Download the Bootloader: |
+ | $ cd ~ | ||
+ | $ mkdir bootloader | ||
+ | $ cd bootloader | ||
+ | $ wget https:// | ||
+ | Make a Configuration File: | ||
+ | $ nano openocd.cfg | ||
+ | and add: | ||
+ | source [find interface/ | ||
+ | transport select swd | ||
+ | |||
+ | set CHIPNAME at91samd21g18 | ||
+ | source [find target/ | ||
+ | |||
+ | reset_config | ||
+ | |||
+ | adapter srst delay 400 | ||
+ | adapter srst pulse_width 100 | ||
+ | |||
+ | bcm2835gpio_swd_nums 25 24 | ||
+ | bcm2835gpio_trst_num 7 | ||
+ | bcm2835gpio_srst_num 18 | ||
+ | |||
+ | init | ||
+ | targets | ||
+ | reset halt | ||
+ | |||
+ | t91samd bootloader 0 | ||
+ | program samd21_sam_ba.bin verify | ||
+ | at91samd bootloader 8192 | ||
+ | reset | ||
+ | shutdown | ||
+ | |||
+ | The GPIO pin numbers can be set here or in the raspberrypi2-native.cfg file. To do so change in: | ||
+ | $ sudo nano / | ||
+ | the following lines: | ||
+ | bcm2835gpio_swd_nums 25 24 | ||
+ | bcm2835gpio_trst_num 7 | ||
+ | bcm2835gpio_srst_num 18 | ||
+ | |||
+ | Connecting | ||
| | ||
18 Reset | 18 Reset | ||
Line 31: | Line 71: | ||
==== ... with a Segger J-Link Programmer ==== | ==== ... with a Segger J-Link Programmer ==== | ||
+ | **UNDER CONSTRUCTION !** | ||
and [[https:// | and [[https:// | ||
Line 47: | Line 88: | ||
[[https:// | [[https:// | ||
- | [[https:// | + | [[https:// |
+ | This bootloader bever worked for me!\\ | ||
---- | ---- | ||
Line 53: | Line 95: | ||
[[https:// | [[https:// | ||
+ | |||
+ | [[https:// | ||
[[https:// | [[https:// | ||
+ | |||
+ | [[http:// | ||
---- | ---- |