Merge #4
4: added helper script r=robamu a=robamu Script automates all steps to generate the PAC Co-authored-by: Robin Mueller <robin.mueller.m@gmail.com>
This commit is contained in:
commit
f1cda700d2
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Helper script to automate all steps for PAC generation
|
||||||
- Added badges for README
|
- Added badges for README
|
||||||
|
|
||||||
## [v0.1.0]
|
## [v0.1.0]
|
||||||
|
21
gen-helper.sh
Executable file
21
gen-helper.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Use installed tool by default
|
||||||
|
svd2rust_bin="svd2rust"
|
||||||
|
# Automates the steps specified in https://docs.rs/svd2rust/0.19.0/svd2rust/
|
||||||
|
if [ -f svd2rust ]; then
|
||||||
|
# If the local directory contains svd2rust, use that version instead
|
||||||
|
svd2rust_bin="./svd2rust"
|
||||||
|
elif [ -f ../svd2rust ]; then
|
||||||
|
# Keeps the repository clean
|
||||||
|
svd2rust_bin="../svd2rust"
|
||||||
|
fi
|
||||||
|
if [ -x "$(${svd2rust_bin} --version)" ]; then
|
||||||
|
echo "No svd2rust found locally or installed." \
|
||||||
|
"Install it with cargo install svd2rust"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
${svd2rust_bin} -i va108xx.svd
|
||||||
|
rm -rf src
|
||||||
|
form -i lib.rs -o src/ && rm lib.rs
|
||||||
|
cargo fmt
|
Reference in New Issue
Block a user