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.
63 lines
1.7 KiB
63 lines
1.7 KiB
5 years ago
|
#!/bin/bash
|
||
|
|
||
|
set -x
|
||
|
# Wt
|
||
|
cd /home/jebba/devel/FPGA/litex/litex/litex/boards/targets
|
||
|
|
||
|
rm -rf /home/jebba/devel/FPGA/litex/litex/litex/boards/targets/soc_basesoc_versa_ecp5
|
||
|
rm -rf /home/jebba/devel/FPGA/litex/litex/litex/boards/targets/soc_ethernetsoc_versa_ecp5
|
||
|
|
||
|
echo
|
||
|
echo "NOW BUILDING"
|
||
|
echo
|
||
|
|
||
|
# Build .svf
|
||
|
./versa_ecp5.py \
|
||
|
--sys-clk-freq=66666666 \
|
||
|
--gateware-toolchain=trellis \
|
||
|
--gateware-toolchain-path=/usr/local \
|
||
|
--cpu-type=vexriscv \
|
||
|
--cpu-variant=linux+no-dsp \
|
||
|
--csr-csv=./csr_ecp5versa.csv \
|
||
|
|| exit
|
||
|
|
||
|
# If you add/remove ethernet, also need to change .svf below
|
||
|
# --with-ethernet \
|
||
|
# --cpu-variant=linux \
|
||
|
# --cpu-variant=linux+no-dsp \
|
||
|
# --cpu-type=rocket \
|
||
|
# --sys-clk-freq=60e6 \
|
||
|
|
||
|
|
||
|
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/litex/boards/targets/soc_basesoc_versa_ecp5/gateware/top.svf; exit" \
|
||
|
|| exit
|
||
|
# No ethernet
|
||
|
# XXX UPDATE
|
||
|
# -c "transport select jtag; init; svf /home/jebba/devel/FPGA/litex/litex/litex/boards/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
|
||
|
|
||
|
echo "no, really gonna try to load a kernel instead:"
|
||
|
echo "lxterm --images=/home/jebba/devel/FPGA/muh/jeboot.json /dev/ttyUSB1 --no-crc --speed=1e6"
|
||
|
|