1883173_en-US

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

1883173_en-US

1883173_en-US

powerpc64-fsl-linux-gcc : Cross compilation tool cannot be used

install Cross compilation :

./fsl-toolchain/fsl-qoriq-glibc-x86_64-ppc64e6500-toolchain-2.0.sh

source /opt/fsl-qoriq/2.0/environment-setup-ppc64e6500-fsl-linux



linux$ powerpc64-fsl-linux-gcc test.c
test.c:1:19: fatal error: stdio.h: No such file or directory
#include
^
compilation terminated.

Re: powerpc64-fsl-linux-gcc : Cross compilation tool cannot be used

thank you 

This compilation is also possible:

powerpc64-fsl-linux-gcc -mhard-float -m64 -mcpu=e6500 --sysroot=/opt/fsl-qoriq/t2080/sysroots/ppc64e6500-fsl-linux  test.c   -o test 


Re: powerpc64-fsl-linux-gcc : Cross compilation tool cannot be used

Share the general steps, please check the steps below:

Use toolchain from Linux SDK BSP for QorIQ processor:

https://www.nxp.com/design/design-center/software/embedded-software/linux-software-and-development-t...,

 

This SDK supports toolchain for standalone compiling.

See the Section 3.3.7 (Install the Standalone Toolchain) in the SDK 2.0-1703 documentation:

Install the Standalone Toolchain | QorIQ SDK v2.0-1703 Documentation | NXP Semiconductors

 

Use similar command sequence for your program compiling:

 

  1. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.

 $ . /opt/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux

  1. sudo chmod 777 /opt/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux
  2. source /opt/fsl-qoriq/2.0/environment-setup-aarch64-fsl-linux

Check result of "source" command. Use "$PATH" command. The "source" command should add path to gcc compiler.

You should see similar message:

echo $PATH

bash: /opt/fsl-qoriq/1.9/sysroots/x86_64-fslsdk-linux/usr/bin:/opt/fsl-qoriq/1.9/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe:

 

  1. $CC test.c -o test.elf

Thanks

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 02:05 PM
Updated by: