#!/bin/sh

set -ex

# TODO: You currently need the unreleased version of svd2rust from git for this to work:
# i.e. cargo install --git https://github.com/rust-embedded/svd2rust.git --force svd2rust
svd2rust -i svd/psoc4.svd
rm -rf src
form -i lib.rs -o src/ && rm lib.rs
cargo fmt
