~ruther/avr-device

4a04eb16e35e9a380514214244500f097f300f29 — Rahix 4 years ago 91a69cb
Update instructions for adding a new chip

Mention that it is currently required to add a (possibly empty) patch
file for a new chip.

Fixes: #65
Signed-off-by: Rahix <rahix@rahix.de>
1 files changed, 8 insertions(+), 1 deletions(-)

M README.md
M README.md => README.md +8 -1
@@ 59,7 59,14 @@ cargo +nightly doc --features <chip> --open
### Adding a new Chip
To add a new chip, download the *atdf* from <http://packs.download.atmel.com/> (or [avr-mcu/packs/](https://github.com/avr-rust/avr-mcu/tree/master/packs)) and place it in `vendor/`.  Be sure to name it like the Rust module that should be generated.  Next, you need to integrate it into the base crate and build system.  Follow what was done in commit [290613454fbd ("Add basic support for ATmega64")](https://github.com/Rahix/avr-device/commit/290613454fbdc5e4ac98e53deccaf74dafc88963).  Please adhere to the alphabetical sorting that is present so far.

If patches need to be applied, create a `<chipname>.yaml` in `patch/`. The patching format is documented in the [`svdtools` README](https://github.com/stm32-rs/svdtools#device-and-peripheral-yaml-format).  Ideally, try to reuse the exisiting patches in `patch/common/` or `patch/timer/`.
Next, you **must** create a `<chipname>.yaml` in `patch/` which has at least the following content:
```yaml
_svd: ../svd/<chipname>.svd
```

If more patches need to be applied (most likely!), they should be added into this file as well.  The patching format is documented in the [`svdtools` README](https://github.com/stm32-rs/svdtools#device-and-peripheral-yaml-format).  Ideally, try to reuse the exisiting patches in `patch/common/` or `patch/timer/`.

Finally, try building the crate for your MCU with `make <chipname>`.

## License
*avr-device* is licensed under either of

Do not follow this link