There is no BitWidth field ?
techman-001 opened this issue · 3 comments
Hi,
I make a STM32Fx.SVD Style File which produces Forth Words for a Forth STM32 implementation called Mecrisp-Stellaris, (http://mecrisp.sourceforge.net/) and was very happy to stumble across dslite2svd, as Mecrisp-Stellaris supports the Tiva Connected Launchpad which uses the tm4c129x.
Thank you for making dslite2svd available.
In STM32F SVD's I have the fields "bitOffset" which I think are the equivalent of your "msb" and I have "bitWidth" which your tm4c129x.svd lacks.
Any advice on how to generate the "bitWidth" in your tm4c129x.svd would be appreciated.
P.S. I've tried to install dslite2svd on three Linux distros and FreeBSD but without success, so I'm posting here as I'm now out of ideas.
Cheers,
Terry
This is just a side note not related to how to generate a bitWidth, I'm sure this would be easily implemented.
The SVD schema specifies two ways to show bit positions.
<!-- bitRangeLsbMsbStyle specifies the bit position of a field within a register
by specifying the least significant and the most significant bit position -->
<xs:group name="bitRangeLsbMsbStyle">
<xs:sequence>
<xs:element name="lsb" type="scaledNonNegativeInteger"/>
<xs:element name="msb" type="scaledNonNegativeInteger"/>
</xs:sequence>
</xs:group>
<!-- bitRangeOffsetWidthStyle specifies the bit position of a field within a register
by specifying the least significant bit position and the bitWidth of the field -->
<xs:group name="bitRangeOffsetWidthStyle">
<xs:sequence>
<xs:element name="bitOffset" type="scaledNonNegativeInteger"/>
<xs:element name="bitWidth" type="scaledNonNegativeInteger" minOccurs="0"/>
</xs:sequence>
</xs:group>
So, [bitWidth+bitOffset:bitOffset]
is the same as [msb:lsb]
(I'm unsure about this notiation but I think this is correct)
Pretty much
G'day from Downunder :)
Thanks for the fast response, and my apologies for wasting your time. I had tried computing the BitWidth from the "msb' and 'lsb' a few weeks ago and had problems, but of course you're right and it worked perfectly once I had switched my brain on :) Please consider my issue closed.
Fantastic work, many thanks to you all for Dslite2svd!
Hi Emilgardis, yes it's tp from ##tech40+ :)
I'm not using Rust (directly) , I'm still a Forth addict, but some people (including the team here) have been using Rust to do some great work generating XML or SVD files for MCU's from manufacturers data, and I've been using the XMl and SVD files to generate Forth Words with XLST.
Thanks again,
Cheers, Terry