Home/Support/Support Forum/Debug mode Vs regular running
New and improved user forum site coming soon
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Debug mode Vs regular running

0 votes

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?

asked May 12, 2017 in Rabbit by oazrad New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
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 }
answered May 16, 2017 by TomCollins Veteran of the Digi Community (2,382 points)