aarch64: Correct target state for hardware step
[openocd.git] / tcl / target / lpc4370.cfg
blob67bff0adcacd47722d35b6de030454ac3e42b9b5
2 # NXP LPC4370 - 1x ARM Cortex-M4 + 2x ARM Cortex-M0 @ up to 204 MHz each
5 adapter_khz 500
7 if { [info exists CHIPNAME] } {
8         set _CHIPNAME $CHIPNAME
9 } else {
10         set _CHIPNAME lpc4370
14 # M4 JTAG mode TAP
16 if { [info exists M4_JTAG_TAPID] } {
17         set _M4_JTAG_TAPID $M4_JTAG_TAPID
18 } else {
19         set _M4_JTAG_TAPID 0x4ba00477
23 # M4 SWD mode TAP
25 if { [info exists M4_SWD_TAPID] } {
26         set _M4_SWD_TAPID $M4_SWD_TAPID
27 } else {
28         set _M4_SWD_TAPID 0x2ba01477
31 source [find target/swj-dp.tcl]
33 if { [using_jtag] } {
34         set _M4_TAPID $_M4_JTAG_TAPID
35 } else {
36         set _M4_TAPID $_M4_SWD_TAPID
40 # M0 TAP
42 if { [info exists M0_JTAG_TAPID] } {
43         set _M0_JTAG_TAPID $M0_JTAG_TAPID
44 } else {
45         set _M0_JTAG_TAPID 0x0ba01477
48 swj_newdap $_CHIPNAME m4 -irlen 4 -ircapture 0x1 -irmask 0xf \
49                                 -expected-id $_M4_TAPID
51 target create $_CHIPNAME.m4 cortex_m -chain-position $_CHIPNAME.m4
53 # LPC4370 has 96+32 KB contiguous SRAM
54 if { [info exists WORKAREASIZE] } {
55         set _WORKAREASIZE $WORKAREASIZE
56 } else {
57         set _WORKAREASIZE 0x20000
59 $_CHIPNAME.m4 configure -work-area-phys 0x10000000 \
60                         -work-area-size $_WORKAREASIZE -work-area-backup 0
62 if { [using_jtag] } {
63         jtag newtap $_CHIPNAME m0app -irlen 4 -ircapture 0x1 -irmask 0xf \
64                                         -expected-id $_M0_JTAG_TAPID
65         jtag newtap $_CHIPNAME m0sub -irlen 4 -ircapture 0x1 -irmask 0xf \
66                                         -expected-id $_M0_JTAG_TAPID
68         target create $_CHIPNAME.m0app cortex_m -chain-position $_CHIPNAME.m0app
69         target create $_CHIPNAME.m0sub cortex_m -chain-position $_CHIPNAME.m0sub
71         # 32+8+32 KB SRAM
72         $_CHIPNAME.m0app configure -work-area-phys 0x10080000 \
73                                    -work-area-size 0x92000 -work-area-backup 0
75         # 16+2 KB M0 subsystem SRAM
76         $_CHIPNAME.m0sub configure -work-area-phys 0x18000000 \
77                                    -work-area-size 0x4800 -work-area-backup 0
79         # Default to the Cortex-M4
80         targets $_CHIPNAME.m4
83 if { ![using_hla] } {
84         cortex_m reset_config vectreset