Hello, i'm using the XC164-µC with internal Ram at 0xC000-0xC7FF (DSRAM) & 0xF600-0xFDFF (DPRAM).
When I use 'standard' Target Layout Memory. I get a Linker Section NDATA(0xC000-0xC7FF,0xF600-0xFDFF) and I could use 4k (-Stacksize) for NEAR DATA.
If I would use more than 16kB for NCONST I select 32kB for ROM in NEAR MEMORY-Section(@Target-Layout).
In L166 LOCATE I get following line: DPPUSE (0=NDATA(0xC000 - 0xC7FF), 1=NCONST(0xC00000 - 0xC07FFF))
The DPRAM (0xF600-0xFDFF) is now not used for NEAR DATA!
How can I use this RAM also for NEAR DATA like in the case without DPPUSE?
ciao, Karl
Ps:The XC164-16CS claims that it has 8kB internal Data. But I only found 2kB DSRAM (0xC000-0xC7FF), 2kB DPRAM(0xF600-0xFDFF) and 2kB PSRAM (0xE00000-0xE007FF). Where are the remaining 2kB located?
> @Joost: > It works to assign the whole adress range in DPPUSE and > define a smaller class for NDATA. > > Thank you for the tip!
You're welcome.
I'm using the whole range in DPPUSE in combination with RESERVE to "chip away" the reserved areas. DPPUSE already generates an NDATA class, see manual. DPPUSE also just sets a DPP register to a 16KB page so it doesn't really matter if the specified range is a bit smaller or larger, as long as it's in the 16KB page. I would change it to select the whole 16KB page (C000-FFFF) to make clear a 16KB page is selected and then use RESERVE to disable the unusable areas, complete with comment to specify what the area contains, for example:
RESERVE ( 0x00F600-0x00FDFF, ; SFR's 0x00C800-0x00FFFF ; unused )
You can also choose to put the -whole- continuous memory range (from 00'0000 to MAXMEM) in the RESERVE directive, commenting out the sections that are NOT reserved but just to make clear what each area contains. That way you have one place where the whole map is explained. That's what I did.
Regards, Joost Leeuwesteijn