ARM Technical Support Knowledge Articles

CONFIGURING PPAGE AND PPAGEENABLE

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

In the STARTUP code, are PPAGEENABLE and PPAGE of concern only in the Compact memory model or do they need to be set in Small or Large memory models as well? If yes, is it sufficient to set the pdata address in uVision Linker options, or do we need to modify the startup code?

ANSWER

The COMPACT memory model by default puts all variables in the PDATA area. In the SMALL or LARGE memory models, you may specifically put variables in PDATA by declaring them with the pdata keyword:

unsigned int pdata var;

If you use the pdata keyword, or if you have any variables that reside in PDATA, you must set PPAGE and PPAGEENABLE in the startup code (STARTUP.A51).

Set the PDATA address in both the STARTUP code and in the uVision Linker options. Specify the starting address of PDATA in the linker controls so the map file generated by the linker will be correct.

MORE INFORMATION

SEE ALSO

Article last edited on: 2006-12-21 08:13:56

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