为什么写了一个简单的软件延时程序无法调试

2019-03-24 13:31发布

我在书上抄的一段程序 #include "io430.h" #include<msp430x44x.h>
#define Const 100
vodi SoftDelay(int Factor)
{int i,j;
for(i=0;i<Factor;i++)
    for(j=0;j<Const;j++); }
void main(void)
{ _NOP();
  SoftDelay(10);
    _NOP();
   
} 出现调试对话框的内容 Building configuration: IAR_Guide - Debug
Updating build tree...
main.c 
Error[Pe101]: "IE1" has already been declared in the current scope (at line 105 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 146
io430x44x.h")
Error[Pe101]: "IFG1" has already been declared in the current scope (at line 133 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 156
io430x44x.h")
Error[Pe101]: "ME1" has already been declared in the current scope (at line 160 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 165
io430x44x.h")
Error[Pe101]: "IE2" has already been declared in the current scope (at line 189 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 172
io430x44x.h")
Error[Pe101]: "IFG2" has already been declared in the current scope (at line 212 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 179
io430x44x.h")
Error[Pe101]: "ME2" has already been declared in the current scope (at line 235 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 186
io430x44x.h")
Error[Pe101]: "WDTCTL" has already been declared in the current scope (at line 270 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 198
io430x44x.h")
Error[Pe247]: variable "MPY" has already been defined (at line 338 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 245
Error[Pe247]: variable "MPYS" has already been defined (at line 342 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 247
Error[Pe247]: variable "MAC" has already been defined (at line 346 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 249
Error[Pe247]: variable "MACS" has already been defined (at line 350 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 251
Error[Pe247]: variable "OP2" has already been defined (at line 354 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 253
Error[Pe247]: variable "RESLO" has already been defined (at line 358 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 255
Error[Pe247]: variable "RESHI" has already been defined (at line 362 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 257
Error[Pe247]: variable "SUMEXT" has already been defined (at line 366 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 259
Error[Pe101]: "P1IN" has already been declared in the current scope (at line 379 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 268
io430x44x.h")
Error[Pe101]: "P1OUT" has already been declared in the current scope (at line 409 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 270
io430x44x.h")
Error[Pe101]: "P1DIR" has already been declared in the current scope (at line 439 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 272
io430x44x.h")
Error[Pe101]: "P1IFG" has already been declared in the current scope (at line 469 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 274
io430x44x.h")
Error[Pe101]: "P1IES" has already been declared in the current scope (at line 499 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 276
io430x44x.h")
Error[Pe101]: "P1IE" has already been declared in the current scope (at line 529 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 278
io430x44x.h")
Error[Pe101]: "P1SEL" has already been declared in the current scope (at line 559 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 280
io430x44x.h")
Error[Pe101]: "P2IN" has already been declared in the current scope (at line 589 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 283
io430x44x.h")
Error[Pe101]: "P2OUT" has already been declared in the current scope (at line 619 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 285
io430x44x.h")
Error[Pe101]: "P2DIR" has already been declared in the current scope (at line 649 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 287
io430x44x.h")
Error[Pe101]: "P2IFG" has already been declared in the current scope (at line 679 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 289
io430x44x.h")
Error[Pe101]: "P2IES" has already been declared in the current scope (at line 709 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 291
io430x44x.h")
Error[Pe101]: "P2IE" has already been declared in the current scope (at line 739 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 293
io430x44x.h")
Error[Pe101]: "P2SEL" has already been declared in the current scope (at line 769 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 295
io430x44x.h")
Error[Pe101]: "P3IN" has already been declared in the current scope (at line 808 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 304
io430x44x.h")
Error[Pe101]: "P3OUT" has already been declared in the current scope (at line 838 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 306
io430x44x.h")
Error[Pe101]: "P3DIR" has already been declared in the current scope (at line 868 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 308
io430x44x.h")
Error[Pe101]: "P3SEL" has already been declared in the current scope (at line 898 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 310
io430x44x.h")
Error[Pe101]: "P4IN" has already been declared in the current scope (at line 928 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 313
io430x44x.h")
Error[Pe101]: "P4OUT" has already been declared in the current scope (at line 958 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 315
io430x44x.h")
Error[Pe101]: "P4DIR" has already been declared in the current scope (at line 988 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 317
io430x44x.h")
Error[Pe101]: "P4SEL" has already been declared in the current scope (at line 1018 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 319
io430x44x.h")
Error[Pe101]: "P5IN" has already been declared in the current scope (at line 1054 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 328
io430x44x.h")
Error[Pe101]: "P5OUT" has already been declared in the current scope (at line 1084 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 330
io430x44x.h")
Error[Pe101]: "P5DIR" has already been declared in the current scope (at line 1114 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 332
io430x44x.h")
Error[Pe101]: "P5SEL" has already been declared in the current scope (at line 1144 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 334
io430x44x.h")
Error[Pe247]: variable "LCDM3" has already been defined (at line 1634 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") Error[Pe247]: variable "LCDM9" has already been defined (at line 1658 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 601
Error[Pe247]: variable "LCDM10" has already been defined (at line 1662 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 603
Error[Pe247]: variable "LCDM11" has already been defined (at line 1666 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") Error[Pe247]: variable "LCDM17" has already been defined (at line 1690 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 617
Error[Pe247]: variable "LCDM18" has already been defined (at line 1694 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 619
Error[Pe247]: variable "LCDM19" has already been defined (at line 1698 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 621
Error[Pe247]: variable "LCDM20" has already been defined (at line 1702 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 623
Error[Pe101]: "U0CTL" has already been declared in the current scope (at line 1747 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 672
io430x44x.h")
Error[Pe101]: "U0TCTL" has already been declared in the current scope (at line 1777 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 674
io430x44x.h")
Error[Pe101]: "U0RCTL" has already been declared in the current scope (at line 1807 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 676
io430x44x.h")
Error[Pe247]: variable "U0MCTL" has already been defined (at line 1836 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 678
Error[Pe247]: variable "U0BR0" has already been defined (at line 1840 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 680
Error[Pe247]: variable "U0BR1" has already been defined (at line 1844 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 682
Error[Pe247]: variable "U0RXBUF" has already been defined (at line 1848 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 684
io430x44x.h")
Error[Pe247]: variable "U0TXBUF" has already been defined (at line 1852 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 686
io430x44x.h")
Error[Pe101]: "U1CTL" has already been declared in the current scope (at line 1900 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 729
io430x44x.h")
Error[Pe101]: "U1TCTL" has already been declared in the current scope (at line 1920 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 731
io430x44x.h")
Error[Pe101]: "U1RCTL" has already been declared in the current scope (at line 1940 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 733
io430x44x.h")
Error[Pe247]: variable "U1TXBUF" has already been defined (at line 1975 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 743
io430x44x.h")
Error[Pe101]: "TAIV" has already been declared in the current scope (at line 2023 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 786
io430x44x.h")
Error[Pe101]: "TACTL" has already been declared in the current scope (at line 2041 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 788
io430x44x.h")
Error[Pe101]: "TACCTL0" has already been declared in the current scope (at line 2069 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 790
io430x44x.h")
Error[Pe101]: "TACCTL1" has already been declared in the current scope (at line 2106 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 792
io430x44x.h")
Error[Pe101]: "TACCTL2" has already been declared in the current scope (at line 2130 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430inc C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 794
io430x44x.h")
Error[Pe247]: variable "TAR" has already been defined (at line 2153 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 796
Error[Pe247]: variable "TACCR0" has already been defined (at line 2157 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 798
Error[Pe247]: variable "TACCR1" has already been defined (at line 2161 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 800
Error[Pe247]: variable "TACCR2" has already been defined (at line 2165 of "C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incio430x44x.h") C:Program FilesIAR SystemsEmbedded Workbench 6.0 Evaluation430incmsp430x44x.h 802
Error while running C/C++ compiler
 
Total number of errors: 100
Total number of warnings: 0

此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
10条回答
yong_zhang
2019-03-25 14:56
是  你调试程序时候 , 没有加入头文件

一周热门 更多>

相关问题

    相关文章