-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support field arrays #13
Comments
arrays of fields are already supported, you use them like this: fieldset/MODER:
description: GPIO port mode register
fields:
- name: MODER
description: Port x configuration bits (y = 0..15)
bit_offset: 0
bit_size: 2
array:
len: 16
stride: 2
enum: MODER |
Sorry, I was not specific enough. I am not talking about merging multiple fields into an array, but instead generating code from an SVD containing a field array already. I've updated my top post to give an example. |
Generating register array(and block array) works seamlessly in https://github.com/andelf/hpm-data The SVD usage should be a <cluster>
<dim>15</dim>
<dimIncrement>0x10</dimIncrement>
<dimIndex>gpioa,gpiob,rsv2,rsv3,rsv4,rsv5,rsv6,rsv7,rsv8,rsv9,rsv10,rsv11,rsv12,gpiox,gpioy</dimIndex>
<name>DO[%s]</name>
<description>no description available</description>
<addressOffset>0x100</addressOffset>
<register>
<name>VALUE</name>
<description>GPIO output value</description>
<addressOffset>0x0</addressOffset>
<size>32</size>
<resetValue>0x00000000</resetValue>
<resetMask>0xFFFFFFFF</resetMask>
<fields>
<field>
<name>OUTPUT</name>
<description>GPIO output register value, each bit represents a bus bit
0: chip pin output low level when direction is output
1: chip pin output high level when direction is output</description>
<bitOffset>0</bitOffset>
<bitWidth>32</bitWidth>
<access>read-write</access>
</field>
</fields>
</register>
.... |
Arrays of registers are currently supported, but the program does not support arrays of fields.
A strinpped-down example of an unsupported field array...
and the resulting error.
Until this is added I can manually modify the SVD file.
It doesn't look like it would take too much to add support for this, but it is late, and I may forget about this before fixing it.
The text was updated successfully, but these errors were encountered: