hackndev / zinc

The bare metal stack for rust
zinc.rs
Apache License 2.0
1k stars 100 forks source link

How to add support to new boards? #386

Closed tengyifei closed 7 years ago

tengyifei commented 8 years ago

Interested in adding one for Teensy (MK20DX256) and for STM Discovery (STM32F746NG).

farcaller commented 8 years ago

The project is in a very big mess for a very long time since I can't dedicate enough personal time to it. There are a few pain points:

The way to progress as I see it is to use boxed traits on stack, provided we reserve enough bytes for the magic. I've seen that done in other rust projects and it sounds like a good way to solve the issues I've faced in PT design. That will allow to use dynamic trait dispatch for HAL layer (not as effective as I'd want it to be, but simpler to move forward).

So, in regards to supporting new boards—there's little that could be done right now. There are no common traits between the platforms.

If you want to experiment—I'm ok with PRs that add functional traits for gpio, uart, spi that would work between platforms. You will need to use the new ioreg and define the full platform ioregs, and at least provide the initialisation sequence.

mcoffin commented 7 years ago

I'm going to close this as the question has been answered. Feel free to re-open if you're still needing help, but I'm trying to clean up our waffle.io board.