This example allows you to connect your debug terminal to some other serial-connected device on the system. You can then type AT commands at the terminal and get responses back for the serially connected device. Should work with something like an ESP8266 or similar connected in to the Arduino header.

Revision:
0:0f1c0f6579ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed_app.json	Fri Nov 10 16:08:43 2017 +0000
@@ -0,0 +1,18 @@
+{
+    "config": {
+        "uart1_tx": {
+            "help": "UART1 TX pin",
+            "value": "NC"
+        },
+        "uart1_rx": {
+            "help": "UART1 RX pin",
+            "value": "NC"
+        }
+    },
+    "target_overrides": {
+        "K64F": {
+            "uart1_tx": "D1",
+            "uart1_rx": "D0"
+        }
+    }
+}