From 4a04eb16e35e9a380514214244500f097f300f29 Mon Sep 17 00:00:00 2001 From: Rahix Date: Thu, 26 Nov 2020 13:27:15 +0100 Subject: [PATCH] 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 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c843cf6..9c35871 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,14 @@ cargo +nightly doc --features --open ### Adding a new Chip To add a new chip, download the *atdf* from (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 `.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 `.yaml` in `patch/` which has at least the following content: +```yaml +_svd: ../svd/.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 `. ## License *avr-device* is licensed under either of -- 2.49.0