Hi I am working on a project using the XC164CS micro with a 128K external flash chip connected. The internal 128K ROM of the XC164 starts at address 0xC00000, while I have the external ROM configured to start at address 0x100000. The external ROM is working fine, but when I run L166, it locates as much code as possible in the external ROM space before using the internal ROM space of the XC164. The program runs, but execution is slow due to the access time of the external ROM being substantially longer than that of the internal ROM. Can L166 be configured to locate code in the internal ROM before using the external ROM? The SECTIONS directive and http://www.keil.com/support/man/docs/l166/l166_in_locating.asp hint towards an answer but I can't quite grasp it. Can anyone help me with this please? Even configuring L166 to allocate memory backwards from the end of the available memory space would be useful. At the moment I'm passing the following control string to L166:
TO "netmgt_test_c166" RESERVE (0xC00000-0xC03FFF) VECTAB (0xc10000) CLASSES (ICODE (0xC00000-0xC1FFFF), FCODE (0x100000-0x11FFFF, 0xC00000-0xC1FFFF), FCONST (0x100000-0x11FFFF, 0xC00000-0xC1FFFF), HCONST (0x100000-0x11FFFF, 0xC00000-0xC1FFFF), XCONST (0x100000-0x11FFFF, 0xC00000-0xC1FFFF), SDATA (0xC000-0xCFFF, 0xF600-0xFDFF), SDATA0 (0xC000-0xCFFF, 0xF600-0xFDFF), IDATA (0xF600-0xFDFF), IDATA0 (0xF600-0xFDFF), FDATA (0x20000-0x2FFFF), FDATA0 (0x20000-0x2FFFF), HDATA (0x20000-0x2FFFF), HDATA0 (0x20000-0x2FFFF), XDATA (0x20000-0x2FFFF), XDATA0 (0x20000-0x2FFFF)) DPPUSE (0=NDATA(0x20000 - 0x23FFF), 1=NCONST(0x100000 - 0x107FFF)) CINITTAB (0x100000-0x11FFFF)