File tree Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -430,20 +430,30 @@ main() {
430
430
# https://raw.githubusercontent.com/riscv-rust/e310x/master/e310x.svd
431
431
)
432
432
433
- target/$TARGET /release/svd2rust --target msp430 -i $td /msp430g2553.svd | \
434
- ( rustfmt 2> /dev/null > $td /src/lib.rs || true )
433
+ local cwd=$( pwd)
435
434
436
- cargo check --manifest-path $td /Cargo.toml
435
+ # Test MSP430
436
+ pushd $td
437
+
438
+ $cwd /target/$TARGET /release/svd2rust --target msp430 -i $td /msp430g2553.svd
439
+ mv $td /lib.rs $td /src/lib.rs
440
+ rustfmt $td /src/lib.rs || true
437
441
438
- target/$TARGET /release/svd2rust --target none -i $td /msp430g2553.svd | \
439
- ( rustfmt 2> /dev/null > $td /src/lib.rs || true )
442
+ popd
440
443
441
444
cargo check --manifest-path $td /Cargo.toml
442
445
443
- # target/$TARGET/release/svd2rust --target riscv -i $td/e310x.svd | \
444
- # ( rustfmt 2>/dev/null > $td/src/lib.rs || true )
446
+ # Test RISC-V
445
447
446
- cargo check --manifest-path $td /Cargo.toml
448
+ # pushd $td
449
+
450
+ # target/$TARGET/release/svd2rust --target riscv -i $td/e310x.svd
451
+ # mv $td/lib.rs $td/src/lib.rs
452
+ # rustfmt $td/src/lib.rs || true
453
+
454
+ # popd
455
+
456
+ # cargo check --manifest-path $td/Cargo.toml
447
457
;;
448
458
449
459
Nordic)
Original file line number Diff line number Diff line change @@ -103,17 +103,11 @@ fn run() -> Result<()> {
103
103
let mut device_x = String :: new ( ) ;
104
104
let items = generate:: device:: render ( & device, & target, nightly, & mut device_x) ?;
105
105
106
+ writeln ! ( File :: create( "lib.rs" ) . unwrap( ) , "{}" , quote!( #( #tokens) * ) ) . unwrap ( ) ;
107
+
106
108
if target == Target :: CortexM {
107
- writeln ! ( File :: create( "lib.rs" ) . unwrap( ) , "{}" , quote!( #( #items) * ) ) . unwrap ( ) ;
108
109
writeln ! ( File :: create( "device.x" ) . unwrap( ) , "{}" , device_x) . unwrap ( ) ;
109
110
writeln ! ( File :: create( "build.rs" ) . unwrap( ) , "{}" , build_rs( ) ) . unwrap ( ) ;
110
- } else {
111
- println ! (
112
- "{}" ,
113
- quote! {
114
- #( #items) *
115
- }
116
- ) ;
117
111
}
118
112
119
113
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments