Hey,
I'm trying to configure and fiddle with Rust for the psoc6 CPU and I seem to have hit some sort of problem.
I downloaded the original psoc6_pac from this git repo: https://github.com/psoc-rs/psoc6-pac and can generate
the modules without problems straight from the repo cargo build --release --features "rt"
although, if I do regenerate modules files by instantiating the generate.sh script it seems that I am hitting a redefinition error
cargo build --release --features "rt"
Compiling psoc6-pac v0.0.1 (/tmp/psoc6-pac)
error[E0428]: the name `FM_CTL` is defined multiple times
--> src/flashc/fm_ctl.rs:75:1
|
3 | pub struct FM_CTL {
| ----------------- previous definition of the type `FM_CTL` here
...
75 | pub type FM_CTL = crate::Reg<fm_ctl::FM_CTL_SPEC>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `FM_CTL` redefined here
|
= note: `FM_CTL` must be defined only once in the type namespace of this module
warning: lint `const_err` has been removed: converted into hard error, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> for more information
--> src/lib.rs:3:9
|
3 | #![deny(const_err)]
| ^^^^^^^^^
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
warning: lint `private_in_public` has been removed: replaced with another group of lints, see RFC <https://rust-lang.github.io/rfcs/2145-type-privacy.html> for more information
--> src/lib.rs:12:9
|
12 | #![deny(private_in_public)]
| ^^^^^^^^^^^^^^^^^
error[E0072]: recursive type `flashc::fm_ctl::FM_CTL` has infinite size
--> src/flashc/fm_ctl.rs:3:1
|
3 | pub struct FM_CTL {
| ^^^^^^^^^^^^^^^^^
4 | #[doc = "0x00 - Flash macro control"]
5 | pub fm_ctl: FM_CTL,
| ------ recursive without indirection
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
5 | pub fm_ctl: Box<FM_CTL>,
| ++++ +
Some errors have detailed explanations: E0072, E0428.
For more information about an error, try `rustc --explain E0072`.
warning: `psoc6-pac` (lib) generated 2 warnings
error: could not compile `psoc6-pac` (lib) due to 2 previous errors; 2 warnings emitted
Edit: No It does not fix it...
Not exactly sure what the fix here is and which package is causing this (svg2rust or form), but it seems that removing the redefinition and setting the
FM_CTL: crate::Reg<fm_ctl::FM_CTL_SPEC>
on line 3 seems to fix the error.
It appears to me that the redefinition on line 76 appears to be for documentation purposes only? Pointers would be nice.
Hey,
I'm trying to configure and fiddle with Rust for the psoc6 CPU and I seem to have hit some sort of problem.
I downloaded the original psoc6_pac from this git repo: https://github.com/psoc-rs/psoc6-pac and can generate
the modules without problems straight from the repo
cargo build --release --features "rt"although, if I do regenerate modules files by instantiating the generate.sh script it seems that I am hitting a redefinition error
Edit: No It does not fix it...
Not exactly sure what the fix here is and which package is causing this (svg2rust or form), but it seems that removing the redefinition and setting the
on line 3 seems to fix the error.
It appears to me that the redefinition on line 76 appears to be for documentation purposes only? Pointers would be nice.