question about the toolchain of yocto v1.8

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

question about the toolchain of yocto v1.8

510 Views
tcguchengjie
Contributor II

It is said that I have to source the environment to use the toolchain.

3.PNG

After sourcing the environment,compilation success.

2.PNG

I wonder if I can compile and link files without sourcing it.The same parameters.

1.PNG

Even more problems if using ld directly.

4.PNG

Can anyone tell me how to use the toolchain without sourcing the environment?Thanks in advance for any help.

2 Replies

389 Views
yipingwang
NXP TechSupport
NXP TechSupport

I didn't reproduce your problem without sourcing the file environment-setup-ppce500v2-fsl-linux-gnuspe.

Please refer to the following, there is no problem in compiling and linking.

$ /opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe/powerpc-fsl-linux-gnuspe-gcc -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot="/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/ppce500v2-fsl-linux-gnuspe" test.c -o test.out

$ cat test.c

#include <stdio.h>

void main()

{

  printf("test");

}

Anyway, I still suggest you use the standalone toolchain as the following.

$ source /opt/fsl-networking/QorIQ-SDK-V1.8/environment-setup-ppce500v2-fsl-linux-gnuspe

$ ${CC} test.c -o test.out


Have a great day,
Yiping

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

0 Kudos

389 Views
yipingwang
NXP TechSupport
NXP TechSupport

I can reproduce your problem in a clean machine, you could overcome this problem after exporting PATH value.

$export PATH=/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/i686-fslsdk-linux/usr/bin:/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/i686-fslsdk-linux/usr/bin/powerpc-fsl-linux-gnuspe:$PATH


Have a great day,
Yiping

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

0 Kudos