Last active
August 14, 2023 18:15
-
-
Save sowbug/7595b3a98ace434bfb5de3f62126ac74 to your computer and use it in GitHub Desktop.
Gnuk on ST-Link v2
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
# https://github.com/cabo/stlink | |
# https://blog.danman.eu/2-usb-crypto-token-for-use-with-gpg-and-ssh/ | |
sudo ./upgrade_by_passwd.py -f ../regnual/regnual.bin ../src/build/gnuk-vidpid.bin | |
sudo st-flash erase && st-flash --reset write ~/src/gnuk/src/build/gnuk-vidpid.bin 0x08000000 | |
-- or -- | |
~/src/stlink/build/Debug/st-flash reset && \ | |
~/src/stlink/build/Debug/st-flash erase && \ | |
C8T6HACK=1 ~/src/stlink/build/Debug/st-flash write ~/src/gnuk/src/build/gnuk-vidpid.bin 0x08000000 | |
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x lock 0" -c reset -c exit | |
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c init -c "reset halt" -c "stm32f1x unlock 0" -c reset -c exit | |
./configure --target=BLUE_PILL --vidpid="234b:0000" --enable-factory-reset | |
./configure --target=ST_DONGLE --vidpid="234b:0000" --enable-factory-reset | |
make clean && make build/gnuk-vidpid.elf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment