1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/weact-f411ce: enable automatic reset to bootloader

This commit is contained in:
Benjamin Valentin 2020-06-05 15:53:04 +02:00 committed by Benjamin Valentin
parent 2325dba871
commit 871107e67f
3 changed files with 24 additions and 10 deletions

View File

@ -6,6 +6,12 @@ ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_cdc_acm
endif
ifneq (,$(filter stdio_cdc_acm,$(USEMODULE)))
# The Mask-ROM bootloader provides USB-DFU capability
FEATURES_REQUIRED += bootloader_stm32
USEMODULE += usb_board_reset
endif
ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += mtd_spi_nor
endif

View File

@ -6,5 +6,9 @@ DFU_USB_ID ?= 0483:df11
DFU_FLAGS ?= -a 0 -s 0x08000000:leave
ROM_OFFSET ?= 0x0
# CDC ACM is available faster on STM32
TERM_DELAY ?= 1
# Setup of programmer and serial is shared between STM32 based boards
include $(RIOTMAKE)/boards/stm32.inc.mk
include $(RIOTMAKE)/tools/usb_board_reset.mk

View File

@ -36,21 +36,25 @@ It is available on sites like AliExpress for less than 4€.
## Flashing the device
The device comes with a bootloader that allows flashing via `dfu-util`.
There are two buttons on the board labeled `BOOT0` and `NRST`.
- Press and hold down `NRST` to reset the CPU
- Press `BOOT0` while keeping `NRST` held down
- Release `NRST`, afterwards release `BOOT0`
The board will now show up as `0483:df11` - `STM32 BOOTLOADER` and will accept
firmware using the DFU protocol.
You can upload your RIOT-firmware by typing
If RIOT is already running on the board, you can upload your RIOT-firmware by typing
```
make BOARD=weact-f411ce flash
```
RIOT will make sure to enter the bootloader automatically.
If RIOT crashed or you have the plain board with the stock firmware, you have to enter
the bootloader manually.
There are two buttons on the board labeled `BOOT0` and `NRST`.
- Hold down `BOOT0`
- Shortly press `NRST` to reset the CPU while keeping `BOOT0` held down
The board will now show up as `0483:df11` - `STM32 BOOTLOADER` and will accept
firmware using the DFU protocol.
*Note:* You need to have write permissions to the device.
On Linux you could add yourself to the `plugdev` group and store the following as `/etc/udev/rules.d/99-weact-f411ce.rules`: