User`s manual

Dynamic C Users Manual digi.com 281
Optimize For
Allows for optimization of the program for size or speed. When the compiler knows more than
one sequence of instructions that perform the same action, it selects either the smallest or the
fastest sequence, depending on the programmer’s choice for optimization.
The difference made by this option is less obvious in the user application (where most code is
not marked nodebug). The speed gain by optimizing for speed is most obvious for functions
that are marked nodebug and have no auto local (stack-based) variables.
BIOS Memory Setting
A single, default BIOS source file that is defined in the system registry when installing
Dynamic C is used for both compiling to RAM and compiling to Flash. Dynamic C defines a
preprocessor macro, _FLASH_, _RAM_ or _FAST_RAM_ depending on which of the fol-
lowing options is selected. This macro is used to determine the relevant sections of code to
compile for the corresponding memory type.
Code and BIOS in Flash - If you select this option, the compiler will load the BIOS to
Flash when cold-booting, and will compile the user program to Flash where it will nor-
mally reside. Note that this option cannot work for boards with serial boot flashes.
These boards should use Code and BIOS in Flash, Run in RAM.
Code and BIOS in RAM - If you select this option, the compiler will load the BIOS to
RAM on cold-booting and compile the user program to RAM. This option is useful if
you want to use breakpoints while you are debugging your application, but you don’t
want interrupts disabled while the debugger writes a breakpoint to Flash (this can take
10 ms to 20 ms or more, depending on the Flash type used). It is also possible to have
a target that only has RAM for use as a slave processor, but this requires more than
checking this option because hardware changes are necessary that in turn require a spe-
cial BIOS and coldloader.
Code and BIOS in Flash, Run in RAM - If you select this option, the compiler will load
the BIOS to Flash when cold-booting, compile the user program to Flash, and then the
BIOS will copy the flash image to the fast RAM attached to CS2. This option supports
a CPU running at a high clock speed (anything above 29 MHz) and should be used for
Rabbit core modules with serial boot flash.
This is the same as the command line compiler -mfr option.
Max Shown
This limits the number of error and warning messages displayed after compilation.
List Files
Checking this option generates an assembly list file for each compile. A list file contains the
assembly code generated from the source file.
The list file is placed in the same directory as your program, with the name
<Program Name>.LST. The list file has the same format as the Disassembled Code win-
dow. Each C statement is followed by the generated assembly code. Each line of assembly
code is broken down into memory address, opcode, instruction and number of clock cycles.
See page 294 for a screen shot of the Disassembled Code window.