I would like to propose a change to how vendor HALs and peripheral modules are treated in RIOT. Currently these live in the cpu and board folders. I believe that it would lower maintenance and encourage re-usability if they were treated as regular drivers and pkgs modules and existed in those folders.
I believe some existing Makefiles could be simplified if this change were to happen. I also suspect this would lower the barrier to adding new CPUs.
This would also open up the opportunity for code re-use between STM32 and GigaDevices.
You don’t need to re-structure the CPU directory for that, just move the periph driver to a cpu/stm32_gd32_common folder if they implement the same register interface. We could also move some cortexm_common code to a xmsis_common to support NMSIS RISC-V MCUs (if that makes sense, it’s only little code and the names are not the same).
When adding support for the gd32v devices (the RISC-V variants), I went with a separate directory and module for the peripheral drivers as there was no guarantee that the peripherals would be an exact match. The other argument was that merging them made development on peripherals more complicated as the register names would not match with the datasheets, either on the stm32 or the gd32v side.
Then again most peripheral implementations could simply be copied over from the stm32 counterpart, having only to modify the register names and the interrupt handling