2022-06-12 16:42:27 -05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2015-05-30 21:18:36 -05:00
|
|
|
set _CHIPNAME avr
|
|
|
|
set _ENDIAN little
|
|
|
|
|
|
|
|
# jtag speed
|
2019-08-23 08:51:00 -05:00
|
|
|
adapter speed 4500
|
2015-05-30 21:18:36 -05:00
|
|
|
|
|
|
|
# avr jtag docs never connect RSTN
|
|
|
|
reset_config none
|
|
|
|
|
|
|
|
#jtag scan chain
|
|
|
|
if { [info exists CPUTAPID] } {
|
|
|
|
set _CPUTAPID $CPUTAPID
|
|
|
|
} else {
|
|
|
|
set _CPUTAPID 0x0a70103f
|
|
|
|
}
|
|
|
|
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
|
|
|
|
|
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
|
|
|
target create $_TARGETNAME avr -endian $_ENDIAN -chain-position $_TARGETNAME
|
|
|
|
|
|
|
|
set _FLASHNAME $_CHIPNAME.flash
|
|
|
|
flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME
|