Update how to flash firmware

This commit is contained in:
2022-07-19 10:49:50 +02:00
parent 54d031bc27
commit 9306ad5043
2 changed files with 7 additions and 11 deletions

View File

@@ -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 git clone --recursive https://git.spengler.co.za/deon/gnuk.git gnuk
cd gnuk/src cd gnuk/src
./configure --vidpid=1209:2440 ./configure --vidpid=1337:0010
make make
``` ```
@@ -30,17 +30,9 @@ How to flash the Gnuk firmware
============================== ==============================
In order to flash the firmware ensure that you have openocd installed. 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 Execute openocd and connect with telnet
``` ```
openocd -f stm32f103.cfg openocd -f ../misc/stm32f103.cfg
telnet localhost 4444 telnet localhost 4444
``` ```
@@ -49,7 +41,7 @@ Use the following commands to unlock, flash the firmware and lock the device aga
reset halt reset halt
stm32f1x unlock 0 stm32f1x unlock 0
reset halt reset halt
flash write_bank 0 ./src/build/gnuk.bin 0 flash write_bank 0 ./build/gnuk.bin 0
stm32f1x lock 0 stm32f1x lock 0
reset halt reset halt
``` ```

4
misc/stm32f103.cfg Normal file
View File

@@ -0,0 +1,4 @@
telnet_port 4444
source [find interface/stlink.cfg]
source [find target/stm32f1x.cfg]
set WORKAREASIZE 0x10000