The _derive processing code attempts to check that the derived-from
register name exists. However, this check currently only handles
relative names within the current peripheral or cluster.
If the name contains a . it is an absolute name, and should be looked
up from device root. However, we cannot currently do this as we don't
have a reference to the Device. Since we are mutating a member of
the device in-place, we will not be able to pass in a device reference
without significant refactoring of the code.
For now this diff simply skips the register name validation if the name
contains a .. This allows users to refer to absolute names for now,
when previously this would always fail.
I included a new unit test that makes use of absolute references.
This also includes some new test utilities for easily checking patch
output against an expected SVD file.
The
_derive
processing code attempts to check that the derived-from register name exists. However, this check currently only handles relative names within the current peripheral or cluster.If the name contains a
.
it is an absolute name, and should be looked up from device root. However, we cannot currently do this as we don't have a reference to theDevice
. Since we are mutating a member of the device in-place, we will not be able to pass in a device reference without significant refactoring of the code.For now this diff simply skips the register name validation if the name contains a
.
. This allows users to refer to absolute names for now, when previously this would always fail.I included a new unit test that makes use of absolute references. This also includes some new test utilities for easily checking patch output against an expected SVD file.
This addresses issue #226.