Pin names with "_" and "-" have the same effective output name in C code (main.h)
I am using STM32CubeMX (Version 6.17.0).
Here is what happened. I created a PIN name "CLK-A". After some troubleshooting, I found a mistake in my pinout definitions. I named the correct pin as "CLK_A". However, I did not delete the "CLK-A" pin.
When the C code was generated for the project, the "CLK-A" pin was defined as "CLK_A" in the output C file. The tool did not flag me that there were two pins with the same effective name. It took me some time to track down the issue. Once I deleted original "CLK-A" pin definition, my design worked.
I added "CLK-A" back to the design on another pin". I got "CLK_A<pin name>" in the "header.h" file. The first pin defined seemed to have priority.


