You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to integrate svd2rust into my build.rs script and followed the cargo book
I write the output of svd2rust into $OUT_DIR/gen_lib.rs and my lib.rs looks like the following:
include!(concat!(env!("OUT_DIR"),"/gen_lib.rs"));
but this doesn't compile.
Just having the following content in gen_lib.rs
#![no_std]
leads to the following error:
error: an inner attribute is not permitted in this context
--> /Users/stefan/Development/k64/demo/target/debug/build/demo-77105b19538eb740/out/lib.rs:1:1
|
1 |#![no_std]| ^^^^^^^^^^
|
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them.
error: expected item after attributes
--> /Users/stefan/Development/k64/demo/target/debug/build/demo-77105b19538eb740/out/lib.rs:1:10
|
1 |#![no_std]| ^
error: aborting due to 2 previous errors
this is also one of severals errors I get when I try to use the gen_lib.rs generated by svd2rust.
Is there any way to get this working?
The text was updated successfully, but these errors were encountered:
I don't think svd2rust is meant to be used in this way. Doing this requires all users of the PAC to build svd2rust and sit through it processing the SVD (which can take some time), in addition to the already long compile times of the PACs themselves.
I am trying to integrate svd2rust into my build.rs script and followed the cargo book
I write the output of svd2rust into
$OUT_DIR/gen_lib.rs
and mylib.rs
looks like the following:but this doesn't compile.
Just having the following content in
gen_lib.rs
#![no_std]
leads to the following error:
this is also one of severals errors I get when I try to use the
gen_lib.rs
generated by svd2rust.Is there any way to get this working?
The text was updated successfully, but these errors were encountered: