tcl/target: Add PSoC 5LP config
[fw/openocd] / tcl / target / psoc5lp.cfg
1 #
2 # Cypress PSoC 5LP
3 #
4
5 source [find target/swj-dp.tcl]
6
7 if { [info exists CHIPNAME] } {
8         set _CHIPNAME $CHIPNAME
9 } else {
10         set _CHIPNAME psoc5lp
11 }
12
13 if { [info exists CPUTAPID] } {
14         set _CPU_TAPID $CPUTAPID
15 } else {
16         set _CPU_TAPID 0x4BA00477
17 }
18
19 if { [using_jtag] } {
20         set _CPU_DAP_ID $_CPU_TAPID
21 } else {
22         set _CPU_DAP_ID 0x2ba01477
23 }
24
25 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_DAP_ID
26
27 set _TARGETNAME $_CHIPNAME.cpu
28 target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
29
30 if {![using_hla]} {
31         cortex_m reset_config sysresetreq
32 }