esp-rs / esp-pacs

Peripheral Access Crates for Espressif SoCs and modules
Apache License 2.0
103 stars 29 forks source link

`README.md` should mention when to use `common_patches` directory and discuss patching conventions #226

Closed jessebraham closed 3 months ago

jessebraham commented 5 months ago

Since we've now changed the workflow slightly, the README.md should be updated accordingly. It should be clear to users who have never contributed before how to write patches and where to place them.

Are the common patches common to all devices? What should users do in cases of exceptions? What if patches are common to only a couple devices, do they still belong in this directory? Are we differentiating these from patches which apply to all chips in any way?

cc @MabezDev @burrbull

burrbull commented 5 months ago

those parches are just some general rule blocks, that can be _include'd in main yaml or one in another. one or more times

jessebraham commented 4 months ago

those parches are just some general rule blocks, that can be _include'd in main yaml or one in another. one or more times

I understand that, but it may not be clear when or why to utilize these to new contributors, or the things to watch out for when doing so (having a peripheral mentioned twice in a patch file causes strange results, for instance), and I would like the entire process to remain documented like it had been the entire existence of this repository prior to merging those changes.

burrbull commented 4 months ago

When https://github.com/rust-embedded/svdtools/pull/229 is merged you could see how entire patch YAML looks with all rules _include'd with:

svdtools expand-patch /path/to/yaml