cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve this error???

MAnsa.1
Associate II

i am adding stm8s.h header file and getting this error.i dont understand why i am getting this error.errors are...

Compiling main.c...

cxstm8 -i"..\..\..\..\..\..\..\..\program files\stmicroelectronics\st_toolset\include" -i"..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc" -i..\j-final +debug -pxp -no -l +mods0 -pp -i"C:\Program Files\COSMIC\FSE_Compilers\CXSTM8\Hstm8" -clDebug\ -coDebug\ main.c 

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:211(26+6) redeclared typedef int8_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:212(26+7) redeclared typedef int16_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:213(26+7) redeclared typedef int32_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:216(26+7) redeclared typedef uint8_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:217(26+8) redeclared typedef uint16_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:218(26+8) redeclared typedef uint32_t

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:2627 can't redefine macro GPIOA

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:2629 can't redefine macro GPIOB

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:2631 can't redefine macro GPIOC

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:2633 can't redefine macro GPIOD

#error cpstm8 ..\..\..\data manual\stm8s103f3_spl-master\stm8s103f3_spl-master\stm8s103f3_spl-master\inc\stm8s.h:2789 can't redefine macro SetBit

2 REPLIES 2
Ozone
Lead II

"redeclared" means it is already declared elsewhere.

The first step is to find out where. A good compiler would have told you where it was declared first.

Most probably, one of both includes is reduntant, or both are conflicting.

I have no experience with the Cosmic toolchains.

but it not showing the line number where it is declared.is there any way to find out that line??????