redpitaya-puzzlefw/fpga/12_build_bitfile_4ch.sh

36 lines
730 B
Bash
Executable File

#!/bin/bash
set -e
set -o pipefail
. script_env
setup_vivado
rm -f puzzlefw_top_4ch.bit.bin redpitaya_puzzlefw_4ch.xsa
rm -rf vivado/redpitaya_puzzlefw.srcs/sources_1/bd/puzzlefw/ip
rm -rf vivado/redpitaya_puzzlefw.srcs/sources_1/bd/puzzlefw/ipshared
rm -rf vivado/redpitaya_puzzlefw.gen
rm -rf vivado/output_4ch
mkdir -p vivado/output_4ch
( cd vivado
stdbuf -oL vivado -mode batch -source nonproject_4ch.tcl | tee output_4ch/build_log.txt
)
cat >vivado/output_4ch/bitstream.bif <<EOF
all:
{
puzzlefw_top_4ch.bit
}
EOF
( cd vivado/output_4ch
bootgen -image bitstream.bif -arch zynq -process_bitstream bin
)
cp -a vivado/output_4ch/puzzlefw_top_4ch.bit.bin .
cp -a vivado/output_4ch/redpitaya_puzzlefw_4ch.xsa .