打印

关于KEIL的问题---uVision3求助

[复制链接]
5115|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
风语者1979|  楼主 | 2007-9-3 15:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我以前都是用的uVision2,现在用uVision3,其实没太大的区别,就是多了一个STARTUP.A51文件,我都是按照书上说的步骤重新使用,但是为什么在编译的时候总是出现下面的提示:
  Build target 'Target 1'
  compiling Text2.c...
  linking...
  BL51 BANKED LINKER/LOCATER V6.00 - SN: K1SNC-DZZ9JV
  COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2005
  "STARTUP.obj",
  "Text2.obj" 
  TO "text2" 
  *** FATAL ERROR L210: I/O ERROR ON INPUT FILE:
      EXCEPTION 0021H: PATH OR FILE NOT FOUND
      FILE: Text2.obj
  Target not created

为什么说我没创建目标呢?我完全按照书上的步骤在做,就是没做对,谁知道为什么?
  
  

相关帖子

沙发
jack.king| | 2007-9-3 15:37 | 只看该作者

把你的程序贴出来

使用特权

评论回复
板凳
风语者1979|  楼主 | 2007-9-3 16:18 | 只看该作者

程序如下

#pragma SRC
#include<stdio.h>
#include<reg51.h>
#define TRUE 1
#define FALSE 0
#define DELAY_VALUE 3
#define PinDrvKey1 P1_0
#define PinDrvKey2 P1_1
#define PinDrvKey3 P1_2
#define PinDrvKey4 P1_3                   //键盘扫描的驱动线
#define PinScanKey1 P1_4
#define PinScanKey2 P1_5
#define PinScanKey3 P1_6
#define PinScanKey4 P1_7                  //键盘扫描的信号获取线
#define PinLamp P0_0
#define PinSpeaker P0_1

sbit P0_0=P0^0;
sbit P0_1=P0^1;
sbit P0_2=P0^2;
sbit P0_3=P0^3;
sbit P0_4=P0^4;
sbit P0_5=P0^5;
sbit P0_6=P0^6;
sbit P0_7=P0^7;
sbit P1_0=P1^0;
sbit P1_1=P1^1;
sbit P1_2=P1^2;
sbit P1_3=P1^3;
sbit P1_4=P1^4;
sbit P1_5=P1^5;
sbit P1_6=P1^6;
sbit P1_7=P1^7;
sbit P2_0=P2^0;
sbit P2_1=P2^1;
sbit P2_2=P2^2;
sbit P2_3=P2^3;
sbit P2_4=P2^4;
sbit P2_5=P2^5;
sbit P2_6=P2^6;
sbit P2_7=P2^7;

void initial(void);
void delay(short i);
unsigned char keyscan(void);

void main(void)
 {
   unsigned char keyword;
   initial();         //键盘驱动信号都设为底
   keyword=keyscan();
   } 

void initial(void)
 {
   P1_0=FALSE;
   P1_1=FALSE;
   P1_2=FALSE;
   P1_3=FALSE;        //键盘驱动信号都设为底
   P0_0=TRUE;    //发光二极管设为不亮
   P0_1=TRUE;    //蜂鸣器不叫
   }

