]> git.sur5r.net Git - openocd/blob - tcl/target/k40.cfg
target: rename cortex_m3 to cortex_m
[openocd] / tcl / target / k40.cfg
1 #
2 # Freescale Kinetis K40 devices
3 #
4
5 #
6 # K40 devices support both JTAG and SWD transports.
7 #
8 source [find target/swj-dp.tcl]
9
10 if { [info exists CHIPNAME] } {
11     set _CHIPNAME $CHIPNAME
12 } else {
13     set _CHIPNAME k40
14 }
15
16 if { [info exists ENDIAN] } {
17     set _ENDIAN $ENDIAN
18 } else {
19     set _ENDIAN little
20 }
21
22 if { [info exists CPUTAPID] } {
23     set _CPUTAPID $CPUTAPID
24 } else {
25     set _CPUTAPID 0x4ba00477
26 }
27
28 set _TARGETNAME $_CHIPNAME.cpu
29
30 swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
31
32 target create $_TARGETNAME cortex_m -chain-position $_CHIPNAME.cpu
33
34 $_CHIPNAME.cpu configure -event examine-start { puts "START..." ; }
35 $_CHIPNAME.cpu configure -event examine-end { puts "END..." ; }
36
37 # if srst is not fitted use SYSRESETREQ to
38 # perform a soft reset
39 cortex_m reset_config sysresetreq