用qg4,使用的tiny模式。在程序中定义全局变量
#pragma DATA_SEG FAR_RAM word my_id;
程序中用到了该变量。编译没有问题,链接的时候出现
L1907:Fixup overflow in main,to my_id type 1,at offset 0x9
什么地方设置出问题了?我的.prm文件如下:
/* This is a linker parameter file for the QG4 */
NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */
SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */ ROM = READ_ONLY 0xF000 TO 0xFBFF; FLASH_PRO_ROM = READ_ONLY 0xFC00 TO 0xFDFF; Z_RAM = READ_WRITE 0x0060 TO 0x00FF; RAM = READ_WRITE 0x0100 TO 0x015F; ROM1 = READ_ONLY 0xFFC0 TO 0xFFCF; END
PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */ FAR_RAM INTO RAM; DEFAULT_ROM, ROM_VAR, STRINGS INTO ROM; /* ROM1 In case you want to use ROM1 as well, be sure the option -OnB=b is passed to the compiler. */ _DATA_ZEROPAGE, MY_ZEROPAGE, DEFAULT_RAM INTO Z_RAM; END
STACKSIZE 0x30
VECTOR 0 _Startup /* Reset vector: this is the default entry point for an application. */
|