-
Notifications
You must be signed in to change notification settings - Fork 158
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
SCT0peripheral.CAP14andMATCH14both at address0x138. And both in oneCAP_MATCHalternateGroup.If
alternateGroupis used they must be in different groups. AllCAPxinCAPgroup and allMATCHxinMATCHgroup.So LPC SVDs are bugged. But in this particular example
alternateGroupis 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_groupsfor old behavior.nickray commentedon May 8, 2021
Cool, thanks!