if you have to buy another board go for stm32f401CCu or f411CEu "pill boards" - so called 'black pill' - but careful, there are stm32f103 ones floating around.
they need to specifically state STM32F401>CC<U (STM32F401CC) or STM32F411>CE<U (STM32F401CE).
Check the specs on ST's web site.
https://stm32-base.org/boards/
https://www.st.com/en/microcontrollers- ... 401cc.html
https://www.st.com/en/microcontrollers- ... 411ce.html
Preferably, just go for Nucleo STM32F401RE or Nucleo STM32F411RE.
Those list among the supported boards - STM32F401RE or F411RE has plenty of resources and pins
https://github.com/stm32duino/Arduino_C ... -64-boards
There are faster chips like the STM32F405RG or STM32F407VE or STM32F407VG boards.
for sure they cost more e.g.
Adafruit Feather STM32F405 Express
https://www.adafruit.com/product/4382
PYboard (with STM32F405RG) - MicroPython
https://store.micropython.org/product/PYBLITEv1.0
Olimex STM32-H405 - note get the original ST one.
https://www.olimex.com/Products/ARM/ST/STM32-H405/
for the STM32F407VE and VG boards, you could try searching in the online "flea markets" alix/amazon/ebay etc. with those part numbers
these are 168 Mhz chips with that 'ART Accelerator' (i.e. on chip cache) and FPU (single precision)
I'd guess it may be possible to "squeeze" stm32duino into a C6, but I'd leave it to you if you want to confront the challenge.
It mostly has to do with selecting the 'right' optimizations e.g. select -Os smallest, and omitting as many peripherals as possible.
e.g. do without usb-serial.