STM32f103 stlink upload error

I am passing a project from blupill stm32f1103c8t6 to mini maple (128k) for lack of memory and co mini maple gives me errors.
So I tried to upload the example “blink PB1” and I saw that with blue pill it works, while with mini maple it gives me the error: No DFU capable USB device found.
where am i wrong?
connections for mini maple are as follows:
SWCLK pin 21 PA14
SWDIO pin 22 PA13
as env i tried both original mini maple and b20

Expected, since per board documentation the default upload_protocol for the board is dfu. If you want to use stlink uploading, you must declare upload_protocol = stlink, again as noted per documentation, in the platformio.ini.

if I set the upload protocol with st-link it gives me the following error:


Configuring upload protocol…
AVAILABLE: blackmagic, cmsis-dap, dfu, jlink, serial, stlink
CURRENT: upload_protocol = stlink
Uploading .pio/build/maple_mini_origin/firmware.elf
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:27)
Licensed under GNU GPL v2
For bug reports, read
debug_level: 1

target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800016c msp: 0x20005000
** Programming Started **
Warn : STM32 flash size failed, probe inaccurate - assuming 128k flash
Error: stm32x device protected
Error: failed erasing sectors 0 to 10
embedded:startup.tcl:521: Error: ** Programming Failed **
in procedure ‘program’
in procedure ‘program_error’ called at file “embedded:startup.tcl”, line 586
at file “embedded:startup.tcl”, line 521
*** [upload] Error 1

Weird. Try unlocking the chip with OpenOCD (you have an installation of that in C:\Users\<user>\.platformio\packages\tool-openocd or use the official STM32CubeProgrammer tool to try to connect to the chip and erase it to lift the write protection once.

Ok. I reset everything with stm32cubeprogrammer.
Now everything works, but I’m struggling with another kind of problem due to the mcufriend_kvb library, which I’m checking out.
anyway thank you.