Keil Logo

C51: Configuring PPAGE and PPAGEENABLE

Information in this article applies to:

  • C51 Version 5 and Later


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: Friday, January 8, 2021

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

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.