# How to compile suite-14.06.00 on BeagleBone Black?

Hello,

I'm trying to compile alljoyn-suite-14.06.00_beta on BeagleBone Black (rev. A5A). It runs Debian 7.5-2014-05-14. I'm executing:

scons OS=linux CPU=arm BINDINGS=cpp,java OE_BASE=/usr


Using original SConscript in "/core/alljoyn/build_core/conf/linux/arm" results in an error saying:

"error:sorry, unimplemented: Thumb-1 hard-float VFP ABI"

After a change in SConscript:

from:

env.Append(CPPFLAGS=['-march=armv6',
'-mthumb-interwork'])


to:

env.Append(CPPFLAGS=['-march=armv7-a', '-mtune=cortex-a8', '-mfloat-abi=hard', '-mfpu=neon', '-fPIC'])


There are no errors during compilation.

On BBB, I've tested bbserver and JavaSDKDocSignalService (with JavaSDKDocSignalClient on different machine) and both are working fine.

I'll leave this as open question until someone else confirms the same result.

EDIT - updated 2014-07-16

Regards, Laz

edit retag close merge delete

Sort by » oldest newest most voted

OS=linux with CPU=arm is a very old vestige from the earliest days of development of the AllJoyn code base. This is an area of the scons files that need some cleaning up. If you are using a cross compiler, then try setting OS=openwrt and CPU=openwrt. This will allow setting many more options for specifying the cross-compiler tool chain.

Namely, you will need to set the following options to the appropriate values (the values I have below are for illustrative purposes only):

"TARGET_CC=gnu-arm-eabi-gcc"
"TARGET_CXX=gnu-arm-eabi-g++"
"TARGET_CFLAGS=-I/path/to/cross-tools/system/includes -DSOME_SYSTEM_DEFINE"
"TARGET_CPPFLAGS=-I/path/to/cross-tools/system/includes -DSOME_SYSTEM_DEFINE -DSOME_OTHER_DEFINE"
"TARGET_PATH=/usr/bin:/path/to/cross-tools/bin"
"TARGET_AR=gnu-arm-eabi-ar"
"TARGET_RANLIB=gnu-arm-eabi-ranlib"
"STAGING_DIR=/path/to/target/root/on/host"


Note that the quotes are important for the options that include spaces in them.

The reason that OS=openwrt with CPU=openwrt is used for cross-compiling on Linux targets with arbitrary compilers is because OpenWrt is the first Linux based system supported by AllJoyn that required the ability to be able to cross compile with a broad set of compilers depending on the chosen target. So rather than make one AllJoyn platform per possible OpenWrt target, a more generic solution was created. This generic solution should work for any Linux based cross-compiler.

EDIT - updated 2014-07-16

Note that the answer above was for the original version of the question that asked how to build AllJoyn for BeagleBone Black when errors were encountered using OS=linux and CPU=arm.

The SCons files for the AJTCL code base will completely ignore OS= and CPU=. Instead, it uses a single TARG= option. For AJTCL, the following environment variables can be used to setup cross-compilation:

CROSS_PREFIX=gnu-arm-eabi-
CROSS_PATH=/path/to/cross-tools/bin
CROSS_CFLAGS="-march=armv7 -I/path/to/cross-tools/system/includes"