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 Chris Walsh, 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. Read it here »

Hello World ARM C Compiler Tutorial

 

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. Read it here »

 

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. Read it here »

 

Advanced ARM Compiler features tutorial

 

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. Read it here »

 

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. Read it here »

Targeting Processors, FPUs and NEON

 

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. Read it here »

 

For more DS-5 Development Studio tutorials, visit http://ds.arm.com/developer-resources/tutorials/