If you want to use Debian packages (corresponding to the ARM toolchain), you should install gcc-arm-none-eabi which provides C and C++ cross-compilers for 32-bit ARM, including Cortex-R processors:
apt-get install -y --no-install-recommends gcc-arm-none-eabi
The compiler command for C++ will then be arm-none-eabi-g++.
If you need the STL, you should also install libstdc++-arm-none-eabi-newlib:
apt-get install -y --no-install-recommends libstdc++-arm-none-eabi-newlib
armr5-none-eabi-g++ is (was) available in the Xilinx SDK; the relevant SDK nowadays would appear to be Vitis. For a container image you’d probably be best off installing it using the full unified installer archive. (I haven’t tried this so I can’t confirm that the armr5-none-eabi is included in current versions.)
c++ - linking succeeds with arm-none-eabi-g++ but not arm-none-eabi-gcc - Stack Overflow
Don't require a native compiler when doing only cross-compilation
arm-none-eabi-gcc toolchain is not working - Stack Overflow
software installation - Installing arm-none-eabi-gcc - Unix & Linux Stack Exchange
gcc-arm-none-eabi toolchain, my major question is, why is it made and for what problem to solve ? before toolchains existed, what were the methods used to program a chip ??
also, who makes toolchains and how are they doing it ??
Here is an excellent doc.
Tool chains have a loose name convention like arch [-vendor] [-os] - eabi
arch - refers to target architecture (which in our case is ARM) vendor - refers to toolchain supplier os - refers to the target operating system eabi - refers to Embedded Application Binary Interfacesome illustrations as follows :
- arm-none-eabi - This tool chain targets for ARM architecture, has no vendor, does not target an operating system and complies with the ARM EABI.
- arm-none-linux-gnueabi - This toolchain targets the ARM architecture, has no vendor, creates binaries that run on the Linux operating system, and uses the GNU EABI. It is used to target ARM-based Linux systems.
Each architecture or architecture/os couple has an ABI. The ABI (Application binary Interface) describes how functions should be called, syscalls numbers, arguments passed, which registers can be used ...
The abi describes how the compiler should generate the assembly.
If you use only assembler you don't need to care about the ABI.
arm-elf and arm-none-eabi just use two versions of the Arm ABI. The eabi toolchain uses a newer revision, but could also be called arm-elf-eabi, as it generates elf too.