japaric-archived / cu

Testing ground for the Copper book (http://japaric.github.io/copper/).
Apache License 2.0
58 stars 1 forks source link

Generate register block accessors from SVD files #36

Closed japaric closed 7 years ago

japaric commented 8 years ago

Ideally: the output (Rust structs) of the generator should be "fairly" customizable and the generator should work on stable Rust. This means that the "generator" could simply be a SVD parser plus utility functions to generate Rust structs.

@dzamlo is experimenting with this idea in this repository. Disclaimer: I haven't checked the repository in detail, but I'll leave some comments after I do.

dzamlo commented 8 years ago

I'd like to add that the SVD could also help with generating the vector table: the interrupts of the peripherals are listed in the SVD (with a name, a description and the interrupt number)

japaric commented 8 years ago

There's an SVD parser here: https://github.com/japaric/svd

japaric commented 7 years ago

svd2rust is a thing now.