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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,781 次查看
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 项奖励
回复
2 回复数

1,214 次查看
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 项奖励
回复

1,214 次查看
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 项奖励
回复