1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # https://www.quicklogic.com/products/soc/eos-s3-microcontroller/
5 source [find target/swj-dp.tcl]
7 if { [info exists CHIPNAME] } {
8 set _CHIPNAME $CHIPNAME
13 if { [info exists WORKAREASIZE] } {
14 set _WORKAREASIZE $WORKAREASIZE
16 set _WORKAREASIZE 0x80000
19 if { [info exists CPUTAPID] } {
20 set _CPUTAPID $CPUTAPID
23 set _CPUTAPID 0x4ba00477
25 set _CPUTAPID 0x2ba01477
29 swj_newdap $_CHIPNAME cpu -irlen 4 -irmask 0xf -expected-id $_CPUTAPID
30 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
32 set _TARGETNAME $_CHIPNAME.cpu
33 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
35 # For now we use SRAM only for software upload
36 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
41 # if srst is not fitted use SYSRESETREQ to
42 # perform a soft reset
43 cortex_m reset_config sysresetreq