SDK

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

SDK

1,585 Views
hammadnayeem
Contributor II


Pls tell command to compile a program using SDKv1.7 for P2020RDB-PCA.

Also tell location where this command is to be executed

Labels (1)
0 Kudos
10 Replies

1,320 Views
Pavel
NXP Employee
NXP Employee

Build SDK toolchain using the following page:

http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F3069706.html

Use the following command for simple_serial c building:

gcc simple_serial.c --sysroot=/opt/fsl-networking/QorIQ-SDK-V1.7/sysroots/ppce500v2-fsl-linux-gnuspe/ -o simple_serial

See corrected simple_serial.c file in the attachment.


Have a great day,
Pavel

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

0 Kudos

1,320 Views
hammadnayeem
Contributor II


Pls explain as why we are using gcc here instead of $CC, if we are using Freescale Toolchain

0 Kudos

1,320 Views
Pavel
NXP Employee
NXP Employee

On Linux, CC is a link to gcc.

0 Kudos

1,320 Views
hammadnayeem
Contributor II

ok, but this command generates a windows executable file.... pls share the command for generating a file that can be run on P2020RDB-PCA (by tftp ??, pls explain this too)

0 Kudos

1,320 Views
Pavel
NXP Employee
NXP Employee

This command generates .elf file for the e500core. See binary code of this file.


Have a great day,
Pavel

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

0 Kudos

1,320 Views
hammadnayeem
Contributor II

ok , I understand and through tftp we can port this elf to our P2020RDB-PCA. 1 question more that for compilation of a C code , should i use the $CC command or this gcc command as shared by you . What will be the differences in file outputs of both.

Sorry to bother you a lot. I am actually new to the embedded environment. Glad If I can learn from you.

Many Thanks,

Hammad

0 Kudos

1,320 Views
Pavel
NXP Employee
NXP Employee

If link “CC” is net defined on your Linux, command gcc should be use.

Both commands call gcc and generate the same output file.


Have a great day,
Pavel

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

0 Kudos

1,320 Views
hammadnayeem
Contributor II


Ok, I get it !!!

Thanks

0 Kudos

1,320 Views
hammadnayeem
Contributor II

From one document , I searched and executed following series of commands

embedded@embedded-HP-Z210-SFF-Workstation:/opt/fsl-networking/QorIQ-SDK-V1.7$ sudo chmod +x environment-setup-ppce500v2-fsl-linux-gnuspe

embedded@embedded-HP-Z210-SFF-Workstation:/opt/fsl-networking/QorIQ-SDK-V1.7$ source environment-setup-ppce500v2-fsl-linux-gnuspe

and then used $CC for hello.c compilation, I generated a.out file, how does this relate to .elf file we just generated with that gcc command.

0 Kudos

1,320 Views
Pavel
NXP Employee
NXP Employee

Rename a.out to a.elf


Have a great day,
Pavel

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

0 Kudos