-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenocd.cfg
47 lines (34 loc) · 1.24 KB
/
openocd.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#which ports to use to provide telnet and gdb services
set CHIPNAME atsame70q21
telnet_port 4444
gdb_port 3333
version
#interface_list
echo -n "start openocd debugger\n "
#interface configuration
interface ftdi
transport select swd
ftdi_vid_pid 0x403 0x6010
ftdi_channel 0
#ftdi_serial "FTZ70800" #funktioniert nur, wenn im FTDI chip die passende device description steht!!!
adapter_khz 1000
adapter_nsrst_delay 200
#ftdi_layout_init 0x58 0x000b
ftdi_layout_init 0x58 0x0003; # "0" input; "1" output: Bit0 = SWCLK (output); Bit1 = TDI (output); Bit2 = SWDIO (input) -> 011
ftdi_layout_signal SWD_EN -data 0
#ftdi_layout_signal nSRST -data 0x0010
#ftdi_layout_signal nRST -data 0x0040
sleep 10
set _CHIPNAME CHIPNAME;
set _ENDIAN little;
set _WORKAREASIZE 4000;
set _CPUTAPID 0x0bd11477;
set _TARGETNAME $_CHIPNAME.cpu;
eval swd newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x20400000 -work-area-size $_WORKAREASIZE -work-area-backup 0
cortex_m reset_config sysresetreq
#run_and_halt_time 0 30
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME atsamv 0x00400000 0 0 0 $_TARGETNAME
init