Added openocd config and scripts to make uploading and programming easier

This commit is contained in:
Dreaded_X 2021-01-21 21:15:48 +01:00
parent cca21dfea2
commit c661c10757
3 changed files with 42 additions and 0 deletions

38
openocd.cfg Normal file
View File

@ -0,0 +1,38 @@
#
# Numato Mimas A7 Mini - Artix 7 FPGA Board
#
# https://numato.com/product/mimas-a7-mini-fpga-development-board
#
interface ftdi
ftdi_device_desc "Mimas A7 Mini FPGA Module"
ftdi_vid_pid 0x2a19 0x100e
# channel 0 is for custom purpose by users (like uart, fifo etc)
# channel 1 is reserved for JTAG (by-default) or SPI (possible via changing solder jumpers)
ftdi_channel 1
ftdi_tdo_sample_edge falling
# FTDI Pin Layout
#
# +--------+-------+-------+-------+-------+-------+-------+-------+
# | DBUS7 | DBUS6 | DBUS5 | DBUS4 | DBUS3 | DBUS2 | DBUS1 | DBUS0 |
# +--------+-------+-------+-------+-------+-------+-------+-------+
# | PROG_B | OE_N | NC | NC | TMS | TDO | TDI | TCK |
# +--------+-------+-------+-------+-------+-------+-------+-------+
#
# OE_N is JTAG buffer output enable signal (active-low)
# PROG_B is not used, so left as input to FTDI.
#
ftdi_layout_init 0x0008 0x004b
reset_config none
adapter_khz 30000
source [find cpld/xilinx-xc7.cfg]
source [find cpld/jtagspi.cfg]
proc fpga_program {} {
global _CHIPNAME
xc7_program $_CHIPNAME.tap
}

2
program.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo openocd -f openocd.cfg -c "init" -c "jtagspi_init 0 bscan_spi_xc7a35t.bit" -c "jtagspi_program .build/impl.bin 0x0" -c "fpga_program" -c "shutdown"

2
upload.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
sudo openocd -f openocd.cfg -c "init" -c "pld load 0 .build/impl.bit" -c "shutdown"