We are using MC9S12XHY controller. Controller permits 8K non paged ram and 4k paged ram. Since ouyrram consumption is more than 8K, we used paged ram.
We referred the following documents for proper implementation
TN238.pdf TN240.PDF( From freescale)
#pragma DATA_SEG __GPAGE_SEG PAGED_RAM
static unsigned int a=23;
static unsigned int b=35;
#pragma DATA_SEG DEFAULT
We verified from the .map file and variables are allocated in the Paged RAM segment.
we also faced problem while copying values between two paged ram variables
While using this variables in runtime, we observed unprecedented behavior in these RAM variables. To sum it up, if we allocate these variables in non paged ram, we didnt face any issue.