-
Notifications
You must be signed in to change notification settings - Fork 37
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
Handle inheritance of <debug> element attributes #233
base: main
Are you sure you want to change the base?
Conversation
It seems we are going to have to fix CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase for CI to run?
207dda6
to
4b8312b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is that the changes to the Debug
struct makes it an API change.
@jnkr-ifx: What software are you using this change with?
@mathias-arm I don't think this is a public API change -- the cmsis-pack-manager/rust/cmsis-pack/src/pdsc/mod.rs Lines 14 to 17 in f1cadeb
I'm using this with probe-rs's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
little nit, otherwise looks fine by me.
The spec states: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_family_pg.html#element_debug > Multiple debug elements can be defined which are either specific to a > processor identified by attribute Pname, or which apply to all > connections. The current implementation did not handle this correctly: it only looked for a single debug element defined on either the device or subfamily. Iif the innermost debug element does not have the attribute we're looking for, we need to check debug elements on parent elements as well. This patch is necessary to correctly parse PSOC 6 CMSIS packs.
The previous implementation failed to parse this: <accessportV2 __apid="0" address="0xF0000000" /> <accessportV2 __apid="1" address="0xF0002000" />
f1cadeb
to
0cd277e
Compare
The spec states: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/pdsc_family_pg.html#element_debug
The current implementation did not handle this correctly: it only looked for a single debug element defined on either the device or subfamily. Debug attributes can be defined on the family as well; and if the innermost debug element does not have the attribute we're looking for, we need to look at debug elements on parent elements rather than assuming it's undefined.
This patch is necessary to correctly parse PSOC 6 CMSIS packs, which define debug elements at the family level and define additional attributes at more specific levels: