> Unfortunately, the patch was not accepted. I don't know why exactly It's explained in the review comment from Tomas Vanek:
Thanks for the patch. Unfortunately the flash driver is a copy of stm32 original with a couple of changes. We cannot accept such huge duplicity of code. Imagine we would had one (or more) flash driver for each of numerous STM32 clones: GD32, MM32, AT32, APM32, CS32, CH32 and probably others. How we would maintain such code? Please check if APM32 could be supported by stm32 flash drivers. If you propose some changes to the driver code, always comment that the code is relevant to APM32 or whatever variant. Don't forget to update doc/openocd.texi As a starting point take a look at 7110: Add support for Geehy Cortex-M0+ controllers proposed by Paul Fertser on the user mailing list | https://review.openocd.org/c/openocd/+/7110 (the commit msg is also wrong) The support of 'variant' devices was discussed in 6543: add GigaDevice GD32Exxx flash driver | https://review.openocd.org/c/openocd/+/6543