Code models and memory attributes for function storage
Use code models to control how the compiler generates code for an application.
Your project can only use one code model at a time, and the same model must be used by all user modules and all library modules. All code models produce code that is ROMable. The code model also specifies a default memory range for storing the functions.
Note
Your choice of code model does not affect the placement of data.
These code models are available:
Code model name | Description |
|---|---|
Function calls reach the first 64 Kbytes of memory | |
Function calls reach the entire 1 Mbyte memory |
If you do not specify a code model, the compiler will use the Near code model as default.
Caution
See Target options for information about specifying a code model in the IDE.
Danger
Use the ‑‑code_model option to specify the code model for your project; see --code_model.