Hi,
I'm working with bsc9131 and I use the toolchain in QorIQ SDK V1.9 PPCE500V2 IMAGE.iso,fsl-qoriq-glibc-x86_64-ppce500v2-toolchain-1.9.After installing the toolchain,I use command "source environment-setup-ppce500v2-fsl-linux-gnuspe" and "${CC} test.c -o test " to generate a binary file,but when I put it into my 9131 Linux and use bash test,there comes an error
line 1: syntax error: unexpected "("
but the test.c is just a simple helloword :
#include<stdio.h>
main(){
printf("hello world!");
}
is there anything wrong with the toolchain or something?
The "apt-get" command usually is used on Ubuntu Linux. Our Linux SDK is not Ubuntu version.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
so why the step 1 is:
0. sudo apt-get install u-boot-tools
or the u-boot-tools is already installed?
I'm afraid that there is no apt-get in bsc9131' linux OS,and the ppc OS don't use apt-get to install softwares
See recommended steps for adding new files to the P2020 root file system.
Following are the steps for adding files into rootfilesystem:
Use similar command sequence on your host for file adding to root file system.
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Result of gcc is binary file. The elf file is not script.
Use the following command for elf file starting:
./real.elf
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thanks so much,problem solved.
there is another problem that the file I download to my 9131 Linux disappears after it shutdown,how can I save it?
Use the following command sequence:
source /opt/fsl-qoriq/1.9/environment-setup-ppce500v2-fsl-linux-gnuspe
$CC test.c --sysroot=/opt/fsl-qoriq/1.9/sysroots/ppce500v2-fsl-linux-gnuspe -o test.elf
Check result of "source" command. Use "$PATH" command. The "source" command should add path to gcc compiler. You should see similar message:
$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:
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
the error still apears..
root@bsc913x:~# sh real3.elf
real3.elf: line 1: syntax error: unexpected "("
root@bsc913x:~# bash real3.elf
real3.elf: line 1: syntax error: unexpected "("