game-and-watch-backup/install_pwnadventure.sh

23 lines
546 B
Bash
Raw Normal View History

2020-11-29 18:30:27 +00:00
#!/bin/bash
2020-12-02 04:14:00 +00:00
source config.sh $1
2020-11-29 18:30:27 +00:00
echo "Installing on internal flash..."
2020-12-02 04:14:00 +00:00
if ! ${OPENOCD} -f openocd/interface_"${ADAPTER}".cfg \
2020-11-29 18:30:27 +00:00
-c "init;" \
-c "halt;" \
-c "program prebuilt/gw_retrogo_nes.elf;" \
-c "exit;" >>logs/5_openocd.log 2>&1; then
echo "Installing on flash failed."
exit 1
fi
echo "Installing data on SPI flash..."
if ! ./scripts/flashloader.sh $ADAPTER prebuilt/gw_retrogo_nes_extflash.bin; then
echo "Installing on SPI flash failed. Check debug connection and try again."
exit 1
fi
echo "Success!"