Release toolchain, result in "illegal instruction for this processor"

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

Release toolchain, result in "illegal instruction for this processor"

跳至解决方案
1,560 次查看
gabrielghita
Contributor I

Hello,

I have tried to change the toolchain used, from debug to release, but I have faced a strange compiler error: "illegal instruction for this processor".

 

I have changed the toolchain from Project Properties -> C/C++ Build -> Tool Chain Editor -> Current toolchain, selecting PowerPC Release Toolchain, instead of PowerPC Debug Toolchain.

 

Even a new project, will fail to build, with this error: "illegal instruction for this processor", in file: Execptions.c, in function:

__asm void EXCEP_InitExceptionHandlers(void) { nofralloc      /* Set the IVPR to the Exception Handlers memory area defined in the lcf file */      lis r0, EXCEPTION_HANDLERS@h     ori r0, r0, EXCEPTION_HANDLERS@l     mtivpr  r0     /* IVORxx registers are "hard-wired" in the e200z0 and z0h cores */     blr }

at lis, ori and blr instructions, also in other files at nop instruction also.

 

I am using:

CodeWarrior for MCU (Special Edition Suite); Version: 10.6; Build Id:140329

MCU: MPC5607B

 

Is this a licensing issue (PowerPC Release Toolchain cannot be used on Special Edition Suite)?

Did I do something wrong?

Or it is simply, a bug?

 

PS: This file (Execptions.c) is generated by CW when a new project is created and it is not created or modified by me.

 

Thank you,

Gabi

标签 (1)
0 项奖励
1 解答
1,270 次查看
martin_kovar
NXP Employee
NXP Employee

Hi Gabi,

I replicated your use case and the problem is caused by incorrect project settings. Release toolchain changes some setting, which should not be changed.

I found at least two compiler options, which are changed by release toolchain and which cause error (bookE instructions are not translate to VLE). Please look at the following figure (these two options have to be check):

pastedImage_0.png

Also when you look at the PowerPC CPU tab, there has to be the following options:

pastedImage_1.png

My recommendation is not to change toolchain, but change only the options you need and options you know their impact to project.

If you have any other questions, please feel free to write me back.

Regards,

Martin

在原帖中查看解决方案

0 项奖励
1 回复
1,271 次查看
martin_kovar
NXP Employee
NXP Employee

Hi Gabi,

I replicated your use case and the problem is caused by incorrect project settings. Release toolchain changes some setting, which should not be changed.

I found at least two compiler options, which are changed by release toolchain and which cause error (bookE instructions are not translate to VLE). Please look at the following figure (these two options have to be check):

pastedImage_0.png

Also when you look at the PowerPC CPU tab, there has to be the following options:

pastedImage_1.png

My recommendation is not to change toolchain, but change only the options you need and options you know their impact to project.

If you have any other questions, please feel free to write me back.

Regards,

Martin

0 项奖励