mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/sipeed-longan-nano: default to flashing via DFU
This commit is contained in:
parent
2492e21766
commit
15dfaddeb5
@ -12,3 +12,7 @@ OPENOCD_DEBUG_ADAPTER ?= ftdi
|
||||
OPENOCD_FTDI_ADAPTER ?= openocd-usb
|
||||
OPENOCD_TRANSPORT = jtag
|
||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST = 1
|
||||
|
||||
# DFU programmer specific variables
|
||||
DFU_USB_ID ?= 28e9:0189
|
||||
DFU_USE_DFUSE ?= 1
|
||||
|
@ -1 +1,2 @@
|
||||
PROGRAMMER ?= dfu-util
|
||||
include $(RIOTBOARD)/common/gd32v/Makefile.include
|
||||
|
@ -64,26 +64,39 @@ MCU pins and their configuration in RIOT.
|
||||
| PB1 | | | LED2 |
|
||||
| PB5 | | | LED0 |
|
||||
|
||||
## Flash the board
|
||||
## Flashing the Device
|
||||
|
||||
The board is flashed via a JTAG interface with OpenOCD (at least [release version 0.12.0]
|
||||
### Using the DFU bootloader
|
||||
|
||||
The board is flashed via the in-ROM DFU bootloader by default.
|
||||
To enter bootloader mode, hold the BOOT0 button while pressing the RESET button.
|
||||
|
||||
```
|
||||
BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
```
|
||||
|
||||
After flashing you need to leave bootloader mode again by pressing the RESET button.
|
||||
|
||||
### Using an external debug adapter
|
||||
|
||||
The board can also be flashed via a JTAG interface with OpenOCD (at least [release version 0.12.0]
|
||||
(https://github.com/openocd-org/openocd/tree/9ea7f3d647c8ecf6b0f1424002dfc3f4504a162c)).
|
||||
By default, an FTDI adapter according to the configuration defined in
|
||||
[`interface/openocd-usb.cfg`]
|
||||
(https://github.com/openocd-org/openocd/blob/9ea7f3d647c8ecf6b0f1424002dfc3f4504a162c/tcl/interface/ftdi/openocd-usb.cfg)
|
||||
is assumed.
|
||||
```
|
||||
BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
PROGRAMMER=openocd BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
```
|
||||
To use an FTDI adapter with a different configuration, the configuration can be
|
||||
defined using the variable `OPENOCD_FTDI_ADAPTER`, for example:
|
||||
```
|
||||
OPENOCD_FTDI_ADAPTER=tigar BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
PROGRAMMER=openocd OPENOCD_FTDI_ADAPTER=tigard BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
```
|
||||
If another adapter is used, it can be specified using variable
|
||||
`OPENOCD_DEBUG_ADAPTER`, for example for a Segger J-Link adapter:
|
||||
```
|
||||
OPENOCD_DEBUG_ADAPTER=jlink BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
PROGRAMMER=openocd OPENOCD_DEBUG_ADAPTER=jlink BOARD=seeedstudio-gd32 make -C examples/hello-world flash
|
||||
```
|
||||
|
||||
## Accessing STDIO via UART
|
||||
|
Loading…
Reference in New Issue
Block a user