This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error: L 138 while compiling

Hi All,

Since code memory is almost full, so i'm trying to to get some free memory through optimization.

The following settings are done:

Target -> C51 -> Code optimization - >
Level: 11. Reuse common exit code
Emphasis: Favor size
Global register coloring (max. AJMP/ACALL): Checked
Linker code packing: Checked

Warnings: Level2
Bits to round for float compare: 3
Interrupt vectors at address: 0
Enable ANSI integer promotion rules: Checked

But target is being created and shows below compilation message:
Register-coloring: Linker reported a 'Address Space Overflow' error
ERROR L138: CODE GENERATION: PROBLEM WHEN PROCESSING INSTRUCTIONS
CAUSE: JUMP TARGET OUT OF RANGE
ADDRESS: 0FC9H
SEGMENT: ?PR?MAIN?MAIN

Target gets created successfully if Level: 9. Common Block Subroutines is selected.

Can somebody explain help to understand this issue?

Tool Version Numbers:
Toolchain: PK51 Prof. Developers Kit Version: 9.56.0.0
Toolchain Path: C:\Keil_v5\C51\BIN
C Compiler: C51.exe V9.56.0.0
Assembler: AX51.exe V3.15.0.0
Linker/Locator: LX51.exe V4.66.66.0
Librarian: LIBX51.exe V4.30.1.0
Hex Converter: OHX51.exe V1.45.0.0
CPU DLL: S8051.DLL V3.106.0.0
Dialog DLL: DCore51.DLL V2.81.5.0

Thanks!