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

Error has low context when parsing presumably invalid XML #514

Closed
hegza opened this issue May 6, 2021 · 2 comments
Closed

Error has low context when parsing presumably invalid XML #514

hegza opened this issue May 6, 2021 · 2 comments

Comments

@hegza
Copy link

hegza commented May 6, 2021

Preconditions:

We have an experimental SVD generator that produces presumably incorrect CMSIS-SVD XML: file.svd.

What I did

Compiled svd2rust from master branch in debug mode, then executed:

RUST_LOG=trace ./svd2rust -i file.svd --log=trace --target=riscv

with all combinations of RUST_LOG & --log for good measure. Additionally, same results reproduce with svd2rust from cargo install svd2rust.

Output

[ERROR svd2rust] expected ,

Expected output

More context. Like, possibly a line number or more debug/trace. Discussion on Rust Embedded at Matrix yields that likely source is svd-parser itself or the error interface to it. Example output:

[TRACE svd2rust] parsing line 56
[ERROR svd2rust] expected ',' on line 56

@burrbull
Copy link
Member

burrbull commented May 8, 2021

Related to rust-embedded/svd#18

@burrbull
Copy link
Member

Parsing errors now much better.
Reopen if still actual.

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

2 participants