Jon, I tried that example you gave me, and it didn't seem to work. I think there may be problems with the development kit. David
Opps, I gave the wrong page size before, It should be should be 16k. #define PAGESZ 0x4000 Another idea: You can use plain old "xdata variables", if you do not need "xdata mapped IO" or more than 64k of RAM. Just use:
PageType = 0; //all page banks are ram PageFor4000 = 0x1; // 0_4000 to 0_7FFF PageFor8000 = 0x2; // 0_8000 to 0_BFFF PageForC000 = 0x3; // 0_C000 to 0_FFFF
I did try this: PAGETYP = 0x14; PAGEA = 0x01; PAGEB = 0x01; PAGEC = 0x00; Hardcode the pages, but it didn't work, the problem is that the first segment is actually code. So when i used the BL51 locate options and set xdata 0xc000-0xffff it seem to work. However i can't seem to set this in the target section, it complains about it being out of range. The other thing is that i have defined a few larger buffers and now the Error L105 and L107 are appearing. This is with it set to 0xc000-0xffff. Total buffers around 20k. David
Try this for 8k of code and 24k of xdata. Note there are 2 "hidden registers" you can not change:
// "PAGETYP0 = ROM" // "PAGE0 = 0x0"; // 0_0000 to 0_3FFF
PAGETYP = 0x15; //pages A,B,C are ram (not 0x00 or 0x14) PAGEA = 0x1; // 0_4000 to 0_7FFF PAGEB = 0x2; // 0_8000 to 0_BFFF PAGEC = 0x3; // 0_C000 to 0_FFFF
EPROM#1: start 0x0000 size 0x4000 RAM#1: start 0x4000 size 0xC000
I tried 0xefff and it is happy there but for some reason doesn't like 0xffff. 0x14 was from one of there examples i was playing around with. Question: the datasheet says 128k rom and 128 ram. Does this mean that total space is 128k and i'm just breaking it up into segments and defining the types? So i can have 64k ROM and 64k RAM? Also if i'm using only 128k then i really on need one page register? ie PageA and the others are for larger memory spaces. In this case its just memory fold over right? David
View all questions in Keil forum