|
|||||||||||
|
Technical Support Support Resources
Product Information |
Technical SupportC51: ROM(COMPACT)Information in this article applies to:
SYMPTOMSI'm using the Keil 8051 C Compiler V5.0 with bank switching. We are looking for code space savings, and I've found that the linker reports the following gaps in our application:
BANK1 EFB9H 0031H INBLOCK ?PR?_KEYTOCONTROLCODE?PROGRAM
EFEAH 0016H *** GAP ***
BANK1 F000H 026DH INBLOCK ?PR?DIAGNOSTICS?DIAG
BANK1 F637H 0031H INBLOCK ?PR?_CONTROLCODETOKEY?PROGRAM
F668H 0198H *** GAP ***
BANK1 F800H 03F1H INBLOCK ?PR?PROGRAM?PROGRAM
Is there something that I can do to minimize these gaps in the linker's placement of modules? CAUSEThese gaps are caused by using the ROM(COMPACT) directive to reduce program function size. When you compile with the ROM(COMPACT) directive, each segment must fit in an INBLOCK (2K page). With ROM(COMPACT), JMPs coded inside a function are implemented using the AJMP instruction, therefore, each function MUST fit within a 2K block. RESOLUTIONIf you change the large functions (or even the whole program) to be ROM(LARGE), the compiler uses LJMPS within the function and the function may cross over 2K boundaries. MORE INFORMATION
Last Reviewed: Tuesday, October 24, 2006 | ||||||||||
|
|||||||||||