ARM Technical Support Knowledge Articles

USING MORE THAN 2K OF CODE SPACE

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

I'm using the C51 version 5.50 for creating firmware for the Atmel AT89S8252. This part has 8K of Flash for the code. Where do I indicate to the C51 that the internal program memory is 8K instead of 2K? Some of my program functions are mapped in address locations higher than 7FFh.

How do I indicate to the linker/locator that in some cases it should use LCALL and LJMP instructions instead of ACALL and AJMP?

ANSWER

Make sure to check that you are using ROM(LARGE) and not ROM(SMALL).

ROM(SMALL) forces the total program size to 2K or less and forces the use of AJMP and ACALL instructions.

ROM(LARGE) lets the compiler use LJMP and LCALL instructions for all function calls. That will let you create programs up to 64K in size.

Article last edited on: 2004-06-07 13:49:08

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential