AnsweredAssumed Answered

VLE 16bit Trap instruction for SW breakpoint

Question asked by christophe ple on Sep 30, 2017
Latest reply on Jan 28, 2020 by Igor S

Hi All,


For an internal Software debugger on a MPC5777M e200zx core, i would like to implement software breakpoint for the code running in RAM.

With non-VLE PPC, the TRAP instruction is used to modify the instruction where i want to break and when this TRAP is executed, the debug exception is taken (if necessary enable bit are set on the PPC).

But on VLE PPC, the instruction to be modify by a TRAP can be a 16bit length instruction and unfortunately the TRAP instruction is 32bit. In this case the 32bit TRAP will corrupt the 16bit word following the instruction to break.

This corruption can lead to a crash of the debugged software if this corrupted 16bit word is a constant data.

I think that a 16bit TRAP instruction is missing in the VLE PEM documentation.

What is your feeling about this ?

And do you have any idea, hint to solve my problem ?