Last active
July 19, 2017 09:16
-
-
Save Endilll/d00200154ffac1c31564d5db9e87f159 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -v | |
#init and erase flash | |
echo -ne "mlc_gf15_probe 0 0x061d1135 0x4c4c261c 0x1c12194c 0x000b0204 0x0404000e 0x0400000e 0x08000006\r" > /dev/ttyUSB0 | |
sleep 1 | |
echo -ne "mlc_gf15_eccblockerase 0 0 0 0x140000\r" > /dev/ttyUSB0 | |
sleep 1 | |
echo -ne "urx 0x80000000 $(wc -c ./firmware.bin | awk '{print $1 }')\r" > /dev/ttyUSB0 | |
sleep 1 | |
cat ./firmware.bin > /dev/ttyUSB0 | |
sleep 1 | |
echo -ne "mlc_gf15_eccwrite 0 0 0x0 0x80000000 $(wc -c ./firmware.bin | awk '{print $1 }') 0xb0000000 0x0\r" > /dev/ttyUSB0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment