C51: CONFIGURING PPAGE AND PPAGEENABLE
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 µVision 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 µVision Linker options. Specify the starting address of PDATA in the linker controls so the map file generated by the linker will be correct.
Last Reviewed: Thursday, December 21, 2006
of your data.