This section discusses the common features of the MicroBlaze™ and Cortex® A9, A53, A72, and R5 processor compilers. The following figure displays the GNU tool flow.
arm-none-eabi-gccfor Cortex A9 cores
aarch64-none-elf-gccfor Cortex-A53 and Cortex-A72
The GNU compiler is a wrapper that calls the following executables:
- Pre-processor (
- This is the first pass invoked by the compiler. The pre-processor replaces all macros with definitions as defined in the source and header files.
- Machine and language specific compiler
- This compiler works on the pre-processed code, which is the output of the first
stage. The language-specific compiler is one of the following:
- C Compiler (
- The compiler responsible for most of the optimizations done on the input C code and for generating assembly code.
- C++ Compiler (
- The compiler responsible for most of the optimizations done on the input C++ code and for generating assembly code.
- C Compiler (
- The assembly code has mnemonics in assembly language. The assembler converts
these to machine language. The assembler also resolves some of the labels
generated by the compiler. It creates an object file which is passed on to the
linker. The assembler executables are named as follows:
arm-none-eabi-asfor Cortex A9 cores
aarch64-none-elf-asfor Cortex-A53 and Cortex-A72
- Links all the object files generated by the assembler. If libraries are
provided on the command line, the linker resolves some of the undefined
references in the code by linking in some of the functions from the assembler.
The linker executables named as follows:
arm-none-eabi-ldfor Cortex A9 cores
aarch64-none-elf-ldfor Cortex-A53and Cortex-A72
Executable options are described in the following sections:
- Commonly Used Compiler Options: Quick Reference
- Linker Options
- MicroBlaze Compiler Usage and Options
- MicroBlaze Linker Options
- Arm Compiler Usage and Options
mb-gcc, and references to G++ refer to the MicroBlaze C++ compiler,