source [find target/swj-dp.tcl] # # NVIDIA Tegra2 Cortex A9 # # Please note: # So far only SWD connection works; JTAG connection does not work. # Also when GDB first connects, the initial break does not work. # A workaround is to tell GDB to continue, then press CTRL-C. # Then a proper break is done and you can debug. if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME } else { set _CHIPNAME tegra2 } if { [info exists ENDIAN] } { set _ENDIAN $ENDIAN } else { set _ENDIAN little } if { [info exists CPUTAPID] } { set _CPUTAPID $CPUTAPID } else { set _CPUTAPID 0x420173d7 } adapter_khz 2000 # at least in SWD mode, SRST does not work. reset_config trst_only swj_newdap $_CHIPNAME dap -irlen 2 -expected-id $_CPUTAPID set _TARGETNAME $_CHIPNAME.cpu target create ${_TARGETNAME}0 cortex_a -endian $_ENDIAN -chain-position $_CHIPNAME.dap -coreid 0 # core0 has dbgbase 0x80030000 target create ${_TARGETNAME}1 cortex_a -endian $_ENDIAN -chain-position $_CHIPNAME.dap -coreid 1 # core1 has dbgbase 0x80032000 target smp ${_TARGETNAME}0 ${_TARGETNAME}1