1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Texas Instruments MSP432 - ARM Cortex-M4F @ up to 48 MHz
6 # http://www.ti.com/MSP432
9 if { [info exists CHIPNAME] } {
10 set _CHIPNAME $CHIPNAME
15 if { [info exists CPUTAPID] } {
16 set _DAP_TAPID $CPUTAPID
18 set _DAP_TAPID 0x4ba00477
21 if { [info exists DAP_SWD_ID] } {
22 set _DAP_SWD_ID $DAP_SWD_ID
24 set _DAP_SWD_ID 0x2ba01477
27 source [find target/swj-dp.tcl]
30 set _DAP_ID $_DAP_TAPID
32 set _DAP_ID $_DAP_SWD_ID
35 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_DAP_ID
36 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
38 set _TARGETNAME $_CHIPNAME.cpu
39 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
41 if { [info exists WORKAREASIZE] } {
42 set _WORKAREASIZE $WORKAREASIZE
44 set _WORKAREASIZE 0x4000
48 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
50 set _FLASHNAME $_CHIPNAME.flash
51 flash bank $_FLASHNAME msp432 0 0 0 0 $_TARGETNAME
53 cortex_m reset_config sysresetreq