source [find target/swj-dp.tcl] if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME rtl8710 } if { [info exists ENDIAN] } { set _ENDIAN $ENDIAN } else { set _ENDIAN little } if { [info exists WORKAREASIZE] } { set _WORKAREASIZE $WORKAREASIZE } else { set _WORKAREASIZE 0x800 } if { [info exists CPUTAPID] } { set _CPUTAPID $CPUTAPID } else { set _CPUTAPID 0x2ba01477 } swd newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap # todo: get work area from makefile $_TARGETNAME configure -work-area-phys 0x10001500 -work-area-size $_WORKAREASIZE -work-area-backup 0 adapter speed 4000 adapter srst delay 100 if {![using_hla]} { cortex_m reset_config sysresetreq } $_TARGETNAME configure -event reset-init {amebaz_init}