ARM-software / CMSIS_5

CMSIS Version 5 Development Repository
http://arm-software.github.io/CMSIS_5/index.html
Apache License 2.0
1.33k stars 1.08k forks source link

SVDConv universal prefix on peripheral derived from other peripherals #1115

Open conkerkh opened 3 years ago

conkerkh commented 3 years ago

Suppose we have two UARTS: UART0 and UART1, UART1 will derive from UART0.

When SVD Conv generates header files, peripherals that derive from others will all have a prefix named after first peripheral; something like UART0_TypeDef, macros will start with UART0 etc. It's quite strange to have UART0_Type for UART1. I think that SVD Conv could detect it has multiple derivatives of one peripheral, in many cases they will be numbered as UART0, UART1, UART2 and so on. Simply using UARTx as a prefix would be much more readable and logical here.

jkrech commented 3 years ago

Hello, have you tried specifying a see: https://arm-software.github.io/CMSIS_5/SVD/html/elem_peripherals.html#elem_peripheral Regards, Joachim

conkerkh commented 3 years ago

I checked it and I think headerStructName mostly does what I want. However macros will still have peripheral prefix instead of using headerStructName, I belive the behaviour should be either to use the same headerStructName with macros, or define headerMacroName.