|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: 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:
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: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
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.