Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Tools, Software and IDEs blog 6 ARM Compiler tutorials to help you write better software
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
  • Arm Compiler
  • Compilers
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

6 ARM Compiler tutorials to help you write better software

Joe Alderson
Joe Alderson
January 24, 2014
2 minute read time.

Gain a deeper understanding of the ARM® Compiler and the optimization techniques it uses. By understanding how to control these optimizations, your code can benefit from speed increases, size savings and lower redundancy. These tutorials have been put together by chriswalsh, inspired by some of the more frequently asked questions and most popular sections of ARM Compiler documentation. Follow them through easily by downloading a 30-day evaluation of DS-5 Development Studio.

1. Building "Hello World" Using the ARM Compiler

There's no shame in starting from the basics, so our first tutorial covers how to set up DS-5 Development Studio to select the ARM Compiler and choose the right optimization level from the C/C++ build properties. If this is the first time you have used DS-5, then learning where all the build options are will be vital for more complex projects.

2. ARM Compiler Optimization

This tutorial explains all the different kinds of optimizations that the ARM Compiler carries out, including automatic vectorization for NEON , tailcall optimization and tail recursion, common subexpression elimination, cross jump elimination and table-driven peepholing. Knowing how to control compiler optimization can help you compile for speed or code size and affects the visibility of your C code when debugging.

3. Beyond "Hello World": Advanced Compiler Features

Learn about some of the more advanced features of the ARM Compiler toolchain, such as compiling mixed C and assembly source files. Knowing how the ARM linker (armlink) combines object code from ARM compiler (armcc) and ARM assembler (armasm) will help you to understand how the final .axf file is put together. The example in the tutorial gives you snippets of assembly language and C to illustrate this. Also covered is linker feedback, where the compiler and linker collaborate to remove unused code, providing diagnostic .txt files so you can see which functions have been removed as you go.

4. Accessing Memory Mapped Peripherals

In most ARM embedded systems, peripherals are located at specific addresses in memory. It is often convenient to map a C variable onto each register of a memory-mapped peripheral, and then use a pointer to that variable to read and write the register. In your code, you must consider not only the size and address of the register, but also its alignment in memory.

5. Targeting Processors, Floating-Point Units and NEON

Understand when to choose between architecture or processor during compilation to take full advantage of processor-specific features, or to maximize compatibility. Every CPU target also has an associated implicit Floating-Point Unit, which can be overridden at compile time if you want. In this tutorial, it is explained how and why you might do this. Finally, this tutorial covers enabling NEON and the various methods of creating code that uses NEON instructions.

6. Using Inline Assembly to Improve Code Efficiency

ARM Compiler provides an inline assembler that enables you to write optimized assembly language routines and to access features of the target processor not available from C or C++. This tutorial explains how to use the __asm keyword to incorporate inline ARM syntax assembly code into a function. Also covered is the use of named register values to access registers of an ARM archiecture-based processor.

Anonymous
Tools, Software and IDEs blog
  • Python on Arm: 2025 Update

    Diego Russo
    Diego Russo
    Python powers applications across Machine Learning (ML), automation, data science, DevOps, web development, and developer tooling.
    • August 21, 2025
  • Product update: Arm Development Studio 2025.0 now available

    Stephen Theobald
    Stephen Theobald
    Arm Development Studio 2025.0 now available with Arm Toolchain for Embedded Professional.
    • July 18, 2025
  • GCC 15: Continuously Improving

    Tamar Christina
    Tamar Christina
    GCC 15 brings major Arm optimizations: enhanced vectorization, FP8 support, Neoverse tuning, and 3–5% performance gains on SPEC CPU 2017.
    • June 26, 2025