How to over write the Targets

I do not know, your code was on my side compiled successfully - Keil Studio Cloud, MbedOS 5.15.7.

image

I just recommend to place the pinmaps before Serial objects declaration and you also have to fill the rest UARTs because you have two more in your code.

BR, Jan