unsigned char keyscan()
  {
   PinDrvKey1=TRUE;
   if(PinScanKey1==TRUE)
       PinLamp=FALSE;
       PinSpeaker=FALSE;
       delay(DELAY_VALUE);   //如果判断有信号则延时一次
       PinLamp=TRUE;
       PinSpeaker=TRUE;
   if(PinScanKey1==TRUE)
      {
        delay(DELAY_VALUE) //假如判断还有信号则再延时
        if(PinScanKey1==TRUE)
          return 1;  }        //确认确实有按键信号,返回键值
    if(PinScanKey2==TRUE)
      PinLamp=FALSE;
      PinSpeaker=FALSE;
      delay(DELAY_VALUE);       //如果判断有信号,则延时一次
      PinLamp=TRUE;
      PinSpeaker=TRUE;
   if(PinScanKey2==TRUE)
      {
        delay(DELAY_VALUE);    //假如判断还有信号则再延时       
        if(PinScanKey2==TRUE)
           return 5;}//确认确实有按键信号,返回键值
   if(PinScanKey3==TRUE)
      PinLamp=FALSE;
      PinSpeaker=FALSE;
      delay(DELAY_VALUE);//判断如果有信号,则延时一次
      PinLamp=TRUE;
      PinSpeaker=TRUE;
    if(PinScanKey3==TRUE)
      {
         delay(DELAY_VALUE);  //假如判断还有信号,则再延时
         if(PinScanKey3==TRUE)
           return 9;} //确认确实又按键信号,返回键值
    if(PinScanKey4==TRUE)
      PinLamp=FALSE;
      PinSpeaker=FALSE;
      delay(DELAY_VALUE); //判断如果有信号,则延时一次
      PinLamp=TRUE;
      PinSpeaker=TRUE;
     if(PinScanKey4==TRUE)
        {
          delay(DELAY_VALUE);   //假如判断还有信号,则再延时
          if(PinScanKey4==TRUE)
            return  12;}//确认确实有按键信号,则再延时
      PinDrvKey1=FALSE; //以上语句扫描第一列
      PinDrvKey2=TRUE;
     if(PinDrvKey1==TRUE)
         PinLamp=FALSE;
         PinSpeaker=FALSE;
         delay(DELAY_VALUE); //如果判断有信号,则延时一次
         PinLamp=TRUE;
         PinSpeaker=TRUE;
     if(PinScanKey1==TRUE)
         {
           delay(DELAY_VALUE); //如果判断有信号,则再延时
           if(PinScanKey1==TRUE)
        return  2;}//确认确实有按键信号返回键值
     if(PinScanKey2==TRUE)
         PinLamp=FALSE;
         PinSpeaker=FALSE;
         delay(DELAY_VALUE);   //判断如果有信号,则延时一次
         PinLamp=TRUE;
         PinSpeaker=TRUE;
     if(PinScanKey2==TRUE)
         {
                 delay(DELAY_VALUE); //加入判断还有信号,则再延时
           if(PinScanKey2==TRUE)
             return  6;}    //确认确实有按键信号,返回键值
     if(PinScanKey3==TRUE)
         PinLamp=FALSE;
         PinSpeaker=FALSE;
         delay(DELAY_VALUE);   //如果判断有信号,则延时一次
         PinLamp=TRUE;
         PinSpeaker=TRUE;
     if(PinScanKey3==TRUE)
         {
           delay(DELAY_VALUE);    //加入判断还有信号,则再延时
           if(PinScanKey3==TRUE)
           return  0;}//确认确实有按键信号,返回键值
     if(PinScanKey4==TRUE)
       PinLamp=FALSE;
       PinSpeaker=FALSE;
       delay(DELAY_VALUE);//如果判断有信号,则延时一次
       PinLamp=TRUE;
       PinSpeaker=TRUE;
     if(PinScanKey4==TRUE)
         {
           delay(DELAY_VALUE); //假如判断还有信号则再延时
           if(PinScanKey4==TRUE)
             return  13;}     //确认确实有按键信号,返回键值
           PinDrvKey2=FALSE;      //以上语句扫描第二列
           PinDrvKey3=TRUE;
     if(PinScanKey1==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE);//判断如果有信号则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey1==TRUE)
        {
          delay(DELAY_VALUE);//假如判断还有信号,则再延时
          if(PinScanKey1==TRUE)
            return  3;}    //确认确实有按键信号,返回键值 
     if(PinScanKey2==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE);//如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey2==TRUE)
        {
          delay(DELAY_VALUE);  //假如判断还有信号,则再延时
          if(PinScanKey3==TRUE)
            return  7;}     //确认确实有按键信号,返回键值
     if(PinScanKey3==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE); //如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey3==TRUE)
        {
          delay(DELAY_VALUE);   //假如判断还有信号,则再延时
          if(PinScanKey3==TRUE)
             return  10;}     //确认确实有按键喜好,返回键值
     if(PinScanKey4==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE);//如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey4==TRUE)
        {
          delay(DELAY_VALUE);  //假如判断还有信号,则再延时
          if(PinScanKey4==TRUE)
              return  14;}      //确认确实有按键信号,返回键值
     PinDrvKey3=FALSE;                //以上语句扫描第三列
     PinDrvKey4=TRUE;
     if(PinScanKey4==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE); //如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey1==TRUE)
        {
          delay(DELAY_VALUE);  //如果判断还有信号,则再延时
          if(PinScanKey1==TRUE)
             return  4;}    //确认确实有按键信号,返回键值
     if(PinScanKey2==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE);  //如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey2==TRUE)
        {
          delay(DELAY_VALUE);  //加入判断还有信号,则再延时
          if(PinScanKey2==TRUE)
             return  8;}//确认确实有按键信号,返回键值
     if(PinScanKey3==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;
        delay(DELAY_VALUE);//如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey3==TRUE)
        {
        delay(DELAY_VALUE);//如果判断还有信号,则再延时            if(PinScanKey3==TRUE)
             return  11;}    //确认确实有按键信号,返回键值
     if(PinScanKey4==TRUE)
        PinLamp=FALSE;
        PinSpeaker=FALSE;   
        delay(DELAY_VALUE);//如果判断有信号,则延时一次
        PinLamp=TRUE;
        PinSpeaker=TRUE;
     if(PinScanKey4==TRUE)
        {
          delay(DELAY_VALUE);  //假如判断还有信号,则再延时
          if(PinScanKey4==TRUE)
             return  15;}  //确认确实有按键信号,返回键值      PinDrvKey4=FALSE;    //以上语句扫描第四列
             return  16;
         }

void delay(short i)
      {
        int j=0;
        int k=0;
        k=i*DELAY_VALUE;
        while(j<k)j++;
      }

使用特权

评论回复
地板
jack.king| | 2007-9-3 16:32 | 只看该作者

这里缺少这个

BL51 BANKED LINKER/LOCATER V6.05                                                        09/03/2007  16:51:15  PAGE 1


BL51 BANKED LINKER/LOCATER V6.05, INVOKED BY:
C:\KEIL\C51\BIN\BL51.EXE .\112.obj TO CE-103D RAMSIZE (256) CODE (0X0000-0X1FFF)


MEMORY MODEL: SMALL


INPUT MODULES INCLUDED:
  .\112.obj (112)
  C:\KEIL\C51\LIB\C51S.LIB (?C_STARTUP)
  C:\KEIL\C51\LIB\C51S.LIB (?C?IMUL)


LINK MAP OF MODULE:  CE-103D (112)


            TYPE    BASE      LENGTH    RELOCATION   SEGMENT NAME
            -----------------------------------------------------

            * * * * * * *   D A T A   M E M O R Y   * * * * * * *
            REG     0000H     0008H     ABSOLUTE     "REG BANK 0"
            DATA    0008H     0001H     UNIT         _DATA_GROUP_
            IDATA   0009H     0001H     UNIT         ?STACK

            * * * * * * *   C O D E   M E M O R Y   * * * * * * *
            CODE    0000H     0003H     ABSOLUTE     
                    0003H     07FDH                  *** GAP ***
            CODE    0800H     018EH     UNIT         ?PR?KEYSCAN?112
            CODE    098EH     0028H     UNIT         ?PR?_DELAY?112
            CODE    09B6H     0012H     UNIT         ?C?LIB_CODE
            CODE    09C8H     000DH     UNIT         ?PR?INITIAL?112
            CODE    09D5H     000CH     UNIT         ?C_C51STARTUP
            CODE    09E1H     0009H     UNIT         ?PR?MAIN?112



OVERLAY MAP OF MODULE:   CE-103D (112)


SEGMENT                          DATA_GROUP 
  +--> CALLED SEGMENT          START    LENGTH
----------------------------------------------
?C_C51STARTUP                  -----    -----
  +--> ?PR?MAIN?112

?PR?MAIN?112                   0008H    0001H
  +--> ?PR?INITIAL?112
  +--> ?PR?KEYSCAN?112

?PR?KEYSCAN?112                -----    -----
  +--> ?PR?_DELAY?112



SYMBOL TABLE OF MODULE:  CE-103D (112)

  VALUE           TYPE          NAME
  ----------------------------------
BL51 BANKED LINKER/LOCATER V6.05                                                      09/03/2007  16:51:15  PAGE 2



  -------         MODULE        112
  C:0000H         SYMBOL        _ICE_DUMMY_
  D:0080H         PUBLIC        P0
  D:0090H         PUBLIC        P1
  D:00A0H         PUBLIC        P2
  B:0080H.0       PUBLIC        P0_0
  B:0090H.0       PUBLIC        P1_0
  B:0080H.1       PUBLIC        P0_1
  C:0994H         PUBLIC        _delay
  B:0090H.1       PUBLIC        P1_1
  B:0090H.2       PUBLIC        P1_2
  B:0090H.3       PUBLIC        P1_3
  B:0090H.4       PUBLIC        P1_4
  B:0090H.5       PUBLIC        P1_5
  B:0090H.6       PUBLIC        P1_6
  B:0090H.7       PUBLIC        P1_7
  C:09E1H         PUBLIC        main
  C:09C8H         PUBLIC        initial
  C:0800H         PUBLIC        keyscan
  -------         PROC          MAIN
  -------         DO            
  D:0008H         SYMBOL        keyword
  -------         ENDDO         
  C:09E1H         LINE#         46
  C:09E1H         LINE#         47
  C:09E1H         LINE#         49
  C:09E4H         LINE#         50
  C:09E9H         LINE#         51
  -------         ENDPROC       MAIN
  -------         PROC          INITIAL
  C:09C8H         LINE#         53
  C:09C8H         LINE#         54
  C:09C8H         LINE#         55
  C:09CAH         LINE#         56
  C:09CCH         LINE#         57
  C:09CEH         LINE#         58
  C:09D0H         LINE#         59
  C:09D2H         LINE#         60
  C:09D4H         LINE#         61
  -------         ENDPROC       INITIAL
  -------         PROC          KEYSCAN
  C:0800H         LINE#         63
  C:0800H         LINE#         64
  C:0800H         LINE#         65
  C:0802H         LINE#         66
  C:0805H         LINE#         67
  C:0807H         LINE#         68
  C:0807H         LINE#         69
  C:080AH         LINE#         70
  C:080CH         LINE#         71
  C:080EH         LINE#         72
  C:0811H         LINE#         73
  C:0811H         LINE#         74
  C:0814H         LINE#         75
  C:0817H         LINE#         76
  C:081AH         LINE#         77
BL51 BANKED LINKER/LOCATER V6.05                                                      09/03/2007  16:51:15  PAGE 3


  C:081DH         LINE#         78
  C:081FH         LINE#         79
  C:081FH         LINE#         80
  C:0822H         LINE#         81
  C:0824H         LINE#         82
  C:0826H         LINE#         83
  C:0829H         LINE#         84
  C:0829H         LINE#         85
  C:082CH         LINE#         86
  C:082FH         LINE#         87
  C:0832H         LINE#         88
  C:0835H         LINE#         89
  C:0837H         LINE#         90
  C:0837H         LINE#         91
  C:083AH         LINE#         92
  C:083CH         LINE#         93
  C:083EH         LINE#         94
  C:0841H         LINE#         95
  C:0841H         LINE#         96
  C:0844H         LINE#         97
  C:0847H         LINE#         98
  C:084AH         LINE#         99
  C:084DH         LINE#         100
  C:084FH         LINE#         101
  C:084FH         LINE#         102
  C:0852H         LINE#         103
  C:0854H         LINE#         104
  C:0856H         LINE#         105
  C:0859H         LINE#         106
  C:0859H         LINE#         107
  C:085CH         LINE#         108
  C:085FH         LINE#         109
  C:0862H         LINE#         110
  C:0864H         LINE#         111
  C:0866H         LINE#         112
  C:0869H         LINE#         113
  C:086BH         LINE#         114
  C:086BH         LINE#         115
  C:086EH         LINE#         116
  C:0870H         LINE#         117
  C:0872H         LINE#         118
  C:0875H         LINE#         119
  C:0875H         LINE#         120
  C:0878H         LINE#         121
  C:087BH         LINE#         122
  C:087EH         LINE#         123
  C:0881H         LINE#         124
  C:0883H         LINE#         125
  C:0883H         LINE#         126
  C:0886H         LINE#         127
  C:0888H         LINE#         128
  C:088AH         LINE#         129
  C:088DH         LINE#         130
  C:088DH         LINE#         131
  C:0890H         LINE#         132
  C:0893H         LINE#         133
  C:0896H         LINE#         134
BL51 BANKED LINKER/LOCATER V6.05                                                      09/03/2007  16:51:15  PAGE 4


  C:0899H         LINE#         135
  C:089BH         LINE#         136
  C:089BH         LINE#         137
  C:089EH         LINE#         138
  C:08A0H         LINE#         139
  C:08A2H         LINE#         140
  C:08A5H         LINE#         141
  C:08A5H         LINE#         142
  C:08A8H         LINE#         143
  C:08ABH         LINE#         144
  C:08AEH         LINE#         145
  C:08B1H         LINE#         146
  C:08B3H         LINE#         147
  C:08B3H         LINE#         148
  C:08B6H         LINE#         149
  C:08B8H         LINE#         150
  C:08BAH         LINE#         151
  C:08BDH         LINE#         152
  C:08BDH         LINE#         153
  C:08C0H         LINE#         154
  C:08C3H         LINE#         155
  C:08C6H         LINE#         156
  C:08C8H         LINE#         157
  C:08CAH         LINE#         158
  C:08CDH         LINE#         159
  C:08CFH         LINE#         160
  C:08CFH         LINE#         161
  C:08D2H         LINE#         162
  C:08D4H         LINE#         163
  C:08D6H         LINE#         164
  C:08D9H         LINE#         165
  C:08D9H         LINE#         166
  C:08DCH         LINE#         167
  C:08DFH         LINE#         168
  C:08E2H         LINE#         169
  C:08E5H         LINE#         170
  C:08E7H         LINE#         171
  C:08E7H         LINE#         172
  C:08EAH         LINE#         173
  C:08ECH         LINE#         174
  C:08EEH         LINE#         175
  C:08F1H         LINE#         176
  C:08F1H         LINE#         177
  C:08F4H         LINE#         178
  C:08F7H         LINE#         179
  C:08FAH         LINE#         180
  C:08FDH         LINE#         181
  C:08FFH         LINE#         182
  C:08FFH         LINE#         183
  C:0902H         LINE#         184
  C:0904H         LINE#         185
  C:0906H         LINE#         186
  C:0909H         LINE#         187
  C:0909H         LINE#         188
  C:090CH         LINE#         189
  C:090FH         LINE#         190
  C:0912H         LINE#         191
BL51 BANKED LINKER/LOCATER V6.05                                                      09/03/2007  16:51:15  PAGE 5


  C:0915H         LINE#         192
  C:0917H         LINE#         193
  C:0917H         LINE#         194
  C:091AH         LINE#         195
  C:091CH         LINE#         196
  C:091EH         LINE#         197
  C:0921H         LINE#         198
  C:0921H         LINE#         199
  C:0924H         LINE#         200
  C:0927H         LINE#         201
  C:092AH         LINE#         202
  C:092CH         LINE#         203
  C:092EH         LINE#         204
  C:0931H         LINE#         205
  C:0933H         LINE#         206
  C:0933H         LINE#         207
  C:0936H         LINE#         208
  C:0938H         LINE#         209
  C:093AH         LINE#         210
  C:093DH         LINE#         211
  C:093DH         LINE#         212
  C:0940H         LINE#         213
  C:0943H         LINE#         214
  C:0946H         LINE#         215
  C:0949H         LINE#         216
  C:094BH         LINE#         217
  C:094BH         LINE#         218
  C:094EH         LINE#         219
  C:0950H         LINE#         220
  C:0952H         LINE#         221
  C:0955H         LINE#         222
  C:0955H         LINE#         223
  C:0958H         LINE#         224
  C:095BH         LINE#         225
  C:095EH         LINE#         226
  C:0961H         LINE#         227
  C:0963H         LINE#         228
  C:0963H         LINE#         229
  C:0966H         LINE#         230
  C:0968H         LINE#         231
  C:096AH         LINE#         232
  C:096DH         LINE#         233
  C:096DH         LINE#         234
  C:0970H         LINE#         235
  C:0973H         LINE#         236
  C:0976H         LINE#         237
  C:0978H         LINE#         238
  C:0978H         LINE#         239
  C:097BH         LINE#         240
  C:097DH         LINE#         241
  C:097FH         LINE#         242
  C:0982H         LINE#         243
  C:0982H         LINE#         244
  C:0985H         LINE#         245
  C:0988H         LINE#         246
  C:098BH         LINE#         247
  C:098DH         LINE#         248
BL51 BANKED LINKER/LOCATER V6.05                                                      09/03/2007  16:51:15  PAGE 6


  -------         ENDPROC       KEYSCAN
  C:098EH         SYMBOL        L?0056
  C:0990H         SYMBOL        L?0057
  -------         PROC          L?0055
  -------         ENDPROC       L?0055
  C:098EH         SYMBOL        L?0056
  C:0990H         SYMBOL        L?0057
  -------         PROC          _DELAY
  D:0006H         SYMBOL        i
  -------         DO            
  D:0002H         SYMBOL        j
  D:0004H         SYMBOL        k
  -------         ENDDO         
  C:0994H         LINE#         250
  C:0994H         LINE#         251
  C:0994H         LINE#         252
  C:0997H         LINE#         253
  C:0998H         LINE#         254
  C:09A1H         LINE#         255
  C:09B5H         LINE#         256
  -------         ENDPROC       _DELAY
  -------         ENDMOD        112

  -------         MODULE        ?C?IMUL
  C:09B6H         PUBLIC        ?C?IMUL
  -------         ENDMOD        ?C?IMUL

******************************************************************************
* RESTRICTED VERSION WITH 0800H BYTE CODE SIZE LIMIT; USED: 01CCH BYTE (22%) *
******************************************************************************

Program Size: data=10.0 xdata=0 code=493
LINK/LOCATE RUN COMPLETE.  0 WARNING(S),  0 ERROR(S)

使用特权

评论回复
5
ayb_ice| | 2007-9-3 18:30 | 只看该作者

随便说说

UV2也有起动文件,并不是UV3才有的...
先去掉起动文件看看...

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

29

主题

58

帖子

0

粉丝