Keil Logo

__arm: ARM Function

ARM coded functions are defined using the __arm function attribute. This function attribute is useful when you must reference interrupt functions from Thumb code.

<[>type<]> funcname (<[>args<]>) __arm

Where:

type is the type of the value returned from the function. If no type is specified, int is assumed.
funcname is the name of the function.
args is the argument list for the function.
__arm indicates the function is coded with the ARM instruction set.

For example:

void MyARMfunc (void) __arm  {    // use ARM code for following function
  l = (l * u1) + (l * u2);
}
extern void IntrptFunc (void) __arm;
.
.
.
VICVectAddr0 = IntrptFunc;        // initialize Vector Address with ARM entry

Note

  • The __arm attribute switches the CARM Compiler to ARM mode even if the THUMB mode is selected.
  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.