新手求帮 编译不出HEX文件

2019-07-16 03:26发布

一个原工程是编译没有问题,我重新建一个工程,新建C文件,把原C文件复制到新建的文件里,保存后 导入到新工程里 ,这时候就编译不出来了 提示出了一大篇  如果下
Build target '目标 1'
assembling STARTUP.A51...
compiling 16.c...
16.C(1): warning C500: LICENSE ERROR (R208: RENEW LICENSE ID CODE (LIC))
16.c(2): warning C318: can't open file 'stc12c5620ad.h'
16.C(27): error C202: 'P1': undefined identifier
16.C(28): error C202: 'P1': undefined identifier
16.C(29): error C202: 'P1': undefined identifier
16.C(30): error C202: 'P2': undefined identifier
16.C(31): error C202: 'P3': undefined identifier
16.C(33): error C202: 'P2': undefined identifier
16.C(34): error C202: 'P2': undefined identifier
16.C(35): error C202: 'P1': undefined identifier
16.C(36): error C202: 'P1': undefined identifier
16.C(44): error C202: 'P2': undefined identifier
16.C(45): error C202: 'P2': undefined identifier
16.C(46): error C202: 'P3': undefined identifier
16.C(55): error C202: 'EA': undefined identifier
16.C(56): error C202: 'ISP_ADDRH': undefined identifier
16.C(57): error C202: 'ACC': undefined identifier
16.C(58): error C202: 'ISP_ADDRL': undefined identifier
16.C(59): error C202: 'ISP_CONTR': undefined identifier
16.C(60): error C202: 'ISP_CMD': undefined identifier
16.C(61): error C202: 'ISP_TRIG': undefined identifier
16.C(62): error C202: 'ISP_TRIG': undefined identifier
16.C(64): error C202: 'EA': undefined identifier
16.C(65): error C202: 'ISP_CONTR': undefined identifier
16.C(66): error C202: 'ISP_CMD': undefined identifier
16.C(67): error C202: 'ISP_TRIG': undefined identifier
16.C(68): error C202: 'ACC': undefined identifier
16.C(69): error C202: 'ACC': undefined identifier
16.C(75): error C202: 'EA': undefined identifier
16.C(76): error C202: 'ACC': undefined identifier
16.C(77): error C202: 'ISP_DATA': undefined identifier
16.C(78): error C202: 'ISP_ADDRH': undefined identifier
16.C(79): error C202: 'ACC': undefined identifier
16.C(80): error C202: 'ISP_ADDRL': undefined identifier
16.C(81): error C202: 'ISP_CONTR': undefined identifier
16.C(82): error C202: 'ISP_CMD': undefined identifier
16.C(83): error C202: 'ISP_TRIG': undefined identifier
16.C(84): error C202: 'ISP_TRIG': undefined identifier
16.C(86): error C202: 'EA': undefined identifier
16.C(87): error C202: 'ISP_CONTR': undefined identifier
16.C(88): error C202: 'ISP_CMD': undefined identifier
16.C(89): error C202: 'ISP_TRIG': undefined identifier
16.C(94): error C202: 'EA': undefined identifier
16.C(95): error C202: 'ISP_ADDRH': undefined identifier
16.C(96): error C202: 'ISP_ADDRL': undefined identifier
16.C(97): error C202: 'ISP_CONTR': undefined identifier
16.C(98): error C202: 'ISP_CMD': undefined identifier
16.C(99): error C202: 'ISP_TRIG': undefined identifier
16.C(100): error C202: 'ISP_TRIG': undefined identifier
16.C(102): error C202: 'EA': undefined identifier
16.C(103): error C202: 'ISP_CONTR': undefined identifier
16.C(104): error C202: 'ISP_CMD': undefined identifier
16.C(105): error C202: 'ISP_TRIG': undefined identifier
16.C(152): error C202: 'dio': undefined identifier
16.C(155): error C202: 'clk': undefined identifier
16.C(157): error C202: 'clk': undefined identifier
16.C(160): error C202: 'clk': undefined identifier
16.C(160): error C202: 'dio': undefined identifier
16.C(166): error C202: 'cs3': undefined identifier
16.C(170): error C202: 'cs3': undefined identifier
16.C(176): error C202: 'cs3': undefined identifier
16.C(184): error C202: 'cs3': undefined identifier
16.C(193): error C202: 'RI': undefined identifier
16.C(195): error C202: 'ACC': undefined identifier
16.C(196): error C202: 'ACC': undefined identifier
16.C(198): error C202: 'RI': undefined identifier
16.C(208): error C202: 'TH0': undefined identifier
16.C(209): error C202: 'TL0': undefined identifier
16.C(221): error C202: 'TH0': undefined identifier
16.C(222): error C202: 'TL0': undefined identifier
16.C(234): error C202: 'SP': undefined identifier
16.C(235): error C202: 'TMOD': undefined identifier
16.C(236): error C202: 'SM0': undefined identifier
16.C(237): error C202: 'SM1': undefined identifier
16.C(238): error C202: 'SM2': undefined identifier
16.C(239): error C202: 'TI': undefined identifier
16.C(240): error C202: 'RI': undefined identifier
16.C(241): error C202: 'P1M0': undefined identifier
16.C(242): error C202: 'P1M1': undefined identifier
16.C(243): error C202: 'P2M0': undefined identifier
16.C(244): error C202: 'P2M1': undefined identifier
16.C(245): error C202: 'P3M0': undefined identifier
16.C(246): error C202: 'P3M1': undefined identifier
16.C(247): error C202: 'TH1': undefined identifier
16.C(248): error C202: 'TL1': undefined identifier
16.C(252): error C202: 'cs1': undefined identifier
16.C(252): error C202: 'cs2': undefined identifier
16.C(252): error C202: 'cs3': undefined identifier
16.C(255): error C202: 'key2': undefined identifier
16.C(262): error C202: 'key2': undefined identifier
16.C(266): error C202: 'WDT_CONTR': undefined identifier
16.C(280): error C202: 'cs3': undefined identifier
16.C(284): error C202: 'cs3': undefined identifier
16.C(288): error C202: 'TR0': undefined identifier
16.C(289): error C202: 'ET0': undefined identifier
16.C(290): error C202: 'EA': undefined identifier
16.C(319): error C202: 'cs3': undefined identifier
16.C(322): error C202: 'cs3': undefined identifier
16.C(335): error C202: 'WDT_CONTR': undefined identifier
16.C(336): error C202: 'key1': undefined identifier
16.C(338): error C202: 'key2': undefined identifier
16.C(356): error C202: 'TH0': undefined identifier
16.C(357): error C202: 'TL0': undefined identifier
16.C(363): error C202: 'cs1': undefined identifier
16.C(364): error C202: 'cs2': undefined identifier
16.C(365): error C202: 'kt1': undefined identifier
16.C(366): error C202: 'kt2': undefined identifier
16.C(367): error C202: 'kt3': undefined identifier
16.C(368): error C202: 'WDT_CONTR': undefined identifier
16.C(384): error C202: 'cs3': undefined identifier
16.C(387): error C202: 'cs3': undefined identifier
16.C(401): error C202: 'WDT_CONTR': undefined identifier
16.C(402): error C202: 'key1': undefined identifier
16.C(404): error C202: 'key2': undefined identifier
16.C(410): error C202: 'cs3': undefined identifier
16.C(413): error C202: 'cs3': undefined identifier
16.C(430): error C202: 'cs3': undefined identifier
16.C(433): error C202: 'cs3': undefined identifier
16.C(442): error C202: 'key1': undefined identifier
16.C(467): error C202: 'WDT_CONTR': undefined identifier
16.C(468): error C202: 'key1': undefined identifier
16.C(470): error C202: 'cs3': undefined identifier
16.C(473): error C202: 'cs3': undefined identifier
16.C(476): error C202: 'key1': undefined identifier
16.C(481): error C202: 'key2': undefined identifier
16.C(485): error C202: 'TH0': undefined identifier
16.C(486): error C202: 'TL0': undefined identifier
16.C(492): error C202: 'cs1': undefined identifier
16.C(493): error C202: 'cs2': undefined identifier
16.C(494): error C202: 'kt1': undefined identifier
16.C(495): error C202: 'kt2': undefined identifier
16.C(496): error C202: 'kt3': undefined identifier
16.C(497): error C202: 'WDT_CONTR': undefined identifier
16.C(504): error C202: 'key3': undefined identifier
16.C(512): error C202: 'key4': undefined identifier
16.C(527): error C202: 'cs3': undefined identifier
16.C(532): error C202: 'cs3': undefined identifier
16.C(544): error C202: 'key2': undefined identifier
16.C(548): error C202: 'WDT_CONTR': undefined identifier
16.C(549): error C202: 'key3': undefined identifier
16.C(557): error C202: 'key4': undefined identifier
16.C(564): error C202: 'key1': undefined identifier
16.C(566): error C202: 'key2': undefined identifier
16.C(581): error C202: 'key2': undefined identifier
16.C(585): error C202: 'WDT_CONTR': undefined identifier
16.C(586): error C202: 'key3': undefined identifier
16.C(594): error C202: 'key4': undefined identifier
16.C(601): error C202: 'key1': undefined identifier
16.C(603): error C202: 'key2': undefined identifier
16.C(617): error C202: 'key2': undefined identifier
16.C(621): error C202: 'WDT_CONTR': undefined identifier
16.C(622): error C202: 'key3': undefined identifier
16.C(630): error C202: 'key4': undefined identifier
16.C(637): error C202: 'key1': undefined identifier
16.C(639): error C202: 'key2': undefined identifier
16.C(653): error C202: 'key2': undefined identifier
16.C(657): error C202: 'WDT_CONTR': undefined identifier
16.C(658): error C202: 'key3': undefined identifier
16.C(666): error C202: 'key4': undefined identifier
16.C(673): error C202: 'key1': undefined identifier
16.C(675): error C202: 'key2': undefined identifier
16.C(680): error C202: 'cs3': undefined identifier
16.C(685): error C202: 'cs3': undefined identifier
16.C(691): error C202: 'WDT_CONTR': undefined identifier
16.C(696): error C202: 'key1': undefined identifier
16.C(718): error C202: 'cs1': undefined identifier
16.C(718): error C202: 'cs2': undefined identifier
16.C(719): error C202: 'kt1': undefined identifier
16.C(719): error C202: 'kt2': undefined identifier
16.C(719): error C202: 'kt3': undefined identifier
16.C(723): error C202: 'cs1': undefined identifier
16.C(723): error C202: 'cs2': undefined identifier
16.C(724): error C202: 'kt1': undefined identifier
16.C(724): error C202: 'kt2': undefined identifier
16.C(724): error C202: 'kt3': undefined identifier
16.C(728): error C202: 'cs1': undefined identifier
16.C(728): error C202: 'cs2': undefined identifier
16.C(729): error C202: 'kt1': undefined identifier
16.C(729): error C202: 'kt2': undefined identifier
16.C(729): error C202: 'kt3': undefined identifier
16.C(733): error C202: 'cs1': undefined identifier
16.C(733): error C202: 'cs2': undefined identifier
16.C(734): error C202: 'kt1': undefined identifier
16.C(734): error C202: 'kt2': undefined identifier
16.C(734): error C202: 'kt3': undefined identifier
16.C(738): error C202: 'cs1': undefined identifier
16.C(738): error C202: 'cs2': undefined identifier
16.C(739): error C202: 'kt1': undefined identifier
16.C(739): error C202: 'kt2': undefined identifier
16.C(739): error C202: 'kt3': undefined identifier
16.C(743): error C202: 'cs1': undefined identifier
16.C(743): error C202: 'cs2': undefined identifier
16.C(744): error C202: 'kt1': undefined identifier
16.C(744): error C202: 'kt2': undefined identifier
16.C(744): error C202: 'kt3': undefined identifier
16.C(748): error C202: 'cs1': undefined identifier
16.C(748): error C202: 'cs2': undefined identifier
16.C(749): error C202: 'kt1': undefined identifier
16.C(749): error C202: 'kt2': undefined identifier
16.C(749): error C202: 'kt3': undefined identifier
16.C(753): error C202: 'cs1': undefined identifier
16.C(753): error C202: 'cs2': undefined identifier
16.C(754): error C202: 'kt1': undefined identifier
16.C(754): error C202: 'kt2': undefined identifier
16.C(754): error C202: 'kt3': undefined identifier
16.C(758): error C202: 'cs1': undefined identifier
16.C(758): error C202: 'cs2': undefined identifier
16.C(759): error C202: 'kt1': undefined identifier
16.C(759): error C202: 'kt2': undefined identifier
16.C(759): error C202: 'kt3': undefined identifier
16.C(763): error C202: 'cs1': undefined identifier
16.C(763): error C202: 'cs2': undefined identifier
16.C(764): error C202: 'kt1': undefined identifier
16.C(764): error C202: 'kt2': undefined identifier
16.C(764): error C202: 'kt3': undefined identifier
16.C(768): error C202: 'cs1': undefined identifier
16.C(768): error C202: 'cs2': undefined identifier
16.C(769): error C202: 'kt1': undefined identifier
16.C(769): error C202: 'kt2': undefined identifier
16.C(769): error C202: 'kt3': undefined identifier
16.C(773): error C202: 'cs1': undefined identifier
16.C(773): error C202: 'cs2': undefined identifier
16.C(774): error C202: 'kt1': undefined identifier
16.C(774): error C202: 'kt2': undefined identifier
16.C(774): error C202: 'kt3': undefined identifier
16.C(778): error C202: 'cs1': undefined identifier
16.C(778): error C202: 'cs2': undefined identifier
16.C(779): error C202: 'kt1': undefined identifier
16.C(779): error C202: 'kt2': undefined identifier
16.C(779): error C202: 'kt3': undefined identifier
16.C(783): error C202: 'cs1': undefined identifier
16.C(783): error C202: 'cs2': undefined identifier
16.C(784): error C202: 'kt1': undefined identifier
16.C(784): error C202: 'kt2': undefined identifier
16.C(784): error C202: 'kt3': undefined identifier
16.C(788): error C202: 'cs1': undefined identifier
16.C(788): error C202: 'cs2': undefined identifier
16.C(789): error C202: 'kt1': undefined identifier
16.C(789): error C202: 'kt2': undefined identifier
16.C(789): error C202: 'kt3': undefined identifier
16.C(793): error C202: 'cs1': undefined identifier
16.C(793): error C202: 'cs2': undefined identifier
16.C(794): error C202: 'kt1': undefined identifier
16.C(794): error C202: 'kt2': undefined identifier
16.C(794): error C202: 'kt3': undefined identifier
目标未创建

