16709|11

79

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

【求助】关于编译错误的问题 急!!! [复制链接]

我在使用msp430编译软件时发生的问题:
本来使用的4k限制版,因为超过了4k就找了个无限制的,结果在4k限制版编译通过的程序,在无限制版中发生了错误。出现了n个错误!找了几个错误,大家看看是为什么?

Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a ";"
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char __data frq_data_send" (declared at line 165)

最新回复

THANK YOU! 问题已经解决  详情 回复 发表于 2005-2-23 14:45
 
点赞 关注

回复
举报

70

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
用的是什么版本?是否还有信息?
 
 

回复

67

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
不同的版本,就有不同的写法,就像环境不一样,中断函数的名字也不一样,我遇到过这样的情况(两个不同版本下定时器初始化时寄存器的名称不同)建议从程序入手修改~~~~~~~
 
 
 

回复

80

帖子

0

TA的资源

一粒金砂(初级)

4
 
用的是msp430 V2.10A PJ版

所有信息如下:
Compiling

050223.c
icc430.exe -I J:\Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\ -I J:\Program Files\IAR Systems\
Embedded Workbench 3.2\430\INC\CLIB\ -o J:\Program Files\IAR Systems\Embedded Workbench 3.2\common\bin\
Debug\Obj\ -s2 --no_cse --no_unroll --no_inline --no_code_motion --debug -e J:\dbd\050223.c

IAR MSP430 C/EC++ Compiler V2.10A/W32
Copyright 1996-2003 IAR Systems. All rights reserved.
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a ";"
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "void delay(unsigned int)" (declared at line 153)
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "void lcd_wr_data(int)" (declared at line 162)
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char __data frq_con_data3" (declared at line 178)
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char __data frq_data_send" (declared at line 186)
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "void __no_operation(void)" (declared at line 28 of "J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\intrinsics.h")
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char volatile __data P1OUT" (declared at line 243 of "J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Warning[Pe077]: this declaration has no storage class or type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char __data led_i" (declared at line 182)
Error[Pe065]: expected a ";"
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char volatile __data TXBUF1" (declared at line 439 of "J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "<error-type> TXBUF1" (declared at line 1184)
Warning[Pa034]: initialized varia××e can not h××e __no_init attribute, discarded
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "<error-type> TXBUF1" (declared at line 439 of "J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e "TXBUF1" has already been initialized
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "<error-type> TXBUF1" (declared at line 439 of "J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e "TXBUF1" has already been initialized
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "void __ena××e_interrupt(void)" (declared at line 29 of "J:\Program Files\
IAR Systems\Embedded Workbench 3.2\430\INC\intrinsics.h")
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char volatile __data P4OUT" (declared at line 286 of "J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "unsigned char volatile __data P5OUT" (declared at line 299 of "J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe018]: expected a ")"
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "<error-type> TXBUF1" (declared at line 439 of "J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e "TXBUF1" has already been initialized
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with "<error-type> TXBUF1" (declared at line 439 of "J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h")
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e "TXBUF1" has already been initialized
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
 
 
 

回复

73

帖子

0

TA的资源

一粒金砂(初级)

5
 
这可能是您程序是以前在老版本下编写的,现在用的是新的高版本吧!
 
 
 

回复

88

帖子

0

TA的资源

一粒金砂(初级)

6
 
还是无法断定是什么错误?我也是这个版本,如果可以,可将程序发到信箱,编译看是什么错误。cao456@263.net
 
 
 

回复

56

帖子

0

TA的资源

一粒金砂(初级)

7
 
一般说来,这些错误是C程序本身的错误或编译环境的问题,与4k不4k无关,具体的你可用鼠标点一下错误代码,看跳到具体出错之处,再仔细检查。另我看了一下出错提示很多是针对头文件“msp430x14x.h”,你可以做相应检查。
 
 
 

回复

72

帖子

0

TA的资源

一粒金砂(初级)

8
 
程序已发过去了,请帮忙,谢谢!
 
 
 

回复

66

帖子

0

TA的资源

一粒金砂(初级)

9
 
是新就版本的问题,我也遇到过!记得把中断函数格式改一下
还有一个问题就是说好像在结束行上没有一个新行的警告,我现在还没找出原因!大家谁知道啊?
 
 
 

回复

65

帖子

0

TA的资源

一粒金砂(初级)

10
 
[还有一个问题就是说好像在结束行上没有一个新行的警告,我现在还没找出原因!大家谁知道啊?]


-----------这种情况是一个警告,没有影响。可在源程序最后一行完毕时,加以回车换行即可。
 
 
 

回复

87

帖子

0

TA的资源

一粒金砂(初级)

11
 


将3个中断修改即可,
//interrupt[UART1RX_VECTOR] void usart1_rx (void)
#pragma vector=UART1RX_VECTOR
__interrupt void UART1RX(void)
 
 
 

回复

77

帖子

0

TA的资源

一粒金砂(初级)

12
 
THANK YOU!
问题已经解决
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/6 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表