2014-09-09 06:19 AM
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-learning2014-09-20 12:10 AM
#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 STM8http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
2016-01-08 12:47 PM
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.2016-01-11 12:12 AM
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, Ian2016-01-12 07:53 AM
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. jdf2016-01-19 06:49 AM