Skip to content

Add USB DFU upload method #27

Open
@maxgerhardt

Description

@maxgerhardt

Flashing a GD32F303CC board with the popular STM32Duino USB DFU bootloader, e.g. https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pc13_fastboot.bin, shows that this exact binary works without problems on the board, although it's meant for a STM32F103C8 (which seems to be register-compatible for the USB and GPIO side)

grafik

The device is being recognized via USB and opens the Maple serial as expected.

This should make it possible to add USB DFU uploads for those chips having USB but no built-in USB bootloader, that is for F30x series the 303 chips.

grafik

Important logic in PlatformIO

https://github.com/platformio/platform-ststm32/blob/38e325b59c165c954f6f69c70e0299d36f3b9225/builder/main.py#L206-L265

probably also needs LDScript changes to respect the offset.

Also needs to be implemented for the Arduino IDE.

It should also be investigated what other boards can make use of this USB bootloader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions