pistorm/nprog_experimental.sh
Andrew Hutchings 11f6414342 Add checks to buptest and nprog
nprog now checks if emulator is running and gives a much clearer success
/ fail with a log file for the more verbose output.

Also buptest now won't run if emulator is running.
2021-06-28 22:16:58 +01:00

16 lines
340 B
Bash
Executable File

if pgrep -x "emulator" > /dev/null
then
echo "PiStorm emulator is running, please stop it first"
exit 1
fi
echo "Flashing..."
sudo openocd -f ./nprog/68new_experimental.cfg > nprog_log.txt 2>&1
if [ $? -ne 0 ]
then
echo "Flashing failed, please see nprog_log.txt for details"
exit 1
else
echo "Flashing successful!"
fi