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

BUG#lib.rs:847:13: unsupported proc macro punctuation character '{' #866

Closed
jubao4415198 opened this issue Oct 12, 2024 · 2 comments
Closed

Comments

@jubao4415198
Copy link

jubao4415198 commented Oct 12, 2024

执行指令: svd2rust -i ./GD32F4xx.svd
1)我用GD32F4xx.svd试了一下,会报这个错误
2)我通过https://github.com/rust-embedded/svd2rust/issues/581中的svd文件再次测试了一下,任然会出现同样的问题。
所以可以排除svd文件的问题。
软件版本:svd2rust v0.33.4
输出如下

[INFO svd2rust] Parsing device from SVD file [INFO svd2rust] Rendering device thread 'main' panicked at /root/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/proc-macro2-1.0.87/src/lib.rs:847:13: unsupported proc macro punctuation character '{' note: run withRUST_BACKTRACE=1environment variable to display a backtrace


我用二分法排查了一下
似乎只要在xml文件中存在addressOffset标签
<addressOffset>0x4</addressOffset>
就会报这个错误
可能 这个问题与处理addressOffset标签的代码有关?

@jubao4415198 jubao4415198 changed the title BUG#NOW BUG#lib.rs:847:13: unsupported proc macro punctuation character '{' Oct 12, 2024
@jannic
Copy link
Member

jannic commented Oct 12, 2024

That's a known issue, see #863.
As a workaround, you can install svd2rust using cargo install svd2rust --locked.

(Edit: At least I hope that's what your report is about. I don't really understand most of the text, but only the error messages.)

@jubao4415198
Copy link
Author

非常感谢您,如果您在中国的话 我会请你喝一杯瑞幸

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