mirror of
https://github.com/supleed2/EIE4-FYP.git
synced 2024-12-22 22:25:50 +00:00
Add section prompts to build script
This commit is contained in:
parent
42826f57e4
commit
8cd576fe6b
10
build.sh
10
build.sh
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
read -p "Rebuild gateware? [y/N]" -n 1 -r REBUILD
|
||||||
|
if [[ $REBUILD =~ ^[Yy]$ ]]; then
|
||||||
|
echo # Move to next line
|
||||||
rm -f analyzer.csv csr.csv gsd_orangecrab.dfu kernel.bin && echo "Cleaned up previous run files"
|
rm -f analyzer.csv csr.csv gsd_orangecrab.dfu kernel.bin && echo "Cleaned up previous run files"
|
||||||
python3 make.py --build --doc
|
python3 make.py --build --doc
|
||||||
cp build/gsd_orangecrab/gateware/gsd_orangecrab.bit gsd_orangecrab.dfu && echo "Copied .bit to .dfu"
|
cp build/gsd_orangecrab/gateware/gsd_orangecrab.bit gsd_orangecrab.dfu && echo "Copied .bit to .dfu"
|
||||||
|
@ -8,15 +11,18 @@ dfu-suffix -v 1209 -p 5af0 -a gsd_orangecrab.dfu && echo "Added DFU suffix for t
|
||||||
# mv gsd_orangecrab.dfu /mnt/c/Users/suple/Desktop/dfu-util-0.9-win64/gsd.dfu && echo "Moved new DFU to Win11 Desktop"
|
# mv gsd_orangecrab.dfu /mnt/c/Users/suple/Desktop/dfu-util-0.9-win64/gsd.dfu && echo "Moved new DFU to Win11 Desktop"
|
||||||
rm -r docs/ && echo "Deleted old docs in project root"
|
rm -r docs/ && echo "Deleted old docs in project root"
|
||||||
cp -r build/gsd_orangecrab/doc/_build/html docs/ && echo "Copied docs to project root"
|
cp -r build/gsd_orangecrab/doc/_build/html docs/ && echo "Copied docs to project root"
|
||||||
|
else echo "Skipping Rebuild"
|
||||||
|
fi
|
||||||
BUILD_DIR=`realpath -eL build/gsd_orangecrab/` WITH_CXX=1 make -C demo && echo "Built demo files"
|
BUILD_DIR=`realpath -eL build/gsd_orangecrab/` WITH_CXX=1 make -C demo && echo "Built demo files"
|
||||||
mv demo/demo.bin kernel.bin && echo "Moved kernel binary to project root"
|
mv demo/demo.bin kernel.bin && echo "Moved kernel binary to project root"
|
||||||
rm -f demo/*.o demo/*.d demo/demo.elf demo/demo.elf.map && echo "Cleaned up build artifacts"
|
rm -f demo/*.o demo/*.d demo/demo.elf demo/demo.elf.map && echo "Cleaned up build artifacts"
|
||||||
read -p "Flash OrangeCrab? [y/N]" -n 1 -r FLASH_OC
|
read -p "Flash OrangeCrab? [y/N]" -n 1 -r FLASH_OC
|
||||||
|
if [[ $FLASH_OC =~ ^[Yy]$ ]]; then
|
||||||
echo # Move to next line
|
echo # Move to next line
|
||||||
if [[ $FLASH_OC =~ ^[Yy]$ ]] then
|
|
||||||
dfu-util -D gsd_orangecrab.dfu
|
dfu-util -D gsd_orangecrab.dfu
|
||||||
|
else echo "Skipping Reflash"
|
||||||
fi
|
fi
|
||||||
read -p "Start litex_term? [y/N]" -n 1 -r START_LT
|
read -p "Start litex_term? [y/N]" -n 1 -r START_LT
|
||||||
if [[ $START_LT =~ ^[Yy]$ ]] then
|
if [[ $START_LT =~ ^[Yy]$ ]]; then
|
||||||
litex_term --kernel demo.bin /dev/ttyACM0
|
litex_term --kernel demo.bin /dev/ttyACM0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue