GCC cross toolchain for BBB with Angstrom?

I just got a BBB to make a simple headless embedded system.

Because I’m hoping to turn it into a product, I need to be able to build an installable on a desktop Linux box (currently running Ubuntu 12.04), rather than doing a native build on each and every unit.

Even though I used “beaglebone black” as a quoted phrase in the google search, just about every reference to toolchains I got was for the Beaglebone, or even the Beagleboard. And mostly about building custom kernels for other distros.

Is there, somewhere, a simple list that says “This is what you need to install to develop for the BBB and Angstrom using gcc, and here’s where you can get the matching header files for compiling apps”?

Thanks,

Ran

Ran,
I found the following to be useful…a bit of research led me to the conclusion most everyone uses linaro cross tools…although I have not yet gotten to downloading/trying linaro (FYI the angstrom/openembedded build environment seems to auto-download a toolchain, and there’s likely a way to use that).
http://elinux.org/Toolchains
https://launchpad.net/linaro-toolchain-binaries
http://eewiki.net/display/linuxonarm/BeagleBone+Black << Robert Nelson has a lot of other useful info on his wiki
http://www.angstrom-distribution.org/building-angstrom

-Dale

Again

use buildroot

http://buildroot.uclibc.org/git.html

Which OS / distro are you running on your cross dev system ran ?

The linaro toolchain used by Robert C Nelsons LinuxonARM for Debian and Ubuntu can be used to cross compile applications for either. Even the Windows binaries will do the job if you want to cross compile on WIndows. I know, I’ve done it :slight_smile: If you want instructions to do this on Windows I wrote a forum post on Beagelfu that shows how to setup Linaro with Code::Blocks. The same should also apply to Code::Blocks on Linux too.

Linaro is good, but ,

If you have a binary code , that dont have the source code (example dsp lib from Ti another example is freescale gpu driver ). linaro will get link error .

Almost SOC released with soft float abi in sdk (this against the linaro default hard float abi )

for now , I just find the ti arago tools chains works works fine under buildroot (Even for IMX6 develop )

If only you have all the source code .and on arm A8 platform , I think you can use linaro ,it should be a good choice .

Dale,

Thanks for taking the time to respond, but I’ve seen most (maybe all) of those, and they’re the reason I finally resorted to asking.

They’re mostly not about developing for Angstrom on the BBB, but, rather, about replacing it with another distro. The Angstrom site, itself, only offers ready-made toolchains for the gnueabi architecture, but the BBB is (afaict) running gnueabihf. Are the calling sequences for the two the same? If I install a linaro toolchain, will its headers and libraries be compatible with the versions installed on the BBB? I don’t know (though I suspect that the answer to the latter is “no”, since linaro changes version about as often as I change my socks).

It’s just frustrating to not have a simple “This is how we made the thing you paid us for” page. Even a jar of peanut butter can’t be sold unless it includes a list of ingredients.

Ran

Ran,
Yep, definitely a bit frustrating. Seems to be common in the linux world, there are just too many ways to do things and too much hardware to support!

I did a little poking around, and although I’m not sure what your end goal is, but I think cross tools in oe would work (as would straight Linaro presumably).
Here’s what I found (which confirms what you’d thought), but take it with a gain of salt as I don’t have a ton of experience here:

  • at boot Linaro is noted as the version of gcc (I found this interesting…I didn’t know Linaro is just a gcc variant)
    gcc version 4.7.3 20130205 (prerelease) (Linaro GCC 4.7-2013.02-01)
  • gcc on the BBB reports that it is gnueabi via “-dumpmachine”
  • gcc on the BBB also reports it is using hf (hard float) via “-dumpspecs” under *multilib_defaults:

marm mlittle-endian mfloat-abi=hard mno-thumb-interwork

So I’d be inclined to just try it…hard vs soft float probably should both work and my research indicated BBB’s cortexA has hard-float. Also statically linking libraries would obviously further decouple from onboard libs (obviously at the cost of a larger binary).

FYI, you could try compiling on both your cross host and the BBB to see if the calling convention is the same. I’m sure there’s a better way, but a quick google showed the following would output C-assembly intermix:
gcc -c -g -Wa,-a,-ad main.c > main.s

I’ll be interested to see what you find as I’m eventually going to be trying to cross compiles, but a couple of other things are on the list first.
-Dale
ps. it seems buildroot also uses (or can use) Linaro

Linaro is gcc, yes, but also supports eabi, or hf ( hard float ) via two different Linaro toolchains. You just pick the one you need.

As it is a port of gcc, it works as expected. All the tools are there, and they all seem to work fine. This toolchain also seems to know where it’s stdlib is, but needs help finding its C++ libraries ( I need to look into this more ).

Anyhow I have had limited experiences with other gcc toolchains, and Linaro works exactly how I expected it to. Very simple to setup in conjunction with an IDE if you so feel compelled.

Look at the instructions for building Angstrom and when you have made an image run

bitbake -c populate_sdk image_name and that will get you a toolchain with libs suitabel from the image. This works really well.

Philip