2

I started playing around with Adacore Gnat 2016 for Raspberry Pi. After a few trivial tests on the Raspberry Pi 2 I switched to the Raspberry Pi Zero W and everything failed. I was a bit naive and completely ignored that there is an ARMv7 on the RPi 2 while it is an ARMv6 on the RPi Zero. Now I'm wondering whether it would be possible to rebuild Adacore Gnat for ARMv6 and the RPi Zero.

Could anyone give me a hint? Or has anyone done it before?

Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
wollud1969
  • 497
  • 4
  • 13

1 Answers1

0

As you have discovered, the AdaCore GNAT GPL only works for Raspberry Pi 2 and 3. But included in Raspbian, there is a native FSF GNAT toolchain, see https://www.makewithada.org/entry/ada_linux_sensor_framework. Will that work for you?

It is possible to recompile for ARMv6. The sources can be found in the same place as the binary you already downloaded. Cross-compiling is a bit of a hassle, but is doable with patience following the instructions, see e.g. https://solarianprogrammer.com/2017/12/07/raspberry-pi-raspbian-compiling-gcc/ for ARMv6 example. Download the GNAT source and follow the instructions there, e.g add 'ada' to --enable-languages in the example above.

FrodeTennebo
  • 531
  • 3
  • 13