There was a problem loading the project onto the STM32F103C8T6 (bluepill) board. The STM32duino-bootloader bootloader is uploaded to it.
Used by VSCode + PlatformIO. The firmware is loading through the microUsb of the board itself.
When creating a LED flashing project using the arduino framework, everything is loading and works.
platformio.ini
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
upload_protocol = dfu
task output
…
Configuring upload protocol…
AVAILABLE: blackmagic, dfu, jlink, serial, stlink
CURRENT: upload_protocol = dfu
Looking for upload port…
Auto-detected: COM3
Uploading .pio\build\genericSTM32F103C8\firmware.bin
maple_loader v0.1
Resetting to bootloader via DTR pulse
Searching for DFU device [1EAF:0003]…
Found it!
Opening USB Device 0x1eaf:0x0003…
Found Runtime: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name=“STM32duino bootloader v1.0 Upload to Flash 0x8002000”
Setting Configuration 1…
Claiming USB DFU Interface…
Setting Alternate Setting …
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0400
bytes_per_hash=398
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
error resetting after download: usb_reset: could not reset device, win error: Указано несуществующее устройство.
Done!
Resetting USB to switch back to runtime mode
================ [SUCCESS] Took 8.61 seconds ================
When creating a LED flashing project using the mbed framework, an error occurs when loading.
platformio.ini
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = mbed
upload_protocol = dfu
task output
…
Configuring upload protocol…
AVAILABLE: blackmagic, dfu, jlink, serial, stlink
CURRENT: upload_protocol = dfu
Uploading .pio\build\genericSTM32F103C8\firmware.bin
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Match vendor ID from file: 1eaf
Match product ID from file: 0003
No DFU capable USB device available
*** [upload] Error 74
=============== [FAILED] Took 6.40 seconds ===============
Where is the mistake? How to upload a project to the board?