Keil Logo

CARM C Compiler
Discontinued – Replaced by RealView Compilation Tools

The Keil CARM C Compiler for the ARM family of microcontrollers allows you to write ARM applications in C that, once compiled, have the efficiency and speed of assembly language. Language extensions in the CARM Compiler give you full access to all resources of ARM-powered devices.

The CARM Compiler translates C source files into relocatable object modules which contain full symbolic information for debugging with the µVision Debugger or an in-circuit emulator. In addition to the object file, the compiler generates a listing file which may optionally include symbol table and cross reference information.

Feature Benefit
ARM Mode and
Thumb Mode
Code Generation
You can mix ARM and Thumb code in the same source file. ARM mode is required for interrupt handlers and fast signal-processing algorithms while Thumb mode provides the smallest code size.
Attributes for
The Keil C compiler provides function attributes that give you access to ARM hardware features
For example:
  • __irq and __fiq allow you to create standard and fast interrupt service routines in C.
  • __swi(id) allows you to invoke a software interrupt handler.
  • __ram defines a function that is copied to RAM for fast execution or Flash programming.
You may insert assembler code into C functions with assembler-level access to C variables. This capability is necessary for fast DSP and other signal-processing algorithms. The Keil compiler supports full program optimization even when inline assembler is used.
You may speed-up execution of frequently called functions by using function in-lining. Inline functions are expanded inline without the overhead associated with function call, parameter passing, and return.
The _at_ keyword may be used to specify the physical address for a variable. This allows you to easily define shared memory areas or hardware peripherals.
Passing in
CPU Registers
The Keil compiler automatically uses CPU registers to pass function arguments. It can even pass and return small C structs in registers.
Most library routines are reentrant (refer to the library reference in the Compiler User's Guide) and may be invoked from the main program thread and from interrupts. There is no need to include special protection schemes for library calls.
All floating-point operations are reentrant. Floating-point may be used in the main program thread and interrupts. No interrupt blocking or special protection schemes are required.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.