C Language Restrictions

There are several additional restrictions to the C language for CLA.

Most GCC extensions are supported by the CLA compiler. Both the C and the CLA compiler have GCC extensions enabled by default. See the --relaxed_ansi option in Section 6.15.3 and the list of GCC language extensions in Section 6.16 for more information.

The interrupt function attribute described in Section 6.10.16 can be used with CLA interrupts, so long as you do not include any arguments to the interrupt attribute. The INTERRUPT pragma is also supported by the CLA compiler. For example, the following uses are supported:

__attribute__((interrupt)) void interrupt_name(void) {...} #pragma INTERRUPT(interrupt_name); void interrupt _name(void) {...}

For CLA2 background tasks, the "BACKGROUND" argument specifies that this is a background task instead of a regular interrupt. The following uses are supported.

__attribute__((interrupt("BACKGROUND"))) void task_name(void) {...} #pragma INTERRUPT(task_name, "BACKGROUND"); void task_name(void) {...}

The CLA compiler does not permit function calls to be made in background tasks. Inline functions are permitted and can be used instead.