]> git.sur5r.net Git - openocd/blob - tcl/target/xmc1xxx.cfg
flash Kinetis: handle all types of watchdog, disable in reset-init
[openocd] / tcl / target / xmc1xxx.cfg
1 #
2 # Infineon XMC1100/XMC1200/XMC1300 family (ARM Cortex-M0 @ 32 MHz)
3 #
4
5 if { [info exists CHIPNAME] } {
6         set _CHIPNAME $CHIPNAME
7 } else {
8         set _CHIPNAME xmc1000
9 }
10
11 #
12 # Only SWD and SPD supported
13 #
14 source [find target/swj-dp.tcl]
15
16 if { [info exists CPUTAPID] } {
17         set _CPU_SWD_TAPID $CPUTAPID
18 } else {
19         set _CPU_SWD_TAPID 0x0BB11477
20 }
21
22 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_SWD_TAPID
23
24 set _TARGETNAME $_CHIPNAME.cpu
25 target create $_TARGETNAME cortex_m -endian little -chain-position $_TARGETNAME
26
27 if { [info exists WORKAREASIZE] } {
28    set _WORKAREASIZE $WORKAREASIZE
29 } else {
30    set _WORKAREASIZE 0x4000
31 }
32
33 $_TARGETNAME configure -work-area-phys 0x20000000 \
34                        -work-area-size $_WORKAREASIZE \
35                        -work-area-backup 0
36
37 set _FLASHNAME $_CHIPNAME.flash
38 flash bank $_FLASHNAME xmc1xxx 0x10000000 0 0 0 $_TARGETNAME
39
40 adapter_khz 1000