User manual

Project creation and build UM0036
134/385 Doc ID 7705 Rev 11
The Category list box provides a choice of standard options to choose from. For
descriptions of standard options and information about further customizing them, refer to the
category sections below:
General: We recommend starting in the General settings for the Metrowerks toolset
view.
Optimizations: Customizing Metrowerks compiler optimizations
Input: Customizing Metrowerks C compiler input
Output: Customizing Metrowerks C compiler output
Listings: Customizing Metrowerks C compiler listings
C Language: Customizing Metrowerks C compiler language settings
General settings for the Metrowerks toolset
With the category set to General, you can access the following standard settings and
options:
Compiler memory models
Message Display
Optimizations
Debug info
Listings
C Language
“Do not use environment” option (-NoEnv)
Preprocessor definitions
User-defined options
Compiler memory models
From the General interface, you can choose to compile your application according to one of
three predefined memory models that can help you optimize your code’s size and
performance (see Figure 90).
Table 47 below provides a summary of these predefined memory models.
Table 47. Metrowerks C compiler memory models
Memory
model
(1)
1. For complete descriptions of memory model options, refer to the STMicroelectronics ST7 Compiler user
manual from Metrowerks.
Local
variables
(2)
2. Direct: Data must be in the zero page, so that short addressing mode is used for all data access.
Extended: Data can be either in the zero page (short addressing mode), or outside the zero page
(extended addressing mode).
Global
variables
(2)
Use
Large (-Ml)Direct
Extended or
Direct
Default for debugging
Most efficient memory model for typical
microcontroller applications.
Small (-Ms) Direct Direct
For small applications that only reference global
constant data (Strings) through _far pointers.
Extended (-Mx) Extended Direct
For large applications with lots of local and global
data