TARGET=max78000
all: patch generate format
patch:
svdtools patch svd/$(TARGET).yaml svd/$(TARGET).svd.patched
generate:
svd2rust --target=cortex-m --reexport-core-peripherals -i svd/$(TARGET).svd.patched -o .
rm -r src
form -i lib.rs -o src/
rm lib.rs
format:
cargo fmt --all
.PHONY: all patch generate format