mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-21 06:48:52 -05:00
Makefile 'restart' target
Useful for some tests...
This commit is contained in:
parent
c7e8dc7ad4
commit
158d9bffda
4
Makefile
4
Makefile
@ -58,3 +58,7 @@ chip_erase:
|
||||
|
||||
reset:
|
||||
dfu-programmer atmega32u2 reset
|
||||
|
||||
restart:
|
||||
- ./scripts/enter_bootloader.sh
|
||||
./scripts/start.sh $(CPU)
|
||||
|
21
scripts/start.sh
Executable file
21
scripts/start.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Syntax: ./start.sh CPU"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
CPU=$1
|
||||
|
||||
echo "Polling for chip..."
|
||||
while true; do
|
||||
dfu-programmer $1 start
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Chip found. Started."
|
||||
break;
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user