| Cross Compiling for Onboard Hosts Last Modified: 2010-03-23 | | |
| Acroname Robotics | |||
| Overview Garcia mobile robots may be equipped with attached host processors that communicate with the built in BrainStem core. Specially configured cross-compilation toolchains are required to compile code for these processors. The Garcia product download provides pre-compiled libraries and applications that can be deployed to the onboard host processor. Generally running the precompiled and supported binaries onboard the host, and using the acpGarcia API and the aRelay application over a TCP/IP socket is a much easier way to get a working Garcia application going. That said, this guide provides a brief overview of the steps necessary to cross compile the example aGarciaApp application to run directly onboard a target host processor on Garcia.
Cross compiling code requires creating an appropriate toolchain for the target processor. Toolchains can be challenging to build and may need significant "nudging" to get successfully built. Toolchains are publicly available, but are not supported by Acroname. Code compiled with the toolchains is also not supported by Acroname.
Obtain Acroname Downloads and Preparation Obtain the Garcia product download and the "C/C++ Examples for Linux" from the Acroname Downloads Center. Create two folders in a known location. This helps us keep the differently complied projects separate from one another. [user@localhost ~]$ mkdir garcia
[user@localhost ~]$ mkdir host
Copy the Garcia product download into the "host" folder. Copy the C/C++ examples for Linux into the "garcia" folder. Expand the two archives if you have not already done so. [user@localhost garcia]$ tar -xzvf c_examples_linux_i686.tgz
The "garcia" folder should have an "examples" folder. The "host" folder should have an "acroname" folder. Navigate into the "host/acroname/aGarcia" folder and then the appropriate onboard target folder. Expand the appropriate target TGZ archive to the previously created "garcia" folder. The following example is for a Gumstix target processor. [user@localhost Gumstix]$ tar -xvzf Garcia_gumstix_linux_ARM.tgz -C ../../../../garcia/
This will now create an "acroname" folder in the "garcia" folder with cross compiled libraries and relevant source code for the target processor. ![]() Basic working structure for organizing downloads and directories (gumstix shown). Cross Compiling Steps If you have not already done so, you must obtain and build the appropriate target processor toolchain. We recommend temporarily adding the toolchain locations to your PATH variable while attempting to cross compile code. Move into the "garcia/examples/aGarciaApp" folder. We will need to specify to the makefile that we wish to cross compile for ARM architectures. This can be performed on the command line without any makefile modification. [acroname@localhost aGarciaApp]$ make ARCH=ARM
Older, legacy Stargate-based builds add another compiler define to get the proper compiler. For Stargates, type: [acroname@localhost aGarciaApp]$ make ARCH=ARM BOARD=aSTARGATE
Revision History:
|
| |||||
| voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy © Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved. |