Cross Compile: Windows to BBB running Debian

I’m used to running an eclipse-based IDE (Codewarrior) to develop code for embedded processors, and I’d like to set up this kind of a system for the BBB.

Is there a pre-built toolchain that I can use?

Thanks!

http://www.linaro.org/ -> Downloads

Scroll down to "Binaries" pick the one you 4.7 or 4.8 just not the
aarch64 ones..

Regards,

As Robert says Linaro has Win32 binaries that do work ( I’ve done this myself back in june ish last year ). the win32 binaries also run just fine on Windows 7 enterprise x64, for what it is worth.

The ABI you choose however depends on which Linux distro you’re using. Unless things have changed since I’ve done this myself.

Hi. Thanks for the replies. I’ obviously doing something wrong!

I downloaded and unpacked “gcc-linaro-arm-linux-gnueabihf-4.8-2013.12”. I’ve set up eclipse to the point where it recognizes the compiler etc. It compiles and links my HW1.c “Hello World” program without complaint, but after I drag HW1.elf file to the BBB apply chmod +x, my attempt to run it generates

./HW1.elf: No such file or directory
even though it certainly is there.
ls -l HW1.elf

returns

-rwxr-xr-x 1 root root 29946 Jan 15 15:06 HW1.elf

and

file HW1.elf
returns
HW1.elf: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped

I can then compile the program on the BBB to create HW1, and it does work.
file HW1
returns
HW1: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x7d4b8bfc34b5b12ce5ff35dd2657c7bc9377c1ad, not stripped

I don’t know where the “GNU/Linux 2.6.16” versus “GNU/Linux 2.6.26” comes from, nor what it really means, nor what to do about it. But since that’s the difference between the two, I have to suspect that it’s important.

It’s naive, but I’ve looked for a lib with 2.6 in its name (find / -name *lib* | grep 2.6), but that’s no help.

Also, the comment “The ABI you choose however depends on which Linux distro you’re using” is a mystery to me. There weren’t any distro choices when I downloaded “gcc-linaro-arm-linux-gnueabihf-4.8-2013.12”

Many thanks for whatever help you can provide!

  • Richard

Thanks. I downloaded the “gcc-linaro-arm-linux-gnueabihf-4.8-2013.12” version and installed it. It didn’t originally solve the problem until I completely removed all files from my workspace, including the .metadata directory. It was not sufficient to remove the projects. Apparently some of their toolchain configuration remained.

I have one irritating issue: I can’t get rid of the error

Program “echo” not found in PATH HiBBB Project Properties, C++ Preprocessor Include…/Providers, [CDT GCC Built-in Compiler Settings Cross ARM] options C/C++ Scanner Discovery Problem

I’ve put a copy of echo.exe into the same directory as the gcc compiler and restarted eclipse; it didn’t help. Any ideas what I can do?

Again, thanks for your help. Next task (after curing the echo issue) will be to debug the code on the BBB from within eclipse on the PC. We’ll see how that goes.

  • Richard