2020-12-11 12:42 AM
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
2020-12-11 12:57 AM
"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.
2020-12-11 01:02 AM
but it not showing the line number where it is declared.is there any way to find out that line??????