The original question is located here. Now this issue is solved.
However I met another questions. The background is that:
1. I'm working on boot loader development. BLD and APP have separate memory and project.
2. My bootloader project is located at 0x00F9_0000-0x00F9_3FFF, the first 0x14 bytes are boot header, and the startup code starts from 0x00F90014
3. To preserve APP ROM data during debug my boot loader project, I configure my boot loader project as follow:
A. Startup: Attach to Running Target, Set breakpoint at main
B. Debugger: Preserve this range: from 0x1000000 - 0x13fffff
But when I debugger my boot loader project, it will start running automatically by skip all break points. when I click suspend, it can stop at boot loader code. After that it can stop at the breakpoint I set. So my question is how to make it stop at main when run on reset during debugger?
I use S32 + MPC5748G + PE.
Original Attachment has been moved to: 01_BootLoader.rar
MPC57xx and MPC56xx (except devices with e200z0 core) support debugging through reset (not power-on reset, of course) because debug registers are not cleared during reset.
MPC55xx and MPC560x (devices with e200z0 core) don't support it because the registers are cleared by reset.
Then it depends on debugger implementation. For example, Lauterbach debugger supports it but I'm not really sure about debugger in S32 Design Studio. Let me check it, I will let you know later.
I have been told that S32 Design Studio does not support this feature. For debugging purposes, the only workaround I can see is: put endless loop somewhere to the code instead of a breakpoint, run the code, wait until the code reach the endless loop. Then attached the debugger without reset, stop the program, manually move the program counter to next instruction behind the endless loop and then you can debug your application...