共2条
1/1 1 跳转至页
Iar,EW3,interrupt 请教各位前辈, Iar EW3.1 不能识别关键字interrupt是怎么回事?
问
我是这样定义的:
void interrupt[BASICTIMER_VECTOR] IntBasicTimer(void)
{
P1OUT│=BIT0;
P1OUT&=~BIT0;
}
编译出错信息如下:
Rebuilding configuration: AmmeterIar - Debug
0 file(s) deleted.
LzgMain.c
icc430.exe -I C:\Program Files\IAR Systems\Embedded Workbench 4.0\430\INC\ -I C:\Program Files\IAR Systems\Embedded
Workbench 4.0\430\INC\CLIB\ -o D:\LzgPg\Ammeter430\Debug\Obj\ -z3 --no_cse --no_unroll --no_inline --no_code_motion
--no_tbaa --debug -e --double=32 D:\LzgPg\Ammeter430\LzgMain.c
IAR MSP430 C/C++ Compiler V3.10A/W32
Copyright 1996-2004 IAR Systems. All rights reserved.
Error[Pe094]: the size of an array must be greater than zero
Error[Pe065]: expected a ";"
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompatible with "unsigned char volatile __data16 P1OUT" (declared at line 216 of "C:\Program
Files\IAR Systems\Embedded Workbench 4.0\430\INC\MSP430XE42X.H")
Error[Be012]: location address not allowed (object must have static storage duration and be const or __no_init)
Error[Pe065]: expected a ";"
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Warning[Pe001]: last line of file ends without a newline
Error[Pe169]: expected a declaration
Errors: 8
Warnings: 3
Total number of errors: 8
Total number of warnings: 3 答 1: 那是老版本的格式,新版本的格式如下:
#pragma vector=BASICTIMER_VECTOR
__interrupt void IntBasicTimer (void)
void interrupt[BASICTIMER_VECTOR] IntBasicTimer(void)
{
P1OUT│=BIT0;
P1OUT&=~BIT0;
}
编译出错信息如下:
Rebuilding configuration: AmmeterIar - Debug
0 file(s) deleted.
LzgMain.c
icc430.exe -I C:\Program Files\IAR Systems\Embedded Workbench 4.0\430\INC\ -I C:\Program Files\IAR Systems\Embedded
Workbench 4.0\430\INC\CLIB\ -o D:\LzgPg\Ammeter430\Debug\Obj\ -z3 --no_cse --no_unroll --no_inline --no_code_motion
--no_tbaa --debug -e --double=32 D:\LzgPg\Ammeter430\LzgMain.c
IAR MSP430 C/C++ Compiler V3.10A/W32
Copyright 1996-2004 IAR Systems. All rights reserved.
Error[Pe094]: the size of an array must be greater than zero
Error[Pe065]: expected a ";"
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompatible with "unsigned char volatile __data16 P1OUT" (declared at line 216 of "C:\Program
Files\IAR Systems\Embedded Workbench 4.0\430\INC\MSP430XE42X.H")
Error[Be012]: location address not allowed (object must have static storage duration and be const or __no_init)
Error[Pe065]: expected a ";"
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Warning[Pe001]: last line of file ends without a newline
Error[Pe169]: expected a declaration
Errors: 8
Warnings: 3
Total number of errors: 8
Total number of warnings: 3 答 1: 那是老版本的格式,新版本的格式如下:
#pragma vector=BASICTIMER_VECTOR
__interrupt void IntBasicTimer (void)
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
与电子爱好者谈读图二被打赏50分 | |
【FRDM-MCXN947评测】Core1适配运行FreeRtos被打赏50分 | |
【FRDM-MCXN947评测】双核调试被打赏50分 | |
【CPKCORRA8D1B评测】---移植CoreMark被打赏50分 | |
【CPKCORRA8D1B评测】---打开硬件定时器被打赏50分 | |
【FRDM-MCXA156评测】4、CAN loopback模式测试被打赏50分 | |
【CPKcorRA8D1评测】--搭建初始环境被打赏50分 | |
【FRDM-MCXA156评测】3、使用FlexIO模拟UART被打赏50分 | |
【FRDM-MCXA156评测】2、rt-thread MCXA156 BSP制作被打赏50分 | |
【FRDM-MCXN947评测】核间通信MUTEX被打赏50分 |