Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further improvements to README.md and flash-hdmi2usb.sh script
- Loading branch information
Showing
2 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
if [ ! -e ~/HDMI2USB-misoc-firmware/build ]; then | ||
SETUP_SRC=$(realpath ${BASH_SOURCE[@]}) | ||
SETUP_DIR=$(dirname $SETUP_SRC) | ||
TOP_DIR=$(realpath $SETUP_DIR/..) | ||
BUILD_DIR=$TOP_DIR/build | ||
|
||
if [ ! -e $BUILD_DIR ]; then | ||
echo "You need to build the firmware first. Please see README.md" | ||
exit 1 | ||
fi | ||
|
||
cd ~/HDMI2USB-misoc-firmware | ||
source $TOP_DIR/scripts/setup-env.sh | ||
|
||
( | ||
cd $TOP_DIR | ||
echo "" | ||
echo "IF THIS FAILS:" | ||
echo " * Run script again (can take 2-3 flash attempts)" | ||
echo " * Ensure USB plugged into PROG port for programming" | ||
echo " * Ensure USB also plugged into UART port for HDMI2USB capture" | ||
echo " * If using a VM, ensure devices are passed through (will change during flash)" | ||
echo " * Has HDMI2USB already been flashed since last power cycle?" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
echo "" | ||
sleep 2 | ||
|
||
source ~/HDMI2USB-misoc-firmware/scripts/setup-env.sh | ||
echo "Attempting to load gateware.." | ||
|
||
echo "Attempting to load gateware; will attempt 3 times, errors are normal" | ||
PROG=fpgalink make load-gateware; sleep 2 | ||
|
||
for loop in 1 2 3 | ||
do | ||
PROG=fpgalink make load-gateware; sleep 2 | ||
done | ||
echo "Attempting to load firmware..." | ||
make load-fx2-firmware; sleep 1 | ||
|
||
make load-fx2-firmware; sleep 1 | ||
make connect-lm32 | ||
echo "Connecting to firmware. Type 'help' for commands..." | ||
make connect-lm32 | ||
) | ||
|
We should be able to detect all these problems.