Keil Logo

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 – 7 AJMP/ACALL Maximizing: The linker rearranges code segments to maximize AJMP and ACALL instructions which are shorter than LJMP and LCALL instructions.
8 Common 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.
9 Rearrange Code: When detecting common block subroutines, code is rearranged to obtain larger recurring sequences.
Example
C251 SAMPLE.C OBJECTADVANCE DEBUG
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.