0

I'm trying to compile a program to run on a Linux powered board, which has an ARM926EJ-S processor. So I've installed Debian embedded cross-development toolchain, and tried compiling an Hello World with in gcc with -march=armv5te . When I tried running the binary on the board it crashed with file not found errors (due to library versions), after that I've tried compiling with -static flag and I got a seg fault (0x0000827c in __libc_start_main (), said mr gdb trough gdbserver).

Any idea on what to do here to get something running?

user1032861
  • 487
  • 3
  • 11
  • 19
  • Make sure you use `gnueabi` toolchain, not `gnueabihf` – Marat Dukhan Jan 14 '13 at 16:57
  • You need to get the right (almost exact) toolchain for your board, otherwise it would be too painful. There are many toolchain discussions here on so that can help you understand the problem, http://stackoverflow.com/questions/13143393/distro-provided-cross-compiler-vs-custom-built-gcc – auselen Jan 14 '13 at 17:11

2 Answers2

0

Apparently the solution is to try as many toolchains as you can find. Eventually you'll find the one that works, after spending a few too many hours compiling toolchains. uClibc buildroot in this case.

user1032861
  • 487
  • 3
  • 11
  • 19
0

You can find toolchains which support ARM926EJ-S on Linaro Page. Use the most recent arm-linux-gnueabi from Linaro project. I am currently using a version with gcc 4.9.4 which you can find here

It is recommended to use -mcpu=arm926ej-s instead of -march and -mtune. See gcc documentation because it combines -march and -mtune for your specified processor. It was deprecated for x86, but not for arm.

Other possibility could be building your own toolchain via crosstools-ng. But the Linaro toolchains are working out of the box if you don't need some specific setting (for example only using static libraries).

A.K.
  • 861
  • 6
  • 12