2 # NXP LPC4370 - 1x ARM Cortex-M4 + 2x ARM Cortex-M0 @ up to 204 MHz each
7 if { [info exists CHIPNAME] } {
8 set _CHIPNAME $CHIPNAME
16 if { [info exists M4_JTAG_TAPID] } {
17 set _M4_JTAG_TAPID $M4_JTAG_TAPID
19 set _M4_JTAG_TAPID 0x4ba00477
25 if { [info exists M4_SWD_TAPID] } {
26 set _M4_SWD_TAPID $M4_SWD_TAPID
28 set _M4_SWD_TAPID 0x2ba01477
31 source [find target/swj-dp.tcl]
34 set _M4_TAPID $_M4_JTAG_TAPID
36 set _M4_TAPID $_M4_SWD_TAPID
42 if { [info exists M0_JTAG_TAPID] } {
43 set _M0_JTAG_TAPID $M0_JTAG_TAPID
45 set _M0_JTAG_TAPID 0x0ba01477
48 swj_newdap $_CHIPNAME m4 -irlen 4 -ircapture 0x1 -irmask 0xf \
49 -expected-id $_M4_TAPID
50 dap create $_CHIPNAME.m4.dap -chain-position $_CHIPNAME.m4
51 target create $_CHIPNAME.m4 cortex_m -dap $_CHIPNAME.m4.dap
53 # LPC4370 has 96+32 KB contiguous SRAM
54 if { [info exists WORKAREASIZE] } {
55 set _WORKAREASIZE $WORKAREASIZE
57 set _WORKAREASIZE 0x20000
59 $_CHIPNAME.m4 configure -work-area-phys 0x10000000 \
60 -work-area-size $_WORKAREASIZE -work-area-backup 0
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 dap create $_CHIPNAME.m0app.dap -chain-position $_CHIPNAME.m0app
69 dap create $_CHIPNAME.m0sub.dap -chain-position $_CHIPNAME.m0sub
70 target create $_CHIPNAME.m0app cortex_m -dap $_CHIPNAME.m0app.dap
71 target create $_CHIPNAME.m0sub cortex_m -dap $_CHIPNAME.m0sub.dap
74 $_CHIPNAME.m0app configure -work-area-phys 0x10080000 \
75 -work-area-size 0x92000 -work-area-backup 0
77 # 16+2 KB M0 subsystem SRAM
78 $_CHIPNAME.m0sub configure -work-area-phys 0x18000000 \
79 -work-area-size 0x4800 -work-area-backup 0
81 # Default to the Cortex-M4
86 cortex_m reset_config vectreset