问题出在那里???
我是对这单片不懂 请高手指点
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
7条回答
太阳48
2019-07-16 14:18
永远的猪 发表于 2012-12-1 10:34
can't open file 'stc12c5620ad.h'是说你的头文件没有打开,你用的什么编译软件?在你的文件夹中找到'stc12 ...

我就是用的KEIL 软件   在keil就是C51/INC中 有STC12C56.h 头文件  没有到'stc12c5620ad.h'头文件

/*------------------------------------------------*/
/* --- 宏晶科技 STCMCU ---------------------------*/
/* --- Mobile: (86)13922805190 -------------------*/
/* --- Fax: 86-755-82944243 ----------------------*/
/* --- Tel: 86-755-82948412 ----------------------*/
/* --- Web: www.STCMCU.com -----------------------*/
/* 适用于: STC12C56xx    STC12LE56xx  ------------*/
/* ------- STC12C56xxAD  STC12LE56xxAD  ----------*/
/*------------------------------------------------*/
#ifndef __STC12C56_H__
#define __STC12C56_H__


STC12C56.h 头文件 记事本里 打开  里面的适用于STC12C56xxAD  是不是可以代表'stc12c5620ad.h'
如果可以话  那里面就有'stc12c5620ad.h' 头文件了
望高手指点  扣谢
太难了  

一周热门 更多>