beautypg.com

Ting (see the, Limit optimizations for easier debugging, Section on – Zilog Z8F0130 User Manual

Page 101

background image

UM013037-1212

Project Menu

Zilog Developer Studio II – Z8 Encore!

User Manual

77

Limit Optimizations for Easier Debugging

Selecting this checkbox causes the compiler to generate code in which certain optimiza-
tions are turned off. These optimizations can cause confusion when debugging. For exam-
ple, they might rearrange the order of instructions so that they are no longer exactly
correlated with the order of source code statements or remove code or variables that are
not used. You can still use the debugger to debug your code without selecting this check-
box, but it might difficult because of the changes that these optimizations make in the
assembly code generated by the compiler.

Selecting the

Limit Optimizations for Easier Debugging

checkbox makes it more

straightforward to debug your code and interpret what you see in the various Debug win-
dows. However, selecting this checkbox also causes a moderate increase in code size.
Many users select this checkbox until they are ready to go to production code and then
deselect it.

Selecting this checkbox can also increase the data size required by your application. This
happens because this option turns off the use of register variables (see the

Use Register

Variables

section on page 83). The variables that are no longer stored in registers must

instead be stored in memory (and on the stack if dynamic frames are in use), thereby
increasing the overall data storage requirements of your application. Usually this increase
is fairly small.

You can debug your application when this checkbox is deselected. The debugger contin-
ues to function normally, but debugging might be more confusing due to the factors
described earlier.

This checkbox interacts with the

Generate Debug Information

checkbox (see the

Gener-

ate Debug Information

section on page 70).

Memory Model

The

Memory Model

drop-down list box allows you to choose between the two memory

models,

Small

or

Large

. Select

Small

for a small memory model or select

Large

for a

large memory model. Using the small model results in more compact code and might
reduce the RAM requirements as well. However, the small model places constraints on the
data space size (not on the code space size) of your application. Some applications might
not be able to fit into the small model’s data space size; the large model is provided to sup-
port such applications. See the

Memory Models

section on page 199 for full details of the

memory models.

Frames

Select

Static

for static frames or select

Dynamic

for dynamic frames. The use of static

frames generally helps reduce code size, but this option can only be used if your code
obeys certain restrictions. Specifically, recursive function calls (either direct or indirect)

Note: