1

Let's say I compiled C-program on RaspberryPi, can I run this binary on let's say Cubietruck? How to know for sure that 2 ARM processors are compatible? Are they all compatible between each other? It should be some easy answer referring instruction set supported by processors, but I can't find any good materials on that.

vladimir
  • 2,635
  • 3
  • 23
  • 26

1 Answers1

3

There are several conditions for that:

  • Your executable should use the "least common denominator" of all the ARM microarchitectures you wish to support. See gcc's -march=... option for that. Assuming you're running Linux, grep '^model' /proc/cpuinfo should give you that information for each platform.

  • (related) Some features may not be supported by all your target ARM cores (FPU, NEON, etc...), so be very careful with that.

  • You should, of course, run the same OS on all supported platforms.

  • You need to make sure that all supported platforms run the same ABI; ARM has an history of ABIs changes, so you must take this into consideration.

If you're lucky enough to target only reasonably modern ARM platforms, you should be able to find some common ground (EABI or Hard Float ABI). Otherwise you probably have no choice but to maintain several versions of your executable.

Community
  • 1
  • 1
xbug
  • 1,394
  • 1
  • 11
  • 18