embassy-rs / chiptool

Apache License 2.0
37 stars 21 forks source link

Allow specifying path for the `common` module from the outside #33

Open bugadani opened 1 month ago

bugadani commented 1 month ago

This enables chiptool generate --svd atsaml10d14a.svd --common-module super::common and same for gen-block

Dirbaio commented 1 month ago

passing super::common won't work in the general case when you generate things at multiple depths in the module tree. To do it right you'd have to go through relative_path somehow.

bugadani commented 1 month ago

umm that sounds way too much a hassle for this, I guess my example should have been crate::pac::common :)

The hard part is that my use case that I wanted to support here is essentially to cut-and-paste parts of the result into my project, so the module which references common doesn't have a predefined path in chiptool.