MPC5748G position independent code

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

MPC5748G position independent code

952 Views
kfirbs
Contributor III

Hi,

 

I am trying to compile the hello sample project for MPC5748G with -fPIC flag in the compiler.

 

I am getting compiler error that refer to missing assembly commands:

COLLECT_GCC_OPTIONS='-std=c99' '-D' 'register_architecture=e200' '-D' 'register_vendor=Freescale' '-D' 'register_chip=MPC5748G' '-D' 'MPC574xG' '-D' 'START_FROM_FLASH' '-D' 'TURN_ON_CPU0' '-D' 'TURN_ON_CPU1' '-D' 'TURN_ON_CPU2' '-D' 'DEBUG_SECONDARY_CORES' '-I' '../include' '-I' 'C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include' '-I' 'C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include/pa' '-O0' '-g3' '-Wall' '-c' '-fmessage-length=0' '-v' '-fPIC' '-fsigned-char' '-mcpu=e200z4' '-specs=ewl_c.specs' '-mbig' '-mvle' '-mregnames' '-mhard-float' '-MMD' '-MP' '-MF' 'src/hello+pll_Z4_1.d' '-MT' 'src/hello+pll_Z4_1.o' '-c' '-o' 'src/hello+pll_Z4_1.o' c:/freescale/s32_power_v1.1/cross_tools/powerpc-eabivle-4_9/bin/../lib/gcc/powerpc-eabivle/4.9.2/../../../../powerpc-eabivle/bin/as.exe -v -I ../include -I C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include -I C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include/pa -mvle -mvle -many -K PIC -mbig -o src/hello+pll_Z4_1.o C:\Users\kfir\AppData\Local\Temp\ccxZIwdF.s COLLECT_GCC_OPTIONS='-std=c99' '-D' 'register_architecture=e200' '-D' 'register_vendor=Freescale' '-D' 'register_chip=MPC5748G' '-D' 'MPC574xG' '-D' 'START_FROM_FLASH' '-D' 'TURN_ON_CPU0' '-D' 'TURN_ON_CPU1' '-D' 'TURN_ON_CPU2' '-D' 'DEBUG_SECONDARY_CORES' '-I' '../include' '-I' 'C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include' '-I' 'C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include/pa' '-O0' '-g3' '-Wall' '-c' '-fmessage-length=0' '-v' '-fPIC' '-fsigned-char' '-mcpu=e200z4' '-specs=ewl_c.specs' '-mbig' '-mvle' '-mregnames' '-mhard-float' '-MMD' '-MP' '-MF' 'src/mode.d' '-MT' 'src/mode.o' '-c' '-o' 'src/mode.o' c:/freescale/s32_power_v1.1/cross_tools/powerpc-eabivle-4_9/bin/../lib/gcc/powerpc-eabivle/4.9.2/../../../../powerpc-eabivle/bin/as.exe -v -I ../include -I C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include -I C:/Freescale/S32_Power_v1.1/S32DS/e200_ewl2/EWL_C/include/pa -mvle -mvle -many -K PIC -mbig -o src/mode.o C:\Users\kfir\AppData\Local\Temp\cc5gKwdF.s GNU assembler version 2.24.51 (powerpc-eabivle) using BFD version (GNU Binutils) 2.24.90.20141014 C:\Users\kfir\AppData\Local\Temp\ccBr2DlB.s: Assembler messages: C:\Users\kfir\AppData\Local\Temp\ccBr2DlB.s:61: Error: Illegal instruction for VLE mode: `bcl' C:\Users\kfir\AppData\Local\Temp\ccBr2DlB.s:64: Error: Illegal instruction for VLE mode: `lwz' C:\Users\kfir\AppData\Local\Temp\ccBr2DlB.s:188: Error: Illegal instruction for VLE mode: `bcl' C:\Users\kfir\AppData\Local\Temp\ccBr2DlB.s:191: Error: Illegal instruction for VLE mode: `lwz' make: *** [src/MPC57xx__Interrupt_Init.o] Error 1 make: *** Waiting for unfinished jobs....

 

Can you please help me sort out the problem?

Original Attachment has been moved to: compile_console.txt.zip

Labels (1)
0 Kudos
3 Replies

552 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

unfortunately, there is a compiler bug in S32 Design Studio version 1.1 which does not allow to use -fPIC switch. But do not worry, this bug is fixed in S32 Design Studio v1.2 which will be released at the end of May.

I am sorry for any inconvenience.

Regards,

Martin

0 Kudos

552 Views
kfirbs
Contributor III

Hi Martin,

Is there a way to compile it without S32? is it a bug in the IDE or the compiler itself?

Does other compilers support it such as Diab compiler for example?

552 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I am not compiler expert and I do not know all dependencies, but it seems it is compiler bug not IDE bug. But it is fixed in next release.

I do not know Diab compiler but I assume that it supports this feature.

Regards,

Martin

0 Kudos