1. The tiarmclang Compiler Toolchain

The TI Arm Clang Compiler Toolchain (tiarmclang) is the next generation TI Arm compiler, replacing the previous TI Arm Compiler Tools (armcl). You can use the tiarmclang compiler toolchain to build applications from C, C++, and/or assembly source files to be loaded and run on one of the Cortex-M or Cortex-R Arm processors that are supported by the toolchain.

1.1. Toolchain Components

The tiarmclang compiler toolchain consists of many components. A brief description of the major components is provided in the subsections below.

1.1.1. Essential Tools

  • tiarmclang

    The C/C++ compiler and integrated assembler, tiarmclang, is used to compile C and C++ source files or assemble GNU-syntax Arm assembly language source files. By default, it will automatically invoke the linker, tiarmlnk, to combine object files generated by the compiler with object libraries to create an executable program that can be loaded and run on an Arm processor.

    The tiarmclang compiler is derived from the open source Clang compiler and its supporting LLVM infrastructure. You can find more details about Clang and LLVM at The LLVM Compiler Infrastructure site.

  • tiarmasm

    The legacy TI-syntax Arm assembler, tiarmasm, should only be used to assemble assembly source files that are written in legacy TI-syntax Arm assembly language. For further information about how to invoke the legacy TI-syntax Arm assembler please refer to the Assembling Legacy TI-Syntax Arm Assembly Language Source section of this getting started guide.

  • tiarmlnk

    The linker, tiarmlnk, is used to combine object files that are either compiler generated or have been archived into one or more object libraries to create an executable program that can be loaded and run on an Arm processor. It will typically be invoked from the tiarmclang command line so that tiarmclang can implicitly set up the object library search path and implicitly include runtime libraries in the link.

  • tiarmar

    The archiver, tiarmar, can be used to collect object files together into an object library or archive that can be specified as input to the linker to provide definitions of functions or data objects that are not otherwise available in the compiler generated object files that are input to the link. For example, the standard C runtime library is an example of an object library that collects pre-built object files that contain definitions of C runtime functions that are required by the language standard to be provided with a C compiler toolchain like tiarmclang.

    The archiver also provides a convenient way to collect logically related object files into an object library that can be distributed as a product to provide capability for use in the development of customer Arm applications.

  • tiarmhex

    The hex conversion utility, tiarmhex, can be used to convert ELF files into other object formats, such as ASCII-Hex, Intel MCS-86, and Motorola-S among others, that can then be downloaded to an EPROM programmer.

1.1.2. Runtime Libraries

  • libc++abi and libc++

    The libc++ library provides an implementation of the standard C++ library and depends on the libc++abi library to provide implementations of low-level language features.

  • libc

    The libc library provides an implementation of the C standard runtime features and capabilities that are to be provided as part of a C compiler toolchain.

  • compiler-rt

    The compiler-rt runtime library helps to support the code coverage features in the tiarmclang compiler as well as providing an implementation of low-level target-specific functions that can be used in compiler generated code.

1.1.3. Code Coverage Utilities

  • tiarmcov

    The tiarmcov tool shows code coverage information for programs that have been insstrumented to emit profile data.

  • tiarmprofdata

    The profile data tool, tiarmprofdata, is used to merge multiple profile data files generated by profile-guided optimization instrumentation and merges them together into a single indexed profile data file.

1.1.4. Object File Editing and Information Utilities

  • tiarmdem

    The C++ name demangler, tiarmdem, is a debugging aid that converts names that have been mangled by the compiler back to their original names as declared in the C++ source code. The tiarmdem tool can be used on a compiler generated assembly file or a linker generated map file that contains instances of C++ mangled names.

  • tiarmnm

    The name utility, tiarmnm, prints the list of symbol names defined and referenced in an object file, executable file, or object library. It also prints the symbol values and an indication of each symbol’s kind.

  • tiarmobjcopy

    The object copying and editing tool, tiarmobjcopy, can make a semantic copy of an input object file to an output object file, but command-line options are available that allow parts of the input object file to be edited before writing the result of the edit to the output file. For example, the --strip-debug option can be used to remove all debug sections from the output.

  • tiarmobjdump

    The object file dumper utility, tiarmobjdump, can be used to print the contents of an object file. It is commonly used to print out specific parts of the input object file using one of its available options. For example, its -d option will disassemble all text sections found in the input object file. For more details about available options use tiarmobjdump’s --help option.

  • tiarmofd

    Like tiarmobjdump, the object file display utility, tiarmofd, can be used to print the contents of object files, executable files, and object libraries. The output can be in text format or in XML. There are also tiarmofd options available to alter how text output is displayed and whether DWARF debug information is to be included in the output.

  • tiarmreadelf

    The GNU-style ELF object reader, tiarmreadelf, can be used to display low-level format-specific information about one or more object files. Like tiarmobjdump and tiarmofd, tiarmreadelf provides command-line options to allow you to display certain pieces of information from an object file like relocation entries or section headers.

  • tiarmsize

    The GNU-style size information utility, tiarmsize, prints size information for binary files. The output displayed will show the total size for text sections, for bss sections, and data section as well as a grand total.

1.2. Software Development Flow

If the source code for your program consists of some combination of:

  • C and/or C++ source files (.c, .C, or .cpp extension)

  • GNU-syntax Arm assembly source files (.s or .S extension)

  • Legacy TI-syntax Arm assembly source files (.asm extension)

the compile, assemble, and link part of your development flow will look something like this:

../_images/tiarmclang_dev_flow1.png

Note that:

  • tiarmclang will interpret files with a .c extension as C source, invoking the compiler

  • tiarmclang will interpret files with a .C or .cpp extension as C++ source, invoking the compiler

  • tiarmclang will interpret files with a .s extension as GNU-syntax Arm assembly source, invoking the integrated GNU-syntax Arm assembler

  • tiarmclang will interpret files with a .S extension as GNU-syntax Arm assembly source that needs to be pre-processed, invoking the pre-processor first, and then the integrated GNU-syntax Arm assembler

  • files with an .asm extension are usually assembly source files written with legacy TI-syntax Arm assembly language that can be processed by the standalone legacy TI-syntax Arm assembler. You can also invoke the legacy TI-syntax Arm assembler from the tiarmclang command line with the help of tiarmclang’s “-x ti-asm” option (see Invoking the TI-Syntax ARM Assembler from tiarmclang for details).

All of the object files generated (.o extension) are then combined by the linker and linked against any applicable runtime libraries to create an executable output file that can be loaded and run on a TI Arm processor.