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: 
Highlighted
Observer bstahlman
Observer
2,097 Views
Registered: ‎01-31-2017

How to integrate Xilinx ARM toolchain into standalone makefile (i.e., building outside IDE)

I need to be able to build applications targeting an ARM-based SoC. My build machine is an x86_64 machine running Linux. I've downloaded and installed the Xilinx SDK, but am having trouble finding documentation on how to build outside the IDE. What needs to be done to integrate the Xilinx SDK into an existing build system? I suspect that besides making sure the ARM toolchain binaries are accessible, I'd need to use something like gcc-'s -isystem option to ensure that the cross compiler's header files are found before the native headers. I've also seen references to a CROSS_COMPILE variable that seems relevant, but the details on how to use it are unclear. I'd be very grateful for any tips and/or links to documentation or projects that illustrate the relevant mechanisms...

 

Thanks,

Brett Stahlman

Tags (2)
0 Kudos
4 Replies
Teacher muzaffer
Teacher
2,088 Views
Registered: ‎03-31-2012

Re: How to integrate Xilinx ARM toolchain into standalone makefile (i.e., building outside IDE)

@bstahlman basically make uses CC to define the compiler. You can either set CC = arm-... or you can say CC = $(CROSS_COMPILE)gcc and define CROSS_COMPILE.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer bstahlman
Observer
2,076 Views
Registered: ‎01-31-2017

Re: How to integrate Xilinx ARM toolchain into standalone makefile (i.e., building outside IDE)


@muzaffer wrote:

@bstahlman basically make uses CC to define the compiler. You can either set CC = arm-... or you can say CC = $(CROSS_COMPILE)gcc and define CROSS_COMPILE.


Thanks. But do you know how the search paths are handled? Specifically, is the cross compiler hard-coded to look in a certain place for the system include files? I ask because, though I've installed the Xilinx SDK under /opt/Xilinx on my primary machine, I'd like to move just the subdirectory containing the ARM toolchain onto a smaller development machine, and I'm wondering about the implications of simply dropping the toolchain onto another machine without going through the full SDK installation. If the compiler is hard-wired to look for system headers at a location relative to the binary itself, then perhaps this would work. I ran...

`aarch64-gnu-linux-gcc -print-prog-name=cc1` -v

to see what paths would be searched, and got several lines that looked like this:

ignoring nonexistent directory "/some/absolute/path/that/doesn't/exist/on/my/system"

...which sort of feels broken...

 

Thanks,

Brett S.

0 Kudos
Teacher muzaffer
Teacher
2,071 Views
Registered: ‎03-31-2012

Re: How to integrate Xilinx ARM toolchain into standalone makefile (i.e., building outside IDE)

@bstahlman to get around this you need to use the necessary -I -L options to the compiler/linker too. Build system is fully configurable, albeit a little bit opaque.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Observer bstahlman
Observer
2,068 Views
Registered: ‎01-31-2017

Re: How to integrate Xilinx ARM toolchain into standalone makefile (i.e., building outside IDE)

Are you saying that there are no standard search locations for the Xilinx toolchain? That even the headers distributed with the compiler must be specified with -I? If this is the case, it seems very non-standard and error-prone...
0 Kudos