Is there any effort yet started to support Cortex-M CPUs from GigaDevice? Specifically the Cortex-M23 part, GD32E230x.
I see there is RIOT support for their GD32VF103 series using RISC-V architecture, but my expectation is that the Cortex-M families would be quite different.
I’m not aware that someone is working on this yet, but I would actually assume them to be very similar - the peripheral drivers can probably be re-used, only the clock setup is likely a bit different (I didn’t check).
Since the GigaDevice peripherals try to be compatible with those from ST on a register level, maybe you could even add support for the GD32 ARM chips to the stm32
family, but I don’t know how big the differences are in practice, but if that would work you could get a lot of supported hardware with very little additional code.
I’ve put together an initial board
and cpu
in this draft PR.
You were right about the GD32VF103 peripheral drivers. They are largely reusable with some minor modifications. I’m pretty confident they can be harmonized with a little work after the initial implementation is complete. I expect this also extends to their other Cortex M3 and M4 devices, once common GD folders in /board
and /cpu
are implemented.
It’s not without complications. There’s more mapping for GPIO alternate functions and pin assignments in this device than what was already templated. Some of the peripherals aren’t as featured as their GD32V versions. Instances of peripherals differ sometimes. TIMERs are the obvious example, but others have some changes too if you examine the registers (I2C0/1, SPI0/1, USART0/1). Some of the peripherals are basically renamed implementations of what exists in the STM32 M0+ parts, but others are wholly different.
The branch I started from was behind with it’s GD32V implementations so I’m still catching-up on the peripherals there.
More to come.