Hi all, (C167; running everything from RAM, copied from flash in the startup-file and then re-mapping the BUSCON's) Does anybody have a suggestion on how to put DATA in one continuous memory area and CONST+CODE in a second memory area? For instance, segment 1 and 2 for DATA, 3+ for CONST+CODE (leaving seg0 unused)? This way you can easily check the DATA memory and calculate CRC's on the CONST+CODE area. I'm stuck with the DPP pointers. DPP3 -must- be set to the upper 16KB of the first segement and will then automatically contain NCONST data. If I set DPP0-2 to the rest of segement 0, it will contain NDATA. The other problem is that I -must- put a display buffer in segment 0, because of a PEC transfer to the physical display (also in seg0)... One solution would be to map the first segment to RAM using BUSCON1 and to also map a higher up region to RAM using BUSCON2, and setting DPP0-DPP2 to the high memory area. But that still leaves DPP3, which results in NCONST data in segement 0, which is more difficult to check... Any tips would be appreciated. Regards, Joost Leeuwesteijn
Hi, Just in case somebody reads this thread and has a similar problem: I figured out a possible solution. My memory map is now split into segment 0 (unused mostly), segment 1 and 2 for data, segment 3+ for const+code. That way it's easy to compute checksums, etc. I used DPPUSE to set NDATA/DPP0+1 to segment 1, NCONST/DPP2 to segment 3. This automatically leaves DPP3 set to the system area (upper 16KB of segment 0). This still leaves the problem of putting a display buffer variable in near area because it also has to be in segment 0 because of a PEC transfer (C167). I moved it up a bit so it falls in DPP3 space and can still be used with fast access. I changed near into sdata in the code; even though you can put the near area at a different location, the linker file will still show NDATA0, which doesn't match the DPPUSE settings... A bit strange. Anyhoo, this seems to work fine. Regards, Joost Leeuwesteijn