I use a DIP module with an C164 CI. When I want to add some code and some variables in my excisting program, it does not work anymore. It must be due to the memory mapping and the linker file which are not right configured. here is the linker: (in monitor mode)
SECTIONS(?C_STARTUP_CODE%ICODE (0x01000), ?C_INITSEC (0x01150)) CLASSES(ICODE (0x000200-0x003FFF) , FCODE (0x000200-0x003FFF), NCONST (0x000200-0x003FFF) , FCONST (0x000200-0x003FFF), NDATA (0x060000-0x061FFF) , NDATA0 (0x060000-0x061FFF), FDATA (0x060000-0x061FFF) , FDATA0 (0x060000-0x061FFF), HDATA (0x060000-0x061FFF) , HDATA0 (0x060000-0x061FFF), XDATA (0x060000-0x061FFF) , XDATA0 (0x060000-0x061FFF)) RESERVE(0x04-0x0B,0x0AC-0x0AF,0x0B8-0x0BB,0x6b00-0x7fff,0xE000-0xF9FF,0x3E900-0x3FFFF)
As I said, all my work has been with the '167 & '168 so some of the following may not apply to the '164. What is the setup on your target board: RAM size & chip selection? ROM size & chip selection? Internal RAM size & location? Is there enough RAM to hold the target code, data areas & monitor code/data during debugging? Any time you modify the memory map for the target, you must modify the memory map for the monitor and then rebuild it. Otherwise the monitor loads the code/data in one location, then the target remaps the memory when run, often causing a crash. You must have ROM at 0x00'0000 for the vector table unless you have relocated the table. Will all your data fit into internal RAM? It's faster than external for data but may be much slower for code. You really need to stop and do a map of the desired memory map for the final target. Then try to map the RAM into RAM and ROM areas for the debugging target as closly to this as possible (it cuts confusion). Then change the 'External Memory' to match and check the 'L166 Locate' settings. Best luck