代码如下:
typedef struct
{
u8 counter;
u8 longFlag;
u8 shortFlag;
u8 temp;
} KeyScanTpyedef;
KeyScanTpyedef zd;
zd.counter=1;
zd.longFlag=1;
zd.shortFlag=1;
zd.temp=1;
然后报错:
----------- Project test - STM8 Cosmic - Configuration Release -------------
Compiling ..\user\key.c...
cxstm8 +mods0 -pp -i..\include -i..\user -i..\stm8s_stdperiph_driver\inc -i"C:\Program Files\COSMIC\CXSTM8\Hstm8" -clRelease\ -coRelease\ ..\user\key.c
#error cpstm8 ..\user\key.c:40(0+2) redeclared external zd
#error cpstm8 ..\user\key.c:41(0+2) redeclared external zd
#error cpstm8 ..\user\key.c:42(0+2) redeclared external zd
#error cpstm8 ..\user\key.c:43(0+2) redeclared external zd
..\user\key.c:
The command: "cxstm8 +mods0 -pp -i..\include -i..\user -i..\stm8s_stdperiph_driver\inc -i"C:\Program Files\COSMIC\CXSTM8\Hstm8" -clRelease\ -coRelease\ ..\user\key.c" has failed, the returned value is: 1
exit code=1.
test.elf - 6 error(s), 0 warning(s)
请问是什么原因?
|