Update README

This commit is contained in:
linuswck 2024-03-20 11:55:21 +08:00
parent e9d5f4598a
commit 8431e9f43d
1 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ gdb target/thumbv7em-none-eabihf/release/kirdy
```
## Flashing
There are several options for flashing kirdy. DFU requires only a USB-C cable or RJ45 cable, whereas OpenOCD needs a JTAG/SWD adapter.
If the firmware to be flashed involves an update on the flash settings, it is required to erase the flash settings before flashing the new firmware to avoid unexpected hardware behavior. There are several options for flashing kirdy. DFU requires only a USB-C cable or RJ45 cable, whereas OpenOCD needs a JTAG/SWD adapter.
### dfu-util on Linux
* Install the DFU USB tool (dfu-util).
@ -64,7 +64,12 @@ On a Windows machine install [st.com](https://st.com) DfuSe USB device firmware
- remove jumper
- cycle power to leave DFU update mode
### Erasing Flash Settings
### OpenOCD
```shell
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/debug/kirdy verify reset; exit"
```
## Erasing Flash Settings
The flash settings are stored in the last flash sector(ID: 11) of bank 0 of stm32f405. You can erase it with JTAG/SWD adapter or by putting the device in Dfu mode. You may find it useful if you have set network settings incorrectly.
With JTAG/SWD adapter connected, issue the following command:
@ -78,8 +83,3 @@ With STM32 in DFU Mode, connect the USB Type C cable and then issue the followin
```
dfu-util -a 0 -s 0x080E0000:leave -D erase_flash_settings.bin
```
### OpenOCD
```shell
openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program target/thumbv7em-none-eabihf/debug/kirdy verify reset; exit"
```