Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make fails with svd2rust version 0.18.0 #547

Closed
unpaid-bill opened this issue Apr 24, 2021 · 3 comments
Closed

make fails with svd2rust version 0.18.0 #547

unpaid-bill opened this issue Apr 24, 2021 · 3 comments

Comments

@unpaid-bill
Copy link

svd2rust recently released version 0.18.0 which contains some breaking changes. This is the version downloaded and installed when running cargo install svd2rust.
When running make for this crate using this version I am hit with this error:

python3 scripts/makecrates.py devices/ -y --families stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32h7 stm32l0 stm32l1 stm32l4 stm32l5 stm32g0 stm32g4 stm32mp1 stm32wl stm32wb
Going to create/update the following directories:
stm32f0/, stm32f1/, stm32f2/, stm32f3/, stm32f4/, stm32f7/, stm32g0/, stm32g4/, stm32h7/, stm32l0/, stm32l1/, stm32l4/, stm32l5/, stm32mp1/, stm32wb/, stm32wl/
mkdir -p stm32f0/src/stm32f0x8
cd stm32f0/src/stm32f0x8; svd2rust -g -i ../../../svd/stm32f0x8.svd.patched
[ERROR svd2rust] In device `STM32F0x8`

    Caused by:
        0: In peripheral `RCC`
        1: In register `CFGR`
        2: Parsing field #8
        3: In field `MCO`
        4: Value 8 out of range 0..8
Makefile:81: recipe for target 'stm32f0/src/stm32f0x8/mod.rs' failed

Reinstalling version 0.17.0 of svd2rust and rerunning make works as expected.

@adamgreig
Copy link
Member

Thanks for reporting! As you mentioned, this isn't a surprise due to a number of changes in svd2rust; stm32-rs is really tied to one version of svd2rust at a time and we haven't updated yet. There's some open issues and PRs (#539, #540, #544, #546) that starts to solve the problems, so hopefully fixed fairly soon. I'll leave this issue open until it's resolved though to help anyone else running into it.

sirhcel added a commit to sirhcel/stm32-rs that referenced this issue May 28, 2021
Issue stm32-rs#547 mentions this but it would be nice to have this information
in this prominent place.
bors bot added a commit that referenced this issue May 28, 2021
557: Mention actually required version of svd2rust r=adamgreig a=sirhcel

Issue #547 mentions this but it would be nice to have this information in this prominent place. Version 0.17.0 works for me.

Co-authored-by: Christian Meusel <[email protected]>
@ElektroVirus
Copy link

ElektroVirus commented Jun 23, 2021

I also had problems and found out my svd2rust version is 0.19.0. Its logical that it also fails but I still wanted to document it here. Got working with version 0.17.0 as expected.


$ make svd2rust
python3 scripts/makecrates.py devices/ -y --families stm32f0 stm32f1 stm32f2 stm32f3 stm32f4 stm32f7 stm32h7 stm32l0 stm32l1 stm32l4 stm32l5 stm32g0 stm32g4 stm32mp1 stm32wl stm32wb
Going to create/update the following directories:
stm32f0/, stm32f1/, stm32f2/, stm32f3/, stm32f4/, stm32f7/, stm32g0/, stm32g4/, stm32l0/, stm32l1/, stm32l4/, stm32l5/, stm32mp1/, stm32wb/, stm32wl/, stm32h7/
mkdir -p stm32f0/src/stm32f0x0
cd stm32f0/src/stm32f0x0; svd2rust -g -i ../../../svd/stm32f0x0.svd.patched
[ERROR svd2rust] In device `STM32F0x0`
    
    Caused by:
        0: In peripheral `RCC`
        1: In register `CFGR`
        2: Parsing field #8
        3: In field `MCO`
        4: Value 8 out of range 0..8
make: *** [Makefile:82: stm32f0/src/stm32f0x0/mod.rs] Error 1
svd2rust --help
svd2rust 0.19.0 ( )
Generate a Rust API from SVD files
...

@adamgreig
Copy link
Member

This is now fixed after #540.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants