From 95ee1755886df25423e6e5ab2c0136de2d7df34b Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 28 Jun 2022 14:40:44 +0200 Subject: [PATCH] common/common.mk: download bitstreams through openFPGALoader, instead of openocd Signed-off-by: Unai Martinez-Corral --- common/common.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/common.mk b/common/common.mk index b993eb7..cd19b9d 100644 --- a/common/common.mk +++ b/common/common.mk @@ -9,26 +9,32 @@ ifeq ($(TARGET),arty_35) DEVICE := xc7a50t_test BITSTREAM_DEVICE := artix7 PARTNAME := xc7a35tcsg324-1 + OFL_BOARD := arty_a7_35t else ifeq ($(TARGET),arty_100) DEVICE := xc7a100t_test BITSTREAM_DEVICE := artix7 PARTNAME := xc7a100tcsg324-1 + OFL_BOARD := arty_a7_100t else ifeq ($(TARGET),nexys4ddr) DEVICE := xc7a100t_test BITSTREAM_DEVICE := artix7 PARTNAME := xc7a100tcsg324-1 + OFL_BOARD := unsupported else ifeq ($(TARGET),zybo) DEVICE := xc7z010_test BITSTREAM_DEVICE := zynq7 PARTNAME := xc7z010clg400-1 + OFL_BOARD := zybo_z7_10 else ifeq ($(TARGET),nexys_video) DEVICE := xc7a200t_test BITSTREAM_DEVICE := artix7 PARTNAME := xc7a200tsbg484-1 + OFL_BOARD := nexysVideo else ifeq ($(TARGET),basys3) DEVICE := xc7a50t_test BITSTREAM_DEVICE := artix7 PARTNAME := xc7a35tcpg236-1 + OFL_BOARD := $(TARGET) else $(error Unsupported board type) endif @@ -76,17 +82,11 @@ ${BOARD_BUILDDIR}/${TOP}.bit: ${BOARD_BUILDDIR}/${TOP}.fasm cd ${BOARD_BUILDDIR} && symbiflow_write_bitstream -d ${BITSTREAM_DEVICE} -f ${TOP}.fasm -p ${PARTNAME} -b ${TOP}.bit download: ${BOARD_BUILDDIR}/${TOP}.bit - if [ $(TARGET)='arty_35' ]; then \ - openocd -f ${INSTALL_DIR}/xc7/conda/envs/xc7/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 ${BOARD_BUILDDIR}/${TOP}.bit; exit"; \ - elif [ $(TARGET)='arty_100' ]; then \ - openocd -f ${INSTALL_DIR}/xc7/conda/envs/xc7/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 ${BOARD_BUILDDIR}/${TOP}.bit; exit"; \ - elif [ $(TARGET)='basys3' ]; then \ - openocd -f ${INSTALL_DIR}/xc7/conda/envs/xc7/share/openocd/scripts/board/digilent_arty.cfg -c "init; pld load 0 ${BOARD_BUILDDIR}/${TOP}.bit; exit"; \ - else \ + if [ $(TARGET)='unsupported' ]; then \ echo "The commands needed to download the bitstreams to the board type specified are not currently supported by the F4PGA makefiles. \ Please see documentation for more information."; \ fi - + openFPGALoader -b ${OFL_BOARD} ${BOARD_BUILDDIR}/${TOP}.bit clean: rm -rf ${BUILDDIR}