One step at a time. Why use a WebDFU website to upload the firmware and not PlatformIO? In the project tasks and the taskbar you have “upload” available.
You should start by flashing the generic_boot20_pc13.bin
to the board via an ST-Link (and e.g. ST-Link utility or STM32CubeProgrammer).
If you plug the board in via USB after having flashed the bootloader, you must get a new USB CDC and a “Maple DFU” device in the windows device manager (if using Windows). Otherwise you haven’t flashed it correctly. See e.g. this topic
Then use a platformio.ini like
[env:genericSTM32F103CB]
platform = ststm32
board = genericSTM32F103CB
framework = arduino
board_build.core = maple
upload_protocol = dfu
with a src\main.cpp
code
#include <Arduino.h>
void setup() { pinMode(PC13, OUTPUT); }
void loop() {digitalWrite(PC13, digitalRead(PC13) ^ 1); delay(500); }
for a basic blinky on the builtin PC13 LED. Upload it normally with the “Upload” task.