- 打卡等级:初来乍到
- 打卡总天数:1
- 最近打卡:2023-12-13 10:35:09
新手上路
- 积分
- 43
|
发表于 2023-12-13 08:45:22
|
显示全部楼层
本帖最后由 jianjun 于 2023-12-13 08:55 编辑
您的工程我把#include "..\..\STC8Gxxx.h"改为#include "STC8A.h",然后编译出现下面的错误:
Build target 'Target 1'
compiling UART1.c...
UART1.c(321): error C141: syntax error near 'TIMER0_VECTOR', expected 'const'
UART1.c(322): error C132: 'TIMER0_VECTOR': not in formal parameter list
UART1.c(322): error C141: syntax error near '{', expected ';'
UART1.c(325): error C132: 'RX1_TimeOut': not in formal parameter list
UART1.c(329): error C244: 'B_RX1_OK': can't initialize, bad type or class
UART1.c(329): error C132: 'B_RX1_OK': not in formal parameter list
UART1.c(330): error C141: syntax error near '}', expected 'hdata'
UART1.c(387): error C202: 'INT_CLKO': undefined identifier
Target not created.
Build Time Elapsed: 00:00:00
定位下来都是下面这一段和INT_CLKO变量未定义的问题
void timer0_ISR (void) interrupt TIMER0_VECTOR
{
if(RX1_TimeOut != 0)
{
if(--RX1_TimeOut == 0) //超时
{
if(RX1_cnt != 0) //接收有数据
{
B_RX1_OK = 1; //标志已收到数据块
}
}
}
}
|
|