svdpatch collect array requires base address as string
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
Start in scripts/svdpatch.py at collect_in_array around line 511, then reproduce the failure with the shown _modify and _array input. Check how addressOffset is parsed before int() is called. Done means numeric base addresses work in the same case while quoted values continue to work.
Written by the indexing model from the issue text.
Description
When running svdpatch against register with modified base address written as number I get the following error:
Traceback (most recent call last):
File "scripts/svdpatch.py", line 883, in <module>
main()
File "scripts/svdpatch.py", line 876, in main
process_device(svd, root)
File "scripts/svdpatch.py", line 855, in process_device
update_fields)
File "scripts/svdpatch.py", line 400, in process_peripheral
p.collect_in_array(rspec, rmod)
File "scripts/svdpatch.py", line 511, in collect_in_array
int(rtag.findtext('addressOffset'), 0)])
TypeError: int() can't convert non-string with explicit base
Makefile:38: recipe for target 'svd/stm32f427.svd.patched' failed
make: *** [svd/stm32f427.svd.patched] Error 1
Input used to generate this error:
OTG_HS_GLOBAL:
_modify:
DIEPTXF3:
addressOffset: 0x10C
_array:
DIEPTXF[12345]: {}
If I put the address in quotes like this: addressOffset: 0x10C everything works fine.
- Dominant language
- Rust
- Stars
- 123
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-embedded/svdtools
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
rust-embedded/svdtools#294 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
rust-embedded/svdtools#293 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
rust-embedded/svdtools#291 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
rust-embedded/svdtools#284 · 9 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
rust-embedded/svdtools#282 · 2 comments ·
All issues in rust-embedded/svdtools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100