play/rust-embedded/lpc111x-pac/generate.sh

15 lines
270 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
svdtools patch svd/LPC111x.yaml
2024-03-25 06:06:51 +00:00
# Hard to do this in svdtools, easy in sed
sed -E -i 's#<name>(ENUM|test)</name>##' svd/LPC111x.svd.patched
svd2rust -i svd/LPC111x.svd.patched
rm -r src
form -i lib.rs -o src
rm lib.rs
cargo fmt