This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Debugging caveats

Hi there,

This post has two questions.  The second one is the most important for me to understand (and is the one I will assign a "Answered"  to), but I would appreciate knowing answers to the first as well.

1. What settings/properties/features of either CCS, the Project or individual files will cause an executable to run (significantly) differently (or even hang) with the debugger attached compared to just running with no debugger ?  I call these Debugging caveats which I can't find listed in CCS help, nor in the CCS wiki articles. 

2.  I can compile and run the example from here "C:\StellarisWare\examples\peripherals\i2c\master_slave_loopback.c" OK in my own project.  It runs fine with no debugger attached, but when I debug the EXE (running on the target), execution hangs in an infinite while loop waiting for the Slave I2C to receive data via loopback from the Master I2C and acknowledge it received data.  Why ?  This example uses no external H/W, just the stock standard TI LM4F232H5QD evaluation board.

Here is the while loop where it gets stuck (line 287 of "master_slave_loopback.c").   For what it's worth, if I comment out this while loop and another one, then in debug mode the program runs OK to completion (because the Master goes on to successfully read data from the slave (it just cant write data to it)).

// Wait until the slave has received and acknowledged the data.
// 
while(!(I2CSlaveStatus(I2C0_SLAVE_BASE) & I2C_SCSR_RREQ))
{
}