Compiler Framework - 2025.2 English - UG1400

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2025-11-20
Version
2025.2 English

This section discusses the common features of the MicroBlaze™ and MicroBlaze™ -V, and Cortex® A9, A53, A72, and R5 processor compilers. The following figure displays the GNU tool flow.

Figure 1. GNU Tool Flow
The GNU compilers have the following names:
MicroBlaze and MicroBlaze™ -V
mb-gcc
Cortex A9 cores
arm-none-eabi-gcc
Cortex-A53 and Cortex-A72
aarch64-none-elf-gcc
Cortex-R5F
armr5-none-eabi-gcc

The GNU compiler is a wrapper that calls the following executables:

Pre-processor (cpp0)
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 (cc1)
The compiler responsible for most of the optimizations done on the input C code and for generating assembly code.
C++ Compiler (cc1plus)
The compiler responsible for most of the optimizations done on the input C++ code and for generating assembly code.
Assembler
The assembly code has mnemonics in assembly language. The assembler does the following:
  • Converts mnemonics to machine language
  • Resolves some of the labels generated by the compiler
  • Creates an object file that passes on to the linker.
The assembler executables are named as follows:
MicroBlaze and MicroBlaze™ -V
mb-as
Cortex A9 cores
arm-none-eabi-as
Cortex-A53 and Cortex-A72
aarch64-none-elf-as
Cortex-R5F
armr5-none-eabi-as
Linker
Links all object files generated by the assembler. If you provide libraries on the command line, the linker can resolve some undefined references by linking in functions from the assembler. The linker executables are named as follows:
MicroBlaze and MicroBlaze™ -V
mb-ld
Cortex A9 cores
arm-none-eabi-ld
Cortex-A53 and Cortex-A72
aarch64-none-elf-ld
Cortex-R5F
armr5-none-eabi-ld

For details of each executable option, see the following sections:

Note: From this point forward, the references to GCC in this chapter refer to the MicroBlaze and MicroBlaze™ -V compiler, mb-gcc, and references to G++ refer to the MicroBlaze C++ compiler, mb-g++.