View previous topic :: View next topic |
Author |
Message |
thierry91
Joined: 24 Feb 2012 Posts: 2
|
Compiler error SCR=7660 [statement error ???] |
Posted: Tue Mar 05, 2013 1:42 pm |
|
|
Hello,
*** Error 44 "mor.c" Line 1866(1,1): Internal Error - Contact CCS LABEL SCR=7660
on Compiler 4.134 PCH,
Error IS HERE :
Code: |
#define COM_T1_SET_MAX_SPEED 0x54 // 'T'
#define COM_T2_SET_MAX_SPEED 0x55 // 'U'
-----------------------------------
switch (code)
{
case ...:
break;
...
...
case COM_T1_SET_MAX_SPEED:
//......
if (cond) return;
break;
case COM_T2_SET_MAX_SPEED:
//.....
if (cond) return;
break;
...
case ...:
break;
default:
...
break
|
it was as I've add a case status in a switch statement....
Is there limits in the number of statement that can handle the switch statement in the compiler ?
or an error into the parser that cannot handle so long labels ?
--> tried other lengths same error
or an error into the parser that cannot handle too similar labels ?
---> tried other chars : same error
or an error into the parser that cannot handle these values ?
----> Quote: | tried 0x75 in replacement of 0x55 works, but NOT ACCEPTABLE |
So, were can I find a list of all errors (SCR/number), if it exists ?
Thierry |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Tue Mar 05, 2013 2:59 pm |
|
|
Can you duplicate the error in a SMALL complete compilable program we can all test?
Mike |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19569
|
|
Posted: Tue Mar 05, 2013 3:38 pm |
|
|
The usual reason for this type of behaviour is a syntax error possibly hundreds of lines earlier, that the compiler does not immediately flag, but then causes an inexplicable error later.
Other thing is something line having 'SET_MAX_SPEED' already defined earlier, which then gets expanded in the second definition....
Best Wishes |
|
|
thierry91
Joined: 24 Feb 2012 Posts: 2
|
Compiler error SCR=7660 [statement error ???] |
Posted: Wed Mar 06, 2013 6:22 am |
|
|
And no, there is no syntax error, since I just add only this part of code in a working project....,
case(s) are not duplicate,
#define(s) have no expand included
No, I cannot reproduce the error in a smaller code, but as I tried many and many ways to solve this problem,
I've found the solution, to bypass this compiler error.....
But why this error ?
Code: |
case COM_SET_MAX_SPEED_1:
->->->
break;
case COM_SET_MAX_SPEED_2:
->->
break;
case COM_SET_MAX_SPEED_FL:
->->->
break;
case COM_SET_MIN_POS_FL:
->->
break;
|
to (solution !!!!!! )
Code: |
case COM_SET_MAX_SPEED_1: ----------------
->->->
break;
case COM_SET_MAX_SPEED_FL:
->->->
break;
case COM_SET_MIN_POS_FL:
->->
break;
|
--------- MOVE the case statement,
************ I wish to have them in the same screen as reading the code, but it does not compile.......
Code: |
case COM_SET_MAX_SPEED_2:
->->
break;
|
now this code compile in my project, maybe an error in the way the compiler handle the labels....
Thierry |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19569
|
|
Posted: Wed Mar 06, 2013 10:01 am |
|
|
Remember an expanded include, could include something in one of the compiler's own files.
Try the experiment of not adding the case, but instead adding a variable, and setting it equal to the defines. Then using a debugger or output of some sort, see what values it takes.
Best Wishes |
|
|
jchristf
Joined: 26 Apr 2013 Posts: 1
|
|
Posted: Fri Apr 26, 2013 12:18 pm |
|
|
Try using #opt to reduce optimization |
|
|
|