Open luzidchris opened 1 year ago
Thanks @luzidchris, do you know if SVD defines limits for the types of those values?
Hi,
I've unfortunately not found any constraints. I assume this is not defined by SVD format because memory mapping is pretty target-specific.
In my case, the Constraint_Error
was raised while calculating an absolute address and therefore my initial idea was to align data types to Unsigned
(defined by Base_Types if I remember correctly). The type is already used for some of the address-related calculations, it's in svd2ada
. And it should ensure that calculations work for all (or at least 99,9999 %) of the existing target architectures (incl. 64-bit).
Maybe we should switch to the Ada2022 Big_Numbers for those values.
Some of the SVD files in
CMSIS_SVD
lead toCONSTRAINT_ERROR
exceptions because typeNatural
is too small to store address values. This can be reproduced for example with M1AGL.svd.The following error is raised by
svd2ada
:In my system (linux 64-bit), type
Natural
has a max value of 2147483647, i.e. 0x7FFFFFFF. As a result of this,svd2ada
fails to process address or size values which are greater than this upper limit.