|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
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?
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.
Article last edited on: 2006-12-21 08:13:56
Did you find this article helpful? Yes No
How can we improve this article?