I use gcc version 7.2.1 specifically built by Analog Devices to cross compile c/c++ code to an arm cortex-A5. The compiler is provided by their IDE crosscore embedded studio