How to cross compile powerpc64(T4240 RDB)

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

How to cross compile powerpc64(T4240 RDB)

1,381 Views
mvicki93
Contributor I

Hi,

   

We purchased a T4240 development kit (NXP T4240RDB).

 

We installed that package on 14.04.1-Ubuntu. I can compile linux and uboot using bitbake for t4240rdb-64b.

 

When I cross compile a simple .c file with printf for powerpc64 architecture. I face some issues on compile

 

Error message:

 

$ powerpc64-fsl-linux-gcc  main.c

main.c:15:19: fatal error: stdio.h: No such file or directory

 #include <stdio.h>

                   ^

compilation terminated.

How to cross compile for powerpc64 architecture?

0 Kudos
2 Replies

869 Views
Pavel
NXP Employee
NXP Employee

Use toolchain from Linux SDK BSP for QorIQ processor:

http://www.nxp.com/products/software-and-tools/run-time-software/linux-sdk/linux-sdk-for-qoriq-proce...

 

NXP offers SDK 2.0-1703 for the T1024RDB board.

This SDK supports toolchain for standalone compiling.

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

http://www.nxp.com/assets/documents/data/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

 

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


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

869 Views
mvicki93
Contributor I

Hello,

Thanks for your email.

On Friday, April 28, 2017, Pavel <admin@community.nxp.com

0 Kudos