34 lines
675 B
Bash
Executable File
34 lines
675 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
. script_env
|
|
setup_vivado
|
|
|
|
rm -f puzzlefw_top.bit.bin redpitaya_puzzlefw.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
|
|
|
|
mkdir -p vivado/output
|
|
|
|
( cd vivado
|
|
stdbuf -oL vivado -mode batch -source nonproject.tcl | tee output/build_log.txt )
|
|
|
|
cat >vivado/output/bitstream.bif <<EOF
|
|
all:
|
|
{
|
|
puzzlefw_top.bit
|
|
}
|
|
EOF
|
|
|
|
( cd vivado/output
|
|
bootgen -image bitstream.bif -arch zynq -process_bitstream bin
|
|
)
|
|
|
|
cp -a vivado/output/puzzlefw_top.bit.bin .
|
|
cp -a vivado/output/redpitaya_puzzlefw.xsa .
|
|
|