NXP/ST Power Architecture / MPC560x, SPC560P, SPC560B: Watches & Disassembly showing illegal instructions

13-Mar-2025

Later in the debug session, after observing a certain variable through a pointer or directly, some or all the values in the Watch windows get corrupted and the Disassembly Window displays the message Illegal Instructions.  The value of the variable is not modified, it is only read.


Possible solution

Avoid reading memory from an unsafe memory region

This can happen when reading from an unallocated memory region using the SFR, Memory, or Watch Window. When the debugger reads from an unallocated memory region (no physical memory there):

  • The SoC might reset.
  • A memory bus might be unable to complete the access cycle.
  • The debug interface freezes and a reset is required.

Reading memory from an unallocated memory region must be avoided. This is especially critical when dealing with pointers as they have a higher chance of holding an address pointing to a memory that is unsafe to access, e.g., a null pointer.

Was this answer helpful?