You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
microwatt/openocd/xilinx-xc7.cfg

60 lines
1.2 KiB
INI

Add script for writing to flash on arty You must have openocd 0.10.0 installed. $ ./openocd/flash-arty ~/microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html none separate Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'. adapter speed: 25000 kHz fpga_program Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling" Info : clock speed 25000 kHz Info : JTAG tap: xc7.tap tap/device found: 0x0362d093 (mfg: 0x049 (Xilinx), part: 0x362d, ver: 0x0) loaded file microwatt/openocd/bscan_spi_xc7a35t.bit to pld device 0 in 0s 136459us Info : JTAG tap: xc7.tap tap/device found: 0x0362d093 (mfg: 0x049 (Xilinx), part: 0x362d, ver: 0x0) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) flash 'jtagspi' found at 0x00000000 auto erase enabled Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : sector 0 took 241 ms Info : sector 1 took 242 ms Info : sector 2 took 241 ms Info : sector 3 took 247 ms Info : sector 4 took 253 ms Info : sector 5 took 244 ms Info : sector 6 took 246 ms Info : sector 7 took 237 ms Info : sector 8 took 258 ms Info : sector 9 took 260 ms Info : sector 10 took 262 ms Info : sector 11 took 253 ms Info : sector 12 took 256 ms Info : sector 13 took 255 ms wrote 917504 bytes from file microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit in 9.642746s (92.920 KiB/s) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) read 907483 bytes from file microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit and flash bank 0 at offset 0x00000000 in 0.557387s (1589.944 KiB/s) contents match Signed-off-by: Joel Stanley <joel@jms.id.au>
5 years ago
source [find cpld/xilinx-xc7.cfg]
# From jtagspi.cfg with modification to support
# specifying file type
set _USER1 0x02
if { [info exists JTAGSPI_IR] } {
set _JTAGSPI_IR $JTAGSPI_IR
} else {
set _JTAGSPI_IR $_USER1
}
if { [info exists DR_LENGTH] } {
set _DR_LENGTH $DR_LENGTH
} else {
set _DR_LENGTH 1
}
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 $_DR_LENGTH
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 {type ""} } {
# write and verify binary file $bin at offset $addr
global _FLASHNAME
if { $type eq "" } {
flash write_image erase $bin $addr
flash verify_bank $_FLASHNAME $bin $addr
} else {
flash write_image erase $bin $addr $type
flash verify_bank $_FLASHNAME $bin $addr $type
}
}
# end jtagspi.cfg
Add script for writing to flash on arty You must have openocd 0.10.0 installed. $ ./openocd/flash-arty ~/microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html none separate Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'. adapter speed: 25000 kHz fpga_program Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling" Info : clock speed 25000 kHz Info : JTAG tap: xc7.tap tap/device found: 0x0362d093 (mfg: 0x049 (Xilinx), part: 0x362d, ver: 0x0) loaded file microwatt/openocd/bscan_spi_xc7a35t.bit to pld device 0 in 0s 136459us Info : JTAG tap: xc7.tap tap/device found: 0x0362d093 (mfg: 0x049 (Xilinx), part: 0x362d, ver: 0x0) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) flash 'jtagspi' found at 0x00000000 auto erase enabled Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) Info : sector 0 took 241 ms Info : sector 1 took 242 ms Info : sector 2 took 241 ms Info : sector 3 took 247 ms Info : sector 4 took 253 ms Info : sector 5 took 244 ms Info : sector 6 took 246 ms Info : sector 7 took 237 ms Info : sector 8 took 258 ms Info : sector 9 took 260 ms Info : sector 10 took 262 ms Info : sector 11 took 253 ms Info : sector 12 took 256 ms Info : sector 13 took 255 ms wrote 917504 bytes from file microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit in 9.642746s (92.920 KiB/s) Info : Found flash device 'micron n25q128' (ID 0x0018ba20) read 907483 bytes from file microwatt-fusesoc/build/microwatt_0/arty_a7-35-vivado/microwatt_0.bit and flash bank 0 at offset 0x00000000 in 0.557387s (1589.944 KiB/s) contents match Signed-off-by: Joel Stanley <joel@jms.id.au>
5 years ago
proc fpga_program {} {
global _CHIPNAME
xc7_program $_CHIPNAME.tap
}