about toolchain in QorIQ SDK V1.9 PPCE500V2 IMAGE.iso

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

about toolchain in QorIQ SDK V1.9 PPCE500V2 IMAGE.iso

1,340 Views
symsong
Contributor II

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?

0 Kudos
8 Replies

989 Views
Pavel
NXP Employee
NXP Employee

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

0 Kudos

989 Views
symsong
Contributor II

so why the step 1 is:

0. sudo apt-get install u-boot-tools

or the u-boot-tools is already installed?

0 Kudos

989 Views
symsong
Contributor II

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

0 Kudos

989 Views
Pavel
NXP Employee
NXP Employee

See recommended steps for adding new files to the P2020 root file system.

  1. 0. sudo apt-get install u-boot-tools

Following are the steps for adding files into rootfilesystem:

  1. 1. dd if=fsl_image_minimal_p2020ds.rootfs.ext2.gz.uboot of=fsl_image_minimal_p2020ds.rootfs.ext2.gz bs=64 skip=1
  2. 2. gunzip fsl_image_minimal_p2020ds.rootfs.ext2.gz
  3. 3. mkdir ./mnt
  4. 4. mount -o loop fsl_image_minimal_p2020ds.rootfs.ext2 ./mnt
  5. 5. Now, one can copy files into appropriate location under “./mnt” directory.
  6. 6. umount ./mnt
  7. 7. gzip -9 fsl_image_minimal_p2020ds.rootfs.ext2
  8. 8. mkimage -A ppc -O linux -T ramdisk -C gzip -n 'fsl_image_minimal_p2020ds.rootfs.ext2.gz.uboot' -d fsl_image_minimal_p2020ds.rootfs.ext2.gz rootfs_full.ext2.gz.uboot

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

0 Kudos

989 Views
Pavel
NXP Employee
NXP Employee

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

0 Kudos

989 Views
symsong
Contributor II

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?

0 Kudos

989 Views
Pavel
NXP Employee
NXP Employee

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

0 Kudos

989 Views
symsong
Contributor II

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 "("

0 Kudos