embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
5.15k stars 713 forks source link

Guide to add new board support? #206

Open windoze opened 3 years ago

windoze commented 3 years ago

I briefly looked into the source code but failed to find a clear path to add support for new boards (namely Seeedstudio XIAO, which is a tiny SAMD21 based MCU). Would you like to provide some documents or sketch about adding a new board?

Thanks, Chen

derekdreery commented 3 years ago

Until a guide comes along the best thing to do is to take the lib.rs file of an existing board support crate and start from there. You'll want to generate a peripheral access crate from an SVD file if at all possible to use rather than direct register manipulation.

TDHolmes commented 3 years ago

atsamd-rs has PAC crates for SAMD chips already, so should be able to start from there rather than do the SVD generation again

joelsa commented 3 months ago

@jamesmunns added a section on adding new chips recently https://github.com/embassy-rs/embassy/pull/2952