I have had hands on the CubeMX user label feature for pin assignments and found it very usefull. It was possible to write application code like HAL_GPIO_TogglePin(my_label_GPIO_Port, my_label_GPIO_PIN), and when the pin assignment changed later on, simply regenerating code using CubeMX would redefine the my_label_GPIO_Port and my_label_GPIO_PIN definitions. No changes in application code needed!
Now correct me if I'm wrong, but I believe no such feature is present for full peripherals. Being able to assign a user label to, say, SPI4 would be great. I would be able to do HAL_SPI_Transmit(my_label, buf, len, 0). If I would want to switch from SPI4 to SPI2 I would only need to do so in CubeMX and be sure to give SPI2 the label my_label again. This way again, no changes in application code are needed.
I came across this old thread: STM32CubeMX Feature missing? User labels where the feature is already discussed. Has the feature been implemented for peripheral renaming? Or is renaming pin assignments solely supported?
Thanks in advance.