You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fpga-cruft/scripts/forksand-jeboot-ecp5-litex-...

61 lines
1.5 KiB

#!/bin/bash
set -x
# Wt
cd /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets
rm -fr /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets/soc_basesoc_versa_ecp5/
rm -rf /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets/soc_ethernetsoc_versa_ecp5/gateware/
echo
echo "NOW BUILDING"
echo
# Build .svf
./versa_ecp5.py \
--sys-clk-freq=60e6 \
--gateware-toolchain=trellis \
--gateware-toolchain-path=/usr/local \
--cpu-type=vexriscv \
--csr-csv=./csr_ecp5versa.csv \
|| exit
# If you add/remove ethernet, also need to change .svf below
# --cpu-type=rocket
# --sys-clk-freq=60e6 \
# --with-ethernet \
# --cpu-variant=linux \
exit 0
echo
echo "NOW FLASHING"
echo
openocd \
-f /home/jebba/devel/FPGA/muh/ecp5-versa5g.cfg \
-c "transport select jtag; init; svf /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets/soc_basesoc_versa_ecp5/gateware/top.svf; exit" \
|| exit
# No ethernet
# -c "transport select jtag; init; svf /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets/soc_basesoc_versa_ecp5/gateware/top.svf; exit" \
# With ethernet
# -c "transport select jtag; init; svf /home/jebba/devel/FPGA/litex/litex-boards/litex_boards/official/targets/soc_ethernetsoc_versa_ecp5/gateware/top.svf; exit" \
echo "Running:"
echo "lxterm /dev/ttyUSB1"
echo "Hit ctrl-c twice to bail"
echo
echo "If that lxterm doesn't connect try like this:"
echo "lxterm /dev/ttyUSB1 --speed=2e6"
echo
echo "NOW CONNECTING"
echo
lxterm /dev/ttyUSB1