cancel
Showing results for 
Search instead for 
Did you mean: 

Error in complier stage

chris1_deng
Associate
Posted on September 09, 2014 at 15:19

Dear sir,

   I am starting to study STM8S and build a simple code. But after complier, it show ''

&sharperror cpstm8 stm8s103.h:600(0+6) missing ;

main.c:

 The command: ''cxstm8 +debug -pxp -no -l +mods0 -pp -i''C:\Program Files (x86)\COSMIC\CXSTM8_32K\Hstm8''  -clDebug\ -coDebug\ main.c'' has failed, the returned value is: 1

exit code=1.

test.elf - 3 error(s), 0 warning(s)''

    Is anyone know what's the problem and how to solve?

Thanks.

Chris  

#compiler-messages #c-learning
5 REPLIES 5
Andrew Neil
Evangelist III
Posted on September 20, 2014 at 09:10

#error cpstm8 stm8s103.h:600(0+6) missing

;

It is clearly telling you that you are missing a semicolon - '

;

' - isn't it?

So look at the reported line in the reported file, and fix that!

Note the the error might actually have occurred somewhat before the reported point - but the compiler has struggled on and gets to this point where it makes no further sense without a semicolon.

This is basic 'C' - nothing specifically to do with STM8

http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/

sue_manson
Associate II
Posted on January 08, 2016 at 21:47

I am getting the same compiler errors on STM-provided HEADER files.

The reply:

''It is clearly telling you that you are missing a semicolon - '

;

' - isn't it?

So look at the reported line in the reported file, and fix that!''

Is rather a rude and unnecessary response as all of the header files in the STM8 std periph library are generating these types of errors, so it is not my stupidity, nor anyone else's, in forgetting a '';'' or any other character the compiler is error-ing on.  These include files have NOT been edited.

Does anyone out there have a real solution to this? 

I thought maybe the libraries are outdated as the error in each header file also gives the error: ''old style argument declaration'' but I can't find any solutions in this forum to the problem.  I also cannot find any downloads for current libraries, as suggested by the UM0834 Discovery User Manual.

Ian Legg
Senior
Posted on January 11, 2016 at 09:12

Hello,

Here's the location to what I think are the current STM8S peripheral libraries:

http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1807/SS1754/PF258009?s_searchtype=keyword

Thanks,

Ian

jdf25252
Associate II
Posted on January 12, 2016 at 16:53

Are you using the ST Standard peripheral library?  If so you should ONLY be including ''stm8s.h''  It appears you have the Cosmic compiler so I'm wondering where you found ''stm8s103.h''

Also, I would not recommend using the library.  It offers no value added for the increase in code size and is simply one more unnecessary thing a newbie has to learn. 

You might also post your source at least up to the point where you include ''stm8s103.h''.  Quite often an omitted parenthesis or bracket will confuse the compiler so bad it won't detect the error till MUCH later.

jdf

sue_manson
Associate II
Posted on January 19, 2016 at 15:49

Thanks, Ian!

This link actually works!  It is good to have a more recent library.

I found my problem.  It was looking for definitions in the stdint.h header file that was in the Cosmic compiler CXSTM32 folder, but not in CXSTM8.