raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.24k stars 837 forks source link

Access tags are missing on register level in the SVD file #352

Open atanasuzunov opened 3 years ago

atanasuzunov commented 3 years ago

According CMSIS SVD specification, the \ tag is mandatory on register level:

"If the elements \, \, \, and \ have not been specified on a higher level, then these elements are mandatory on register level."

That causes side effects with some IDEs. If a register contains mixed read-write and read-only fields, a proper implementation could be: defining the register as read-write, and then overriding the access type with a read-only \ tag on the field level.

lurch commented 3 years ago

I was initially confused by this report of "access tags being missing", so I checked and they are present on the field-level, just not at any higher-levels.

@atanasuzunov I guess as a temporary workaround (until we fix this) you could edit your SVD file to define a default read-write access tag at the device level?

@kilograham Assign this to me please.

Hmmm, looks like we're missing resetMask tags too, perhaps that was added to the SVD spec after I wrote the SVD-creation tool? Or maybe I just never noticed the sentence saying "these elements are mandatory"? :shrug: BTW I'm fairly sure the SVD file did pass the SVDConv checks when I wrote the SVD-creation tool.

kilograham commented 2 years ago

bump

kilograham commented 1 year ago

is this fixed?

lurch commented 1 year ago

Nope, I don't think so. And it should probably be reassigned to @andygpz11 as I believe he's looking after the SVD-generation code now?

lurch commented 6 days ago

Reassigning to @matiasilva as I think he might have been looking at the SVD stuff most recently?