Skip to content

Question on alternateGroup #513

@nickray

Description

@nickray
Contributor

#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

burrbull commented on May 2, 2021

@burrbull
Member

Looking at SVD you cite as an example I see incorrect usage of alternateGroup.
For example SCT0 peripheral.
CAP14 and MATCH14 both at address 0x138. And both in one CAP_MATCH alternateGroup.
If alternateGroup is used they must be in different groups. All CAPx in CAP group and all MATCHx in MATCH 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

burrbull commented on May 8, 2021

@burrbull
Member

See #516

burrbull

burrbull commented on May 8, 2021

@burrbull
Member

You can now use --ignore_groups for old behavior.

nickray

nickray commented on May 8, 2021

@nickray
ContributorAuthor

Cool, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nickray@burrbull

        Issue actions

          Question on alternateGroup · Issue #513 · rust-embedded/svd2rust