# LINK COMMAND FILE FOR TEST PROGRAM # Copyright (c) 1998 by COSMIC Software # +seg .text -b 0xf000 -n .text # program start address +seg .const -a .text # constants follow code +seg .bsct -b 0x80 -m 0x80 # data start address +seg .ubsct -n iram # uninitialized zero page # # define the .share segment when using compact or memory models only # #+seg .share -a iram -is # shared segment
# Put you startup file here "C:Program FilesCOSMICCXST7_16KLibcrtsi.st7" # Put your files here ht.o # # float and integer library names depend on the model used # "C:Program FilesCOSMICCXST7_16KLiblibisl.st7" "C:Program FilesCOSMICCXST7_16KLiblibm.st7"
+seg .const -b 0xffce # vectors start address # Put your interrupt vectors file here if needed vector.o
# # define these symbols if crtsi or crtsx is used # +def __endzp=@.ubsct # end of uninitialized zpage +def __memory=@.bss # end of bss segment 我用的是st62324,自己就编了ht.h,ht.c,vector.c,然后加上io72324.h就该完成所有功能了。从错误提示看,是代码段有问题,说什么共享代码段无法定位。
Running ST7 linker clnk -m Debugyefeng.map -l"C:Program FilesCOSMICCXST7_16KLib" -o Debugyefeng.st7 Debugyefeng.lkf #error clnk Debugyefeng.lkf:1 symbol _main not defined (C:Program FilesCOSMICCXST7_16KLibcrtsx.st7 ) The command: "clnk -m Debugyefeng.map -l"C:Program FilesCOSMICCXST7_16KLib" -o Debugyefeng.st7 Debugyefeng.lkf " has failed, the returned value is: 1 exit code=1.