Skip to content

Conversation

@kenbell
Copy link
Member

@kenbell kenbell commented Dec 29, 2020

Have validated using make smoketest.

Had to adjust gen-device-svd to put a 'read', 'write', 'read-write' suffix when needed, because of this patch:
https://github.com/stm32-rs/stm32-rs/blob/master/peripherals/wwdg/wwdg.yaml

This was resulting in two identical constant declarations for 'Finished' in the Go source. Solved by taking into account this 'usage' field which is set to 'read', 'write' or 'read-write' per the SVD XML schema.

The suffix is only added when there are multiple 'enumeratedValues' sections, indicating there is potential for a naming collision. Otherwise suffix is not added so as to avoid gratuitous changes to symbolic names.

This change requires some environment changes to generate the device/stm32 source:

  • python3 to be installed
  • svdtools to be installed (pip3 install --upgrade --user svdtools)

@kenbell
Copy link
Member Author

kenbell commented Jan 6, 2021

Closing as better approach available in #1557

@kenbell kenbell closed this Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant