打印
[其他ST产品]

HDLC标准函数报错问题

[复制链接]
1308|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
yinq123|  楼主 | 2015-12-10 10:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
编译显示:
main.c(31): warning:  #188-D: enumerated type mixed with another type
        RCCU_PCLKConfig(RCCU_Div_2);              //PCLK2=24MHz APB2 periph
main.c(32): warning:  #188-D: enumerated type mixed with another type
        RCCU_FCLKConfig(RCCU_Div_2);              //PCLK1=24MHz APB1 periph (fast)
main.c(74): warning:  #188-D: enumerated type mixed with another type
  HDLC_Init_Xmit(HDLC_NRZ);                  //NRZ coding used
main.c(77): warning:  #188-D: enumerated type mixed with another type
  HDLC_Init_Recv(HDLC_PAE | HDLC_R_NRZ);
main.c(95): warning:  #223-D: function "printf" declared implicitly
        printf("rcvbuffer= %s\n\r",HDLC_RECEIVEBUFFER_BASE_LO+1); //print received buffer
main.c(99): warning:  #223-D: function "printf" declared implicitly
        printf("Test 1 Loopback failed\n\r");
main.c: 6 warnings, 0 errors
compiling timers.c...
timers.c(85): warning:  #188-D: enumerated type mixed with another type
    RTC_ITConfig( RTC_AIR | RTC_GIR, ENABLE );
timers.c: 1 warning, 0 errors
assembling STR71x.s...
linking...
Program Size: Code=10404 RO-data=44 RW-data=20 ZI-data=1740  
FromELF: creating hex file...
".\hdlc.axf" - 0 Error(s), 10 Warning(s).

部分报错函数程序如下:

HDLC_Init_Xmit(HDLC_NRZ);                  //NRZ coding used

//Set up Receiver
HDLC_Init_Recv(HDLC_PAE | HDLC_R_NRZ);

标准库函数如下定义如下:
void HDLC_Init_Xmit(HDLC_TCTL_Flags Flags);
void HDLC_Init_Recv(HDLC_RCTL_Flags Flags);

HDLC_NRZ定义为HDLC_TCOD_ENC枚举类型

HDLC_PAE定义为HDLC_RCTL_Flags枚举类型
HDLC_R_NRZ定义为HDLC_RCOD_ENC枚举类型
这些都是标准库函数,,程序也是官方提供的函数没做任何修改,,

请问这影不影响程序正常工作,,或者改怎么修改
沙发
pigeon0411| | 2015-12-10 11:46 | 只看该作者
是用哪个编译工具的?

如果是KEIL,把C++ CODE中的 C99Mode打勾,选中后确定。

使用特权

评论回复
板凳
yinq123|  楼主 | 2015-12-10 13:23 | 只看该作者
pigeon0411 发表于 2015-12-10 11:46
是用哪个编译工具的?

如果是KEIL,把C++ CODE中的 C99Mode打勾,选中后确定。 ...

试了,没有,并报了两个错误

使用特权

评论回复
地板
pigeon0411| | 2015-12-10 13:37 | 只看该作者
什么错误,贴上来看看

使用特权

评论回复
5
lefeng| | 2015-12-10 20:20 | 只看该作者
warnings可以忽略,Error(s)就不行了

使用特权

评论回复
6
yinq123|  楼主 | 2015-12-10 20:33 | 只看该作者
pigeon0411 发表于 2015-12-10 13:37
什么错误,贴上来看看

linking...
.\hdlc.axf: Error: L6218E: Undefined symbol RTC_CounterValue (referred from timers.o).
.\hdlc.axf: Error: L6218E: Undefined symbol WDG_CntOnOffConfig (referred from timers.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 2 error messages.

使用特权

评论回复
7
pigeon0411| | 2015-12-11 10:00 | 只看该作者
yinq123 发表于 2015-12-10 20:33
linking...
.\hdlc.axf: Error: L6218E: Undefined symbol RTC_CounterValue (referred from timers.o).
...

这两个函数如果已经定义了,就把这两个函数声明一下。这是一个普通错误。

使用特权

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

本版积分规则

15

主题

34

帖子

1

粉丝