4 ms·
I was disappointed when I tried to use svd2rust for the atmel-provided svd's. They unfortunately do not provide reset values for some registers, which causes sv
by yammajr 9y ago
I was disappointed when I tried to use svd2rust for the atmel-provided svd's. They unfortunately do not provide reset values for some registers, which causes svd2rust to panic.
- doctor_stopsign 9y agoI was able to make a hacky fix for that. If you get the `svd2rust` source code and modify `generate.rs` on line 756 you can get it to generate a library file and not panic. There are still a ton of warnings that pop up, and I haven't yet tested it on an MCU but in theory it should work.
- yammajr 9y agoI did exactly the same thing, but I'm not totally happy with it. Good for fooling around with, but not convinced I'd want to push something using it into production without a bit of further investigation.
- ehntoo 9y agoI think the standard approach for crates to work around problems like this is to patch the vendor's XML. Terrible that it's necessary, but workable. The "STM32F103xx.patch" in japaric's stm32f103 support crate [1] seems a decent example of the sort of hacks that are standard. [1] https://github.com/japaric/stm32f103xx/blob/master/STM32F103xx.patch https://github.com/japaric/stm32f103xx/blob/master/STM32F103...