thanks for your feedback/contribution.
Your PR is merged.
To add a custom variant, you took the right approach as described in the Arduino 3rd party Hardware specification:
https://github.com/arduino/Arduino/wiki ... nt-or-tool
About DFU, it is planned to add it. It was already added on an other repo and should be compatible. But I will check your implementation
The official STMicroelectronics Arduino core