UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Participant supertigro
Participant
5,207 Views
Registered: ‎12-16-2008

Compiling application on XUPV2P with gcc

Hello,

 

I have an XUPV2P board with embedded Linux Kernel from xilinx git tree.

I use a root file system, stored on a Compact Flash, with a native gcc.

 

Is it possible to compile application that uses xilinx IP core (for example Uart, DMA, etc.) or any personal core?

 

Should I copy library or header fiel on the board to comunicate with the devices mentioned above?

 

Thanks for any suggestion!

 

 

Edit: I try to copy the "executable.elf" from EDK TestApp_Memory on the board and then to execute... the output on console is: Killed

 

Message Edited by supertigro on 03-03-2009 07:06 AM
0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
5,197 Views
Registered: ‎09-10-2008

Re: Compiling application on XUPV2P with gcc

Hi,

 

You can't use the EDK GNU tools to build an application that runs on Linux.

 

You need to use tools that build for Linux, such as the ELDK.  The libraries that are used are different is my understanding, although I'm no tool expert.

 

There's really nothing special to do with headers etc... if you use the right tools to generate the binary.

 

For the ELDK, you can cross compile a hello world, ppc_4xx-gcc --static hello.c -o hello, that is linked statically and no libraries are needed.  Without static you'll need to take care of shared libs which is a little more difficult.

 

Hope that helps,

John

0 Kudos
Participant supertigro
Participant
5,195 Views
Registered: ‎12-16-2008

Re: Compiling application on XUPV2P with gcc

OH! Very interesting! Thank you very much!

 

And... if I would be able to compile on the board with my native gcc toolchain?

The root file system have a toolchain tha compile a simple HellWorld program, but It doesn't work with TestApp_Memory source for example!

 

Any idea?

 

Thanks again!

0 Kudos
Xilinx Employee
Xilinx Employee
5,192 Views
Registered: ‎09-10-2008

Re: Compiling application on XUPV2P with gcc

You should be able to use the native GNU tools for powerpc on root file system assuming they are built correctly for Linux.

 

I would start with something simple like helloworld and get them to work, and it sounds like you have.

 

I'm not sure why they wouldn't work with TestApp_Memory assuming it compiles and links ok. That app may need some library stuff but I would think you'd get a linker error if so.

 

-- John

 

0 Kudos