Take a look at Samples/SERIAL_STDIO.C. It demonstrates having the software automatically redirect STDIO to any serial port at some fixed baud rate if the debug cable isn’t connected. If you redirect to serial port A, you can use the non-programming connector of the cable to access STDIO using the programming connector of the RCM4310 module.
Or, you can use the global OPMODE:
Code:
if (0x08 & OPMODE) {
// in debug run
} else {
// in non-debug run
}