MPC5642A project with PIT ISR can only be single step executed (S32 DS V2.1)

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

MPC5642A project with PIT ISR can only be single step executed (S32 DS V2.1)

跳至解决方案
923 次查看
ZhouYiChuan
Contributor III

Dear NXP supporter:
The development enviroment is: S32 DS V2.1, P&E mutliLink universal debugger
Brief description of my issue is:
A MPC5642A project with PIT ISR, can't run at full speed in deugging mode, it can only be single step executed.

The very simple project (name: mpc5642_test-noISR) created with S32 DS Wizard, it can be flashed into ECU and debug with P&E multiLink at full speed.

Simple project is created like below:

createProject.PNG

I downloaded a PIT ISR example (name: MPC5644A_ISR, on MPC5644A) from NXP website, and ported it to the MPC5642A project (project name: mpc5642_test-withISR)

For the project mpc5642_test-withISR, the issue:
during debugging, I pressed the 'resume(F8)' button, the code run one step, then stopped automatically.
For example: the cursor stopped at entry position (the '{') of ISR pit0_hanlder(). please refer to following snapshot
Then I press the resume button, it then stopped at exit position (the '}') of ISR pit0_handler()

Could you please give me some hint? thank you in advance. 

BR

Zhou YiChuan

Following is the screen snapshot while debuggijng.

debug_alwaysStep.PNG

 

0 项奖励
回复
1 解答
886 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there are several ways how to write nop:

__asm__("nop");
__asm__("e_nop");
__asm__("se_nop");

The first one should be used when using BOOK E instruction set. Next ones when using VLE set.

Your project is VLE. If you use
__asm__("nop");
... it is translated as:
se_bclri r0,0x0
se_illegal

If a debugger is connected, se_illegal works as a software breakpoint.

So, solution is to use VLE versions:
__asm__("e_nop");
__asm__("se_nop");

 

In CodeWarrior IDE, __asm__("nop"); was automatically translated to VLE instruction set. But the situation is different in S32DS and you need to use VLE versions explicitly.

Regards,
Lukas

在原帖中查看解决方案

0 项奖励
回复
2 回复数
872 次查看
ZhouYiChuan
Contributor III

dear Lukas:

thank you for your support. the issue is fixed. 

BR

YiChuan

0 项奖励
回复
887 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

there are several ways how to write nop:

__asm__("nop");
__asm__("e_nop");
__asm__("se_nop");

The first one should be used when using BOOK E instruction set. Next ones when using VLE set.

Your project is VLE. If you use
__asm__("nop");
... it is translated as:
se_bclri r0,0x0
se_illegal

If a debugger is connected, se_illegal works as a software breakpoint.

So, solution is to use VLE versions:
__asm__("e_nop");
__asm__("se_nop");

 

In CodeWarrior IDE, __asm__("nop"); was automatically translated to VLE instruction set. But the situation is different in S32DS and you need to use VLE versions explicitly.

Regards,
Lukas

0 项奖励
回复