MBED Custom target for STM32F405RGT6 Throwing Undefined symbol messages

Setting up a custom target for STM32F405RGT6, followed the custom board porting procedure found in Porting custom boards - Porting | Mbed OS 6 Documentation but we continuously receive the following errors:

[Warning] @0,0: L3912W: Option ‘legacyalign’ is deprecated.
[Error] @0,0: L6218E: Undefined symbol PinMap_UART_CTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
[Error] @0,0: L6218E: Undefined symbol PinMap_UART_RTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
Warning: L3912W: Option ‘legacyalign’ is deprecated.
Error: L6218E: Undefined symbol PinMap_UART_CTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
Error: L6218E: Undefined symbol PinMap_UART_RTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
Finished: 0 information, 1 warning and 2 error messages.
[ERROR] Warning: L3912W: Option ‘legacyalign’ is deprecated.
Error: L6218E: Undefined symbol PinMap_UART_CTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
Error: L6218E: Undefined symbol PinMap_UART_RTS (referred from BUILD/MTS_MDOT_F405RGT6/ARMC6/mbed-os/targets/TARGET_STM/TARGET_STM32F4/serial_device.o).
Finished: 0 information, 1 warning and 2 error messages.

We tried to define UART_RTS and UART_CTS in PeriphalPins.c, but have been unsuccessful. Does anyone have any solutions?

This repo contains the files: GitHub - DheerN/STM32405RGT6-testing

Hi
Have a look on mbed-os/targets/TARGET_STM at master · ARMmbed/mbed-os · GitHub

I suggest this command:
$ python targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py -m “STM32F405RGTx.xml”

to get the correct PeripheralPins.c including UART CTS and RTS pins.

Hello Jerome,

Thanks for the reply. I am currently unable to run that python command, would you be able to provide me with those files? Also, where can I find the .xml file that is mentioned in that command? In the repo you attached, there doesn’t seem to be any source files for STM32F405RGTx chips either, is there an alternative?

Thanks.

Hi
Script is cloning GitHub - STMicroelectronics/STM32_open_pin_data: This repo provides all the information required for the pin and board configuration of products based on STM32 MCU.
where all the xml files are.

Hello Jerome,

Thanks for those instructions, definitely got me closer to a successful build. When I run that command, I do have PeripheralPins.c and PinNames.h created in the targets_custom directory which is expected, but these files are empty (i.e. no code exists in them). Any solutions?

I am also confused since I currently have an mbed os 5 program where I am setting up the target. The targets/TARGET_STM/tools/STM32_gen_PeripheralPins.py path is nowhere to be found. Is there a solution to this? This task completion is extremely urgent, so I appreciate all the help!