Odrive firmware on hoverboard motherboard GD32F403RCT6 w/ 64k of RAM? ($30 2 Channel)

While I’m waiting on an Odrive 56v to come in, I was looking at hardware I had sitting around.

I have a YST hoverboard motherboard sitting around ($30 ebay and comes with sensors that might could get used elsewhere).

It has a GD32F403RCT6 (actually AT32F403RCT6) which is an M4 chip, but only 64k of RAM (256k flash is good).
And I have a schematic of the board layout. I haven’t tried it with the hoverboard-firmware’s on Github b/c they use a STM32F1 (a M3 chip).

It looks like stock Odrive firmware is 99k of RAM so I need to see what can get trimmed. I would give up USB, oscope, etc.

If anyone is interested I can post schematics.

Hello jebc,
Cool that you are trying to port it to another chip. More so than the schematic, it would be nice if you can share how the experience of porting goes. It’s probably bit out of my abilities but I was thinking something like stm32f7 port, adding Ethercat. Anyways good luck on your adventure.


  • .ccmram :
  • .ccmram (NOLOAD):

This commit causes memory (bss) to balloon. Found it with git bisect.

I first commented out USB, but that only saved 3k (bss).

I haven’t tested it (yet), but gets memory to 33.4k…

I was wrong – Ram is data + bss. Still at 100k. Will keep working.