2024-06-28 22:21:30 +00:00
|
|
|
#!/bin/csh
|
2023-02-20 05:53:50 +00:00
|
|
|
|
|
|
|
# setup.csh
|
|
|
|
# james.stine@okstate.edu 18 February 2023
|
|
|
|
|
2023-02-20 11:30:08 +00:00
|
|
|
echo "Executing Wally setup.csh"
|
2023-02-20 05:53:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Extend alias which makes extending PATH much easier.
|
|
|
|
alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2;echo Added \!:2 to \!:1'
|
|
|
|
alias prepend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 "\!:2":${\!:1};echo Added \!:2 to \!:1'
|
|
|
|
|
|
|
|
# Path to RISC-V Tools
|
2024-06-28 22:21:30 +00:00
|
|
|
if ( -e /opt/riscv ) then
|
|
|
|
setenv RISCV /opt/riscv
|
|
|
|
else if ( -e ~/riscv ) then
|
|
|
|
setenv RISCV ~/riscv
|
|
|
|
else
|
|
|
|
# set the $RISCV directory here and remove the subsequent two lines
|
|
|
|
# setenv RISCV
|
2024-07-04 20:45:24 +00:00
|
|
|
echo "\$RISCV directory not found. Checked /opt/riscv and ~/riscv. Edit setup.csh to point to your custom \$RISCV directory."
|
2024-06-28 22:21:30 +00:00
|
|
|
exit 1;
|
|
|
|
endif
|
|
|
|
echo \$RISCV set to "${RISCV}"
|
2023-02-20 05:53:50 +00:00
|
|
|
|
2024-03-12 21:56:52 +00:00
|
|
|
# Path to Wally repository
|
|
|
|
setenv WALLY $PWD
|
|
|
|
echo '$WALLY set to ' ${WALLY}
|
2023-02-20 05:53:50 +00:00
|
|
|
# utility functions in Wally repository
|
|
|
|
extend PATH $WALLY/bin
|
|
|
|
|
2024-06-28 22:21:30 +00:00
|
|
|
# load site licenses and tool locations
|
2024-03-12 21:56:52 +00:00
|
|
|
source $RISCV/site-setup.csh
|
2024-01-15 15:24:18 +00:00
|
|
|
|
2023-02-20 05:53:50 +00:00
|
|
|
echo "setup done"
|