2024-08-03 13:08:27 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2024-10-06 20:44:44 +02:00
|
|
|
set -o pipefail
|
2024-08-03 13:08:27 +02:00
|
|
|
|
|
|
|
. script_env
|
|
|
|
setup_vivado
|
|
|
|
|
2024-09-21 20:40:08 +02:00
|
|
|
rm -f puzzlefw_top.bit.bin redpitaya_puzzlefw.xsa
|
2024-10-06 20:44:44 +02:00
|
|
|
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
|
2024-09-21 20:40:08 +02:00
|
|
|
|
2024-08-30 23:04:27 +02:00
|
|
|
( cd vivado
|
|
|
|
stdbuf -oL vivado -mode batch -source nonproject.tcl | tee output/build_log.txt )
|
2024-08-03 13:08:27 +02:00
|
|
|
|
2024-09-21 20:40:08 +02:00
|
|
|
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 .
|
2024-08-03 13:08:27 +02:00
|
|
|
|