I have been trying to track down the cause of a bizarre bug, and finally managed to isolate the behavior with the emulator attached to my hardware. I then connected to my board without loading a gel file and loaded symbols, and the PC was at my expected stalled code. I basically have an infinite while loop waiting for an input low level. When I isolated the fault, it was stuck at the polling function checking the input, and yet the input was low (according to both measurement at the board level and reading the gpio_in register). When I tried to execute a step with the emulator, I received the following message in the output window:
Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x85c74c80: Error 0x0000000A/-1175 Error during: Memory, Break Point, Security Violation Error when using IM unit.
Breakpoint Manager: Retrying with a Legacy Hardware breakpoint
Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x85c74c94: Error 0x0000000A/-1175 Error during: Memory, Break Point, Security Violation Error when using IM unit.
Breakpoint Manager: Retrying with a Legacy Hardware breakpoint
Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x85c74c80: Error 0x0000000A/-1175 Error during: Memory, Break Point, Security Violation Error when using IM unit.
Trouble Setting Breakpoint with the Action "Continue or Finish Stepping" at 0x85c74c94: Error 0x0000000A/-1175 Error during: Memory, Break Point, Security Violation Error when using IM unit.
Here is the code snippet in question:
while ( read_SYNC_IN == 1); // wait for input signal to be low
clr_SYNC_OUT;
where read_SYNC_IN is:
#define read_SYNC_IN (GPIO_IN_DATA01 & 0x01)
and GPIO_IN_DATA01 is:
#define GPIO_IN_DATA01 *( volatile Uint32* )( GPIO_BASE + 0x20 )
and GPIO_BASE is:
#define GPIO_BASE 0x01C67000
I am using CCS version 3.3.82.13 and code generation tools v6.1.9. I am not using BIOS. The code usually works, continuing execution as expected for several hundred times before I stop it. Sometimes, it gets stuck on the 2nd or 3rd iteration. Any ideas what I can check? This appears to be some strange problem because the code in question is incredibly simple.
*edit*: in addition, I tried viewing mixed source/assembly, and it is giving me the following error on a particular assembly instruction:
Trouble Determining Current Execution Packet(s): Error 0x0000000A/-1175 Error during: Memory, Break Point, Security Violation Error when using IM unit.
The instruction is a conditional BNOP, which I would cut and paste but code composer will not let me.