I'm having what seems to be a very strange problem.
In certain situations, a custom board is loading what looks to be garbage code instead of code from FLASH.
Most strangely, this seems to occur even when I am using the USB-ICE JTAG -- that is, I have a project open, rebuild the project and load it, either automatically or manually. I get the error[Failed to set automatic breakpoint at "main"] and then the garbage code is inserted -- I can see it in the assembly window.
Here is an example:
In my IVT, I have:
rti; nop; nop; nop;
idle; // Used by loader during final init.
In the Disassembly window I see:
Obviously, this isn't *my* code! And this bizarre sequence is the same everywhere in the disassembly, and when I view the code as "mixed".
When I step through the code, it does nothing on the "rti," nor does it actually load anything into r0. So it's not working properly at all.
Does this sound familiar to anyone? Are there any startup conditions that could cause this?