共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 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】智能可穿戴设备AR/VR如何引领科技新潮流! | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
【有奖活动】震撼来袭!这场直播将直击工程师的心灵! | |
“我想要一部加热台”活动,不花钱赢取开发好工具!活动开始了哦 | |
【有奖活动】伙伴们:您的“需求”解决了吗? |
打赏帖 | |
---|---|
老胖子聊电路--分析一个反馈电路被打赏50分 | |
放大↔震荡被打赏50分 | |
【换取手持数字示波器】RTduino驱动ssd1306+sht31温湿度计被打赏40分 | |
【换取手持数字示波器】称植国产开源TobudOS到雅特力AT32F425被打赏40分 | |
【分享评测,赢取加热台】+Telink-泰凌微电子B91点灯篇被打赏20分 | |
【换取手持数字示波器】+精英板驱动LCD屏被打赏50分 | |
【换取手持数字示波器】+DFR0216全彩灯带WS2812示例分享被打赏50分 | |
【换取手持数字示波器】安装雅特力国产IDE-AT32IDE被打赏30分 | |
【换取手持数字示波器】+DFR0654板卡驱动数码管和串口功能分享被打赏50分 | |
【换取手持数字示波器】+DFPlayerMini模块推喇叭示例分享被打赏50分 |