Hello, I know about two options…
First: Pins for default STDIO are defined here and can be overridden in mbed_app.json like this.
mbed_app.json
Second:
BR, Jan