For historical reasons, no license information was added to the tcl files. This makes trivial adding the SPDX tag through script: fgrep -rL SPDX tcl | while read a;do \ sed -i '1{i# SPDX-License-Identifier: GPL-2.0-or-later\n }' $a;done With no specific license information from the author, let's extend the OpenOCD project license GPL-2.0-or-later to the files. Change-Id: Ief3da306a6e1978de7dfb8f552f9ff23151f9944 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7030 Tested-by: jenkins
40 lines
877 B
INI
40 lines
877 B
INI
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
set _USER1 0x02
|
|
|
|
if { [info exists JTAGSPI_IR] } {
|
|
set _JTAGSPI_IR $JTAGSPI_IR
|
|
} else {
|
|
set _JTAGSPI_IR $_USER1
|
|
}
|
|
|
|
if { [info exists TARGETNAME] } {
|
|
set _TARGETNAME $TARGETNAME
|
|
} else {
|
|
set _TARGETNAME $_CHIPNAME.proxy
|
|
}
|
|
|
|
if { [info exists FLASHNAME] } {
|
|
set _FLASHNAME $FLASHNAME
|
|
} else {
|
|
set _FLASHNAME $_CHIPNAME.spi
|
|
}
|
|
|
|
target create $_TARGETNAME testee -chain-position $_CHIPNAME.tap
|
|
flash bank $_FLASHNAME jtagspi 0 0 0 0 $_TARGETNAME $_JTAGSPI_IR
|
|
|
|
proc jtagspi_init {chain_id proxy_bit} {
|
|
# load proxy bitstream $proxy_bit and probe spi flash
|
|
global _FLASHNAME
|
|
pld load $chain_id $proxy_bit
|
|
reset halt
|
|
flash probe $_FLASHNAME
|
|
}
|
|
|
|
proc jtagspi_program {bin addr} {
|
|
# write and verify binary file $bin at offset $addr
|
|
global _FLASHNAME
|
|
flash write_image erase $bin $addr
|
|
flash verify_bank $_FLASHNAME $bin $addr
|
|
}
|