Send command to enter bootloader when flashing

This commit is contained in:
Raphael Assenat 2015-09-09 22:56:21 -04:00
parent b03e20d7cf
commit 0bf5ac3a9c
4 changed files with 12 additions and 0 deletions

View File

@ -35,6 +35,7 @@ $(PROGNAME).hex: $(PROGNAME).elf
fuse:
flash: $(HEXFILE)
./enter_bootloader.sh
./wait_then_flash.sh $(CPU) $(HEXFILE)
chip_erase:

View File

@ -38,6 +38,7 @@ clean:
fuse:
flash: $(HEXFILE)
./enter_bootloader.sh
./wait_then_flash.sh $(CPU) $(HEXFILE)
chip_erase:

9
enter_bootloader.sh Executable file
View File

@ -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

1
tool/99-raphnet.rules Normal file
View File

@ -0,0 +1 @@
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="289b", ATTRS{idProduct}=="0017", MODE="0664", GROUP="plugdev"