How did you try to set it? You probably needs to edit STM32 package config files.
But if you do not have experience in self-configuring the low-level IDE and programming tools (and according to your questions it seems that you do not) - I would not recommend you to do this
no, you tried an incorrect files. To add a new controller you need to edit the stm32 package file board.txt and maybe the compilation options in platform.txt
With these lines you added a new board to the "pnum" menu, not to main boards list.
I don't very familiar with STM32 package for more detail advices, but you should see the syntax of definitions of the other boards and try to make something similar.
This can't be achieved just with adding a few lines in the config file. You need a package that know about additional serial ports and can works with them.
hw_config.c:(.text.hw_config_init+0xe): undefined reference to SystemClock_Config' HardwareSerial.cpp:(.text._ZN14HardwareSerial5setRxEm+0x48): undefined reference to digitalPin'
HardwareSerial.cpp:(.text._ZN14HardwareSerial5setTxEm+0x48): undefined reference to `digitalPin'
..
ollect2.exe: error: ld returned 1 exit status