This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Allocating PSRAM to a module with medium memory model

Hi,
We are using XC164CS architecture which has 2K-DPRAM, 2K-SRAM and 2K-PSRAM.
The address ranges are:
We have project memory model set as Medium. We would like to allocate PSRAM to some modules ( C files ) and rest of the modules ( C files ) working with DPRAM and SRAM.
To allocate PSRAM to a module we use renameclass as follows:
#pragma RENAMECLASS (NDATA = FDATA)
where the FDATA refers to PSRAM location.
Our questions in this above assumptions are as follows:
1. Will this renameclass definition is sufficient to allocate all RAM variables in that module into PSRAM.
2. Do we need to assign the module to use the PSRAM as LARGE and rest of them as MEDIUM. If so the compiler does not allow me to do that. The compiler allows to change only small to large and not medium to large. I can't understand why it is so?
3. We dont want to add all variable to use the PSRAM to say FAR in it which will increase the complexity of the coding and review processes.
If anyone experienced the same kind of issue and found a solution, request you to please share me the suggestions for the same.
Thanks,
John

0