Debug mode Vs regular running

Hi,

I’m trying to have my program detect if it’s running with the programming cable attached or if it is running regular.
I’m using BLS4200 with RCM4310.
the idea is to catch this condition (debug or regular mode) and interact with the stdio or with the serial port.
is there a flag of some sort that I can detect if a programming cable is attached to the RCM4310?

thanks

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:


if (0x08 & OPMODE) {
   // in debug run
} else {
   // in non-debug run
}