diff --git a/Makefile b/Makefile index 4c9fd9f..91108ae 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ $(PROGNAME).hex: $(PROGNAME).elf fuse: flash: $(HEXFILE) + ./enter_bootloader.sh ./wait_then_flash.sh $(CPU) $(HEXFILE) chip_erase: diff --git a/Makefile.stk525 b/Makefile.stk525 index 22ed794..d34ade0 100644 --- a/Makefile.stk525 +++ b/Makefile.stk525 @@ -38,6 +38,7 @@ clean: fuse: flash: $(HEXFILE) + ./enter_bootloader.sh ./wait_then_flash.sh $(CPU) $(HEXFILE) chip_erase: diff --git a/enter_bootloader.sh b/enter_bootloader.sh new file mode 100755 index 0000000..3b6f80d --- /dev/null +++ b/enter_bootloader.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +TOOL=./tool/gcn64ctl + +if [ -x $TOOL ]; then + $TOOL -f --bootloader +else + echo $TOOL not found. Please compile it to enter bootloader automatically. +fi diff --git a/tool/99-raphnet.rules b/tool/99-raphnet.rules new file mode 100644 index 0000000..bafa4e3 --- /dev/null +++ b/tool/99-raphnet.rules @@ -0,0 +1 @@ +SUBSYSTEM=="hidraw", ATTRS{idVendor}=="289b", ATTRS{idProduct}=="0017", MODE="0664", GROUP="plugdev"