Closed explicite closed 3 years ago
Hmm, Rahix/atdf2svd#6 is the main blocker I think. I don't think it is well documented what needs to be done, though :(
@Rahix after svd generation what I should do? How I can path svd? Now I'm getting
aw@node ~/s/avr-device> svd2rust -i svd/atmega4809.svd
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: In peripheral `EVSYS`
Caused by:
0: In register `STROBE`
1: Parsing field #0
2: In field `STROBE0`
3: Parsing enumerated value #0
4: In enumerated value `EV_STROBE_CH0`
5: Expected content in <description> tag, found none', /home/jpaw/.cargo/registry/src/github.com-1ecc6299db9ec823/svd2rust-0.17.0/src/main.rs:96:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Maybe I need to continue https://github.com/Rahix/avr-device/issues/26#issuecomment-679831658 ?
Hmm, if you remove said <description>
tag entirely, does that help? I think that might be another issue in atdf2svd
...
Without <description>
pass. Three files generated: build.rs
, device.x
and lib.rs
.
atdf2svd
?lib.rs
in to different files and dirs like for other?I think the right thing is option 1: atdf2svd
should emit correct SVD even for broken ATDF files. This would mean not emitting empty <description>
tags under any circumstances.
The internal representation in chip.rs
already allows setting description
to None
. I suspect we need to add an explicit check that does this in case the ATDF contains an empty description string.
For the rest, take a look at this commit: 290613454fbdc5e4ac98e53deccaf74dafc88963
You need to do all these things, too.
I've created issue Rahix/atdf2svd#11 to track this.
PR for Rahix/atdf2svd#11 done I made same changes https://github.com/Rahix/avr-device/commit/290613454fbdc5e4ac98e53deccaf74dafc88963 and pushed
Still not sure how I can create patched version of svd and then generate .rs
files
Still not sure how I can create patched version of svd and then generate .rs files
Looks like I need to spend more time on this chip. Require probably same changes as in https://github.com/Rahix/avr-device/issues/26#issuecomment-679831658
@Rahix can you please advice which topic in atdf2svd I should progress