cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to develop simple spi communication between 2 stm8s. I am using same files for master and spi with main.c different. Master code compiles successfully with no errors, slave has following error inspite all syntax is proper. Any help?

Upate.1
Associate II

Compiling main.c...

cxstm8 +warn +mods0 +debug -pxp +strict -pp -ps -psa -pu -l -i"C:\Program Files (x86)\COSMIC\FSE_Compilers\Hstm8" -clDebug\ -coDebug\ main.c

#error cpstm8 stm8s.h:2525(12) missing ;

#error cpstm8 stm8s_gpio.h:68(18) incomplete declaration

#error cpstm8 stm8s_gpio.h:141(61) bad proto argument type

#error cpstm8 stm8s_gpio.h:141(53+8) missing )

#error cpstm8 stm8s_gpio.h:141(91) missing ;

#error cpstm8 main.c:44(28+21) too many arguments

#error cpstm8 main.c:45(28+21) too many arguments

#error cpstm8 main.c:46(28+21) too many arguments

#error cpstm8 main.c:47(55) too many arguments

#error cpstm8 main.c:48(28+21) too many arguments

#error cpstm8 main.c:47(29+26) GPIO_MODE_OUT_PP_HIGH_FAST undefined

#error cpstm8 main.c:44(28+21) GPIO_MODE_IN_PU_NO_IT undefined

main.c:

 The command: "cxstm8 +warn +mods0 +debug -pxp +strict -pp -ps -psa -pu -l -i"C:\Program Files (x86)\COSMIC\FSE_Compilers\Hstm8" -clDebug\ -coDebug\ main.c" has failed, the returned value is: 1

exit code=1.

2 REPLIES 2
Upate.1
Associate II

I have used same gpio files in earlier project, at that time there was no errors.

I am using cosmic 8 compiler in stvd.

Error corresponding to line is as follows:

too many arguments , undefined

GPIO_Init(GPIOD,GPIO_PIN_4,GPIO_MODE_IN_PU_NO_IT);

GPIO_Init(GPIOC,GPIO_PIN_5,GPIO_MODE_IN_PU_NO_IT);

GPIO_Init(GPIOC,GPIO_PIN_6,GPIO_MODE_IN_PU_NO_IT);

GPIO_Init(GPIOC,GPIO_PIN_7,(GPIO_MODE_OUT_PP_HIGH_FAST));

GPIO_Init(GPIOA,GPIO_PIN_3,GPIO_MODE_IN_PU_NO_IT);

#error cpstm8 stm8s_gpio.h:141(61) bad proto argument type

void GPIO_WriteLow(GPIO_TypeDef* GPIOx, GPIO_Pin_TypeDef PortPins);

#error cpstm8 stm8s_gpio.h:141(53+8) missing )

#error cpstm8 stm8s_gpio.h:141(91) missing ;

void GPIO_WriteLow(GPIO_TypeDef* GPIOx, GPIO_Pin_TypeDef PortPins);

Upate.1
Associate II

Also I have many times that compiler gives error inspite of everything is correct.

Is there any specific setting that we have to do in stvd if unnecesssary are prompted.