//====================================================主程序 #include "msp430x44x.h" extern chu //------------------------------------ NAME main ORG 0FFFEh DW RESET //------------------------------------ RSEG CSTACK RSEG CODE //------------------------------------ RESET mov.w #SFE(CSTACK),SP main mov.w #WDTPW+WDTHOLD,&WDTCTL //------------------------------------- mov.w #40,R12; mov.w #20,R13; call #chu //------------------------------------- main1 jmp main1 //------------------------------------- END
//======================================================子程序 #include "msp430x44x.h" unsigned int kk; unsigned int chu(unsigned int i,unsigned int j) { kk=kk+1;//完成一次全局变量计数 return(i/j);//主程序中进行调用 }
//=======================================================报错: Error[e46]: Undefined external "?cstart_init_zero" referred in quanjuyuchu ( G: Error[e46]: Undefined external "?DivMod16u" referred in quanjuyuchu ( G:
//====================================================主程序
#include "msp430x44x.h"
extern chu
//------------------------------------
NAME main
ORG 0FFFEh
DW RESET
//------------------------------------
RSEG CSTACK
RSEG CODE
//------------------------------------
RESET mov.w #SFE(CSTACK),SP
main mov.w #WDTPW+WDTHOLD,&WDTCTL
//-------------------------------------
mov.w #40,R12;
mov.w #20,R13;
call #chu
//-------------------------------------
main1
jmp main1
//-------------------------------------
END
//======================================================子程序
#include "msp430x44x.h"
unsigned int kk;
unsigned int chu(unsigned int i,unsigned int j)
{
kk=kk+1;//完成一次全局变量计数
return(i/j);//主程序中进行调用
}
//=======================================================报错:
Error[e46]: Undefined external "?cstart_init_zero" referred in quanjuyuchu ( G:
Error[e46]: Undefined external "?DivMod16u" referred in quanjuyuchu ( G:
//=======================================================备注
我用的5.2版本的IAR 不知道是哪里设置出的问题?请各位大侠帮助解决
[ 本帖最后由 jhw3378 于 2012-2-10 10:17 编辑 ]一周热门 更多>