How to make it stop at main when run on reset during debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to make it stop at main when run on reset during debugger

1,445 Views
yuehedeng
Contributor III

The original question is located here. Now this issue is solved.

How to make debugger only erase the section I want to 

 

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

0 Kudos
2 Replies

878 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

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.

Regards,

Lukas

0 Kudos

878 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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...

Regards,

Lukas

0 Kudos