Open JacobBeningo opened 2 weeks ago
Enums generated by ST are broken and have no sense. So we just delete them before pass to svd2rust
.
https://github.com/stm32-rs/stm32-rs/blob/e84479900343fef5f3a4f21a990dcc90a2462565/devices/stm32u575.yaml#L3
You can find generated crates here: https://github.com/stm32-rs/stm32-rs-nightlies/tree/master/stm32u5
Also there is some unmerged pathches: https://github.com/stm32-rs/stm32-rs/pull/974
Awesome! Thanks for the quick reply.
I've done this with many other chips without any issues, including the L475, so it threw me for a loop!
I'll go this route! Thanks again!
When attempting to build the converted STM32U575.svd file into a PAC, I'm getting build errors related to duplicate types.
I'm using:
I did find that the enum size for the following fields needed to be adjusted: TIM1:TIM1_SMCR:SMS1 TIM1:TIM1_SMCR:TS1 TIM1:TIM1_SMCR:SMS2 TIM1:TIM1_SMCR:TS2
I've notified ST about the issue.
The main errors popping up appear to be:
1) error[E0004]: non-exhaustive patterns:
&gpdma_c13tr1::Pam::B0x0
and&gpdma_c13tr1::Pam::B0x1
not covered --> src/gpdma1/gpdma_c13tr1.rs:158:23 | 158 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] | ^^^^^ patterns&gpdma_c13tr1::Pam::B0x0
and&gpdma_c13tr1::Pam::B0x1
not covered2) error[E0592]: duplicate definitions with name {
| ------------------------------------------- other definition for {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for
b_0x0
--> src/gpdma1/gpdma_c14tr1.rs:236:5 | 226 | pub fn b_0x0(self) -> &'a mut crate::Wb_0x0
... 236 | pub fn b_0x0(self) -> &'a mut crate::Wb_0x0