Here are two pictures that show the change of stack after step into sub function.
Because of the stack change, it won't return normally back to the place where it called it, instead, it will "return" to 0xFFFF which is incorrect.
I also test other test cases and didn't find any similar problem.
So how can I fix the problem?
Codewarrior version is
Target ECU is S12G192.