From 9306ad50435aa8aaa7df73a26df6c7fc23d24f21 Mon Sep 17 00:00:00 2001 From: Deon Spengler Date: Tue, 19 Jul 2022 10:49:50 +0200 Subject: [PATCH] Update how to flash firmware --- README.md | 14 +++----------- misc/stm32f103.cfg | 4 ++++ 2 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 misc/stm32f103.cfg diff --git a/README.md b/README.md index 7b5ad93..e8b8063 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ To clone the source code and compile, use the following commands. ``` git clone --recursive https://git.spengler.co.za/deon/gnuk.git gnuk cd gnuk/src -./configure --vidpid=1209:2440 +./configure --vidpid=1337:0010 make ``` @@ -30,17 +30,9 @@ How to flash the Gnuk firmware ============================== In order to flash the firmware ensure that you have openocd installed. -Now create a file called stm32f103.cfg with the following content -``` -telnet_port 4444 -source [find interface/stlink.cfg] -source [find target/stm32f1x.cfg] -set WORKAREASIZE 0x10000 -``` - Execute openocd and connect with telnet ``` -openocd -f stm32f103.cfg +openocd -f ../misc/stm32f103.cfg telnet localhost 4444 ``` @@ -49,7 +41,7 @@ Use the following commands to unlock, flash the firmware and lock the device aga reset halt stm32f1x unlock 0 reset halt -flash write_bank 0 ./src/build/gnuk.bin 0 +flash write_bank 0 ./build/gnuk.bin 0 stm32f1x lock 0 reset halt ``` diff --git a/misc/stm32f103.cfg b/misc/stm32f103.cfg new file mode 100644 index 0000000..5c4b846 --- /dev/null +++ b/misc/stm32f103.cfg @@ -0,0 +1,4 @@ +telnet_port 4444 +source [find interface/stlink.cfg] +source [find target/stm32f1x.cfg] +set WORKAREASIZE 0x10000