Open BostonBoston opened 3 months ago
Here's a branch with a quick fix as we discussed on discord: https://github.com/EmbeddedNim/svd2nim/tree/ignore_multiple_enums
Seems not to crash. Try it out and let me know
Yes this did seem to do the trick for now.
I merged the fix for the svd2nim crash, but re-opening this, because the Nim file generated by svd2nim for the stm32f429 SVD file does not compile. Running nim check
on it produces the following output:
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(440, 3) Error: attempt to redefine: 'BCR1'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(2061, 3) Error: attempt to redefine: 'DIEPTXF0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(2340, 3) Error: attempt to redefine: 'DIEPCTL0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(2355, 3) Error: attempt to redefine: 'DOEPCTL0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3217, 3) Error: attempt to redefine: 'DIEPCTL0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3219, 3) Error: attempt to redefine: 'DIEPTSIZ0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3244, 3) Error: attempt to redefine: 'DOEPCTL0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3246, 3) Error: attempt to redefine: 'DOEPTSIZ0'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3831, 7) Error: field initialized twice: 'BCR1'
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3831, 7) Error: undeclared field: 'BCR1' for type stm32f429.FMC_Type [type declared in C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(435, 6)]
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3826, 22) Error: expression '' has no type (or is ambiguous)
C:\Users\Francis\source\svd2nim\output_new\stm32f429.nim(3826, 22) Error: illformed AST:
SVD file: https://github.com/tinygo-org/stm32-svd/blob/main/svd/stm32f429.svd Output:
This caused by field HSIRDY, which is a child of RCC.CR