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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
196件の閲覧回数
hongyuanzhao
Contributor I

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 <stdio.h>
^
compilation terminated.

0 件の賞賛
返信
1 解決策
180件の閲覧回数
June_Lu
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
181件の閲覧回数
June_Lu
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
175件の閲覧回数
hongyuanzhao
Contributor I

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 

 

0 件の賞賛
返信