hi,all.

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

hi,all.

1,218 Views
jie_wang093
Contributor I

hi,all. I get my LS1021A TWR recently, I want to develop a "Hello world!" program to the board , and which can I get the guidance? How can I  compile the "xx.c"  and  "xx.h"  in the SDK??

1 Reply

1,111 Views
Pavel
NXP Employee
NXP Employee

Build and install the standalone toolchain with Yocto:

$ source ./fsl-setup-poky -m <machine>

$ bitbake fsl-toolchain

$ cd build_<machine>_release/tmp/deploy/sdk

$ ./fsl-networking-eglibc-<host-system>-<core>-toolchain-<release>.sh

Note: The default installation path for standalone toolchain is /opt/fsl-networking/. The install folder can be specified during the installation procedure.

 

Look at command sequence below. Use similar command sequence for the LS1021a.

 

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

 

sudo chmod 777 /opt/fsl-qoriq/2.0/environment-setup-ppce6500-fsl-linux

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

Check result of "source" command. Use "echo $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:

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!
-----------------------------------------------------------------------------------------------------------------------