##### Syntax

-m8m

##### Description

This option instructs the compiler and linker to generate code for parts with between 128K and 8M of code memory. For devices that have 8K of code memory or less, you should use the -m8k switch so that RJMP instructions are always used and for devices with 128K of code memory or less, you should use the -m128k switch so that the 16-bit program counter of these devices is supported correctly.

The -m8m switch causes the compiler to generate trampolines for each function that could possibly be assigned to function pointers. The linker will throw away any trampoline that is unused, so functions that are not assigned to function pointers do not incur any trampoline overhead. Regardless of whether a function is assigned to a function pointer or not, all direct function calls have no overhead in either code space or execution time and never use a trampoline.

##### Setting this in CrossStudio

To use the hardware multiplier for a project:

- Select the project in the Project Explorer.
- In the Code Generation Options group set the Flash Size property to 8M.

It is not possible to set the Flash Size property on a per-file basis.

##### See also

-m8k (Generate for 8K part) and -m128k (Generate for 128K part)