I'm developing a project with custom hardware and an STM32F103, however, due to lack of stock until next year, I have proceeded with the clone GD32F103CBT6.
One of the problems I'm encountering is the serial port/UART. Another one is that today I uploaded to the GD32 an ESP32 sketch by accident, and now the microcontroller is not found by the ST-Link.
I have tried to use the ST-Link Utility to try to erase its flash, but for some reason it won't work. Is it possible that it got physically damaged? If so, how can I avoid that from happening? I'm trying to use #ifdef
conditions but it won't do what I want (prevent the sketch from being uploaded).