Cross-compiling EPICS

From Nuclear Physics Group Documentation Pages
Revision as of 15:44, 30 July 2009 by Minuti (talk | contribs)
Jump to navigationJump to search

Linux-x86 host, linux-arm target

Once you have a proper cross-compiling setup, download EPICS and extract the tarball: curl -O tar -zxvf baseR3.14.10.tar.gz cd base-3.14.10 export EPICS_BASE=`pwd`

Now you'll need to set up the configuration. EPICS spreads its config files all over the place, but unless you have special needs not covered here, this is what you need to change.

Set up configure/CONFIG_SITE


Our cross-compiling toolchain is in /usr/local/arm-linux-gnu. Set up configure/os/CONFIG_SITE.linux-x86.linux-arm

  • GNU_DIR = /usr/local/arm-linux-gnu

Our gcc and other programs are named, for example, arm-linux-gnu-gcc, instead of arm-linux-gcc. So, we have to fix how the makefiles look for programs. Fortunately, it's easy: Set up configure/os/CONFIG.Common.linux-arm

  • GNU_TARGET = arm-linux-gnu


Now you'll have a set of binaries for both the host and the target, found under bin/$ARCH. Confirm that cross-compilation worked as intended by running file bin/linux-arm/softIOC