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
Solved! Go to Solution.
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):
Also when you look at the PowerPC CPU tab, there has to be the following options:
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
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):
Also when you look at the PowerPC CPU tab, there has to be the following options:
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