1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Renesas Synergy S7 G2 w/ ARM Cortex-M4 @ 240 MHz
7 if { [info exists CHIPNAME] } {
8 set _CHIPNAME $CHIPNAME
13 if { [info exists CPU_JTAG_TAPID] } {
14 set _CPU_JTAG_TAPID $CPU_JTAG_TAPID
16 set _CPU_JTAG_TAPID 0x5ba00477
19 if { [info exists CPU_SWD_TAPID] } {
20 set _CPU_SWD_TAPID $CPU_SWD_TAPID
22 set _CPU_SWD_TAPID 0x5ba02477
25 source [find target/swj-dp.tcl]
28 set _CPU_TAPID $_CPU_JTAG_TAPID
30 set _CPU_TAPID $_CPU_SWD_TAPID
33 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
34 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
36 set _TARGETNAME $_CHIPNAME.cpu
37 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
39 if { [info exists WORKAREASIZE] } {
40 set _WORKAREASIZE $WORKAREASIZE
43 set _WORKAREASIZE 0xa0000
46 $_TARGETNAME configure -work-area-phys 0x1ffe0000 \
47 -work-area-size $_WORKAREASIZE -work-area-backup 0
50 cortex_m reset_config sysresetreq