-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Description
#506 introduced "alternateGroup support".
In the case of LPC55 (e.g. https://github.com/lpc55/lpc55-pac/blob/d53269c5e87ae5151f780203702b548584dd0610/svd/pack-13.0.0-LPC55S69_cm33_core0.xml) this completely changed the svd2rust API all over the place.
I'm not sure if this was intended/foreseen?
Also not sure if this is a bug of sorts in the SVD; the net effect is it makes a lot of names very long (which I'm tending towards reverting by simply sed-ing out all the alternateGroup lines).
Activity
burrbull commentedon May 2, 2021
Looking at SVD you cite as an example I see incorrect usage of
alternateGroup
.For example
SCT0
peripheral.CAP14
andMATCH14
both at address0x138
. And both in oneCAP_MATCH
alternateGroup
.If
alternateGroup
is used they must be in different groups. AllCAPx
inCAP
group and allMATCHx
inMATCH
group.So LPC SVDs are bugged. But in this particular example
alternateGroup
is not needed at all.The only way to workaround this is to add flag that disables #506 for such files.
It can also be partially fixed if we will check for same register names. And don't use
alternate_group_
prefix if we don't find such registers.burrbull commentedon May 8, 2021
See #516
burrbull commentedon May 8, 2021
You can now use
--ignore_groups
for old behavior.nickray commentedon May 8, 2021
Cool, thanks!