C251 User's Guide

OBJECTADVANCED Compiler Directive

Abbreviation

OA

Arguments

None.

Default

None.

µVision

Options — C251 — Code Optimization — Linker Code Packing.

Description

The OBJECTADVANCED directive instructs the compiler to include information in the object file for linker-level program optimizations. This directive is used with the OPTIMIZE directive to shrink program size and decrease execution speed.

When enabled, the OBJECTADVANCED directive instructs the LX51 Linker/Locator to perform the following optimizations:

OPTIMIZE
Level
Linker Optimizations
Performed
0 – 7AJMP/ACALL Maximizing: The linker rearranges code segments to maximize AJMP and ACALL instructions which are shorter than LJMP and LCALL instructions.
8Common Block Subroutines: Recurring instruction sequences are converted into subroutines. This reduces program size but slightly increases execution speed. This optimization is performed on the complete application.
9Rearrange Code: When detecting common block subroutines, code is rearranged to obtain larger recurring sequences.
Example
C251 SAMPLE.C OBJECTADVANCE DEBUG