mirror of
https://github.com/AdaCore/svd2ada.git
synced 2026-02-12 12:27:20 -08:00
gpl2016
Ada arrays have indices in increasing order, so this might lead to confusion.
As an example:
<field>
<name>EWUP2</name>
<description>Enable WKUP2 pin</description>
<bitOffset>7</bitOffset>
<bitWidth>1</bitWidth>
<access>read-write</access>
</field>
<field>
<name>EWUP</name>
<description>Enable WKUP pin</description>
<bitOffset>8</bitOffset>
<bitWidth>1</bitWidth>
<access>read-write</access>
</field>
Would generate otherwise
-- CSR_EWUP array
type CSR_EWUP_Field_Array is array (1 .. 2) of CSR_EWUP_Element
with Component_Size => 1, Size => 2;
...
EWUP : CSR_EWUP_Field_Array (others => 16#0#);
Which is incorrect as EWUP (1) would reference EWUP2, and EWUP (2) would
reference EWUP.
Better fix for issue #38
svd2ada
SVD2Ada is an Ada binding generator from CMSIS-SVD descriptions for ARM Cortex-M devices. It is meant to ease, strengthen and speed up driver development for those platforms.
Languages
Ada
97.2%
HTML
2.6%
Makefile
0.2%