Keil Logo

Function Declarations

The CARM Compiler provides a number of extensions for standard C function declarations. These extensions allow you to:

  • Declare a function as an interrupt (irq), fast interrupt (fiq), or software interrupt (swi).
  • Select the memory area (ROM or RAM) where the function is stored.
  • Declare a real-time task function.
  • Specify an absolute memory address for a function.

You may include these extensions or attributes (some of which may be combined) in the function declaration.

Function Type Description
Absolute Absolute functions are located at a specific address.
ARM ARM functions are coded using the ARM instruction set.
Fast Interrupt Fast interrupt functions are invoked by the MCU when the fast interrupt is triggered.
Inline In-line functions are expanded into the caller function. The call and parameter passing overhead is removed.
Interrupt Interupt functions are invoked by the MCU when the interrupt is triggered.
RAM RAM functions are copied to RAM for execution.
Real-Time Task Real-Time Task functions are coded without prolog or epilog and must be invoked from an RTOS.
Software Interrupt Software Interrupt functions are invoked using the SWI instruction.
THUMB Thumb functions are coded using the Thumb instruction set.
  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.