Add support for SVD dimIndex parsing#508
Conversation
Peripheral and field tests with DimElementGroup failing now Removed one invalid test with register DimElementGroup
Update existing tests to pass
- added - formatting changes - removed debug sqlite db generation
mattnite
left a comment
There was a problem hiding this comment.
Looks good to me, just get the fixes that @Grazfather has suggested in. It looks like this changes the generated code for esp which will need updating, when I have time I could try to add that to the PR for you tomorrow.
For the stm32 CI failure all you need to do is run zig build -Dgenerate in the port/stmicro/stm32 directory and commit the changes.
Fixed typo in the error name. Simplified dim null check
|
@mattnite The changes do not look good for stm32 now, for example SQR1 is definitely different now. What to do about that specifically? I added the commit here but I believe the stm32 builds will be broken now. |
This reverts commit 49e3506.
…nce fields cannot be arrays"
|
@zovko apply this patch and it should fix the last CI failure. It looks like the old code was trying its best to make repeated registers into arrays, and so I changed some registers to use |
|
@mattnite Should that patch even be done? It doesn't sound right to update the vendor SVD with local changes. What would be the reason to change the registers from sequence to array? This can also easily introduce bugs if the I would even advise to update the SVD file itself for C3. Latest version is version 18 (link) while the current SVD file in the repo is version 8. I would rather update the examples than the SVD itself to make the examples compile. Also, with SVD modification it will also break the direct link to the documentation, for example: Documentation can be easily searchable for |
|
Yes it's okay to apply this patch. I want to get this functionality into Regz, and we'll eventually move over to directly fetching those SVD files from that repo. |
|
@mattnite applied the patch to C3 SVD |
DimElementGroup support for peripheral, register and field types (without
dimName)New features:
%sparsing) for DimElementGroupregisterandfieldtypes. register dim description field dim description%scan be anywhere in string,dimIndexmust be defined.[%s]parsing) forDimElementgroupperipheralandregisterperipheral dim description[%s]must be at the end of the stringChanged implementation:
DimElementGrouparray type.elements.dim_increment * 8) != sizeremoved. This is not always true, specifically for list types.Note: This heavily breaks esp examples, rasperrypi seems to still compile.
Partially solves #220
Still to implement:
dimName,displayNamedimIndex