Forum : 8051
Post Information | Post |
---|---|
March 9, 2011 - 1:49pm
|
I changed from ride6 to ride7 last month. Ride6 c-compiler version: 3.03.3 now I have a problem with Ride 7: My software with the ride6 c-compiler works correct! Is there a bug with nested calls in the Ride7 version? Here are my code examples (glei is a global variable), This ist working with Ride6 and not with Ride7: void makeinfotxt(char z) { This ist working with Ride7: void makeinfotxt(char z) { char a; |
Hello,
We weren't able to reproduce this issue in our lab.
Can you provide us more information such as variable types, memory model, ...
The best will be a Ride7 project showing the trouble.
Stéphane
O.K. here are my complete routine with the const arrays declarations
(It is a 7seg-decoder for a 4-digits display)
the disfunctionating code is in /*... */
void makeinfotxt(char z)
{ char a, e, c , d;
/*
glta=nrseg[Seg7txt[z][0]];
glhu=nrseg[Seg7txt[z][1]];
glze=nrseg[Seg7txt[z][2]];
glei=nrseg[Seg7txt[z][3]];
*/
a=Seg7txt[z][0];
e=Seg7txt[z][1];
c=Seg7txt[z][2];
d=Seg7txt[z][3];
glta=nrseg[a];
glhu=nrseg[e];
glze=nrseg[c];
glei=nrseg[d];
}
const char code nrseg[36]=
{
/*0*/ 136, /*1*/ 187, /*2*/ 148, /*3*/ 146,
/*4*/ 163, /*5*/ 194, /*6*/ 192, /*7*/ 155,
/*8*/ 128, /*9*/ 130, /*A*/ 129, /*b*/ 224,
/*C*/ 204, /*d*/ 176, /*E*/ 196, /*F*/ 197,
/*H*/ 161, /*J*/ 184, /*L*/ 236, /*n*/ 241,
/*o*/ 240, /*P*/ 133, /*r*/ 245, /*t*/ 228,
/*u*/ 248, /*y*/ 162, /*¾*/ 29, /*c*/ 244,
/*^*/ 143, /*U*/ 168, /*-*/ 247, /* */ 255,
/*c*/ 244, /*i*/ 251, /*h*/ 225, /* */ 168
};
const char code Seg7txt[27][4]=
{// t h z e
31, 31, 31, 31, //Clear
23, 24, 22, 11, //turb
5, 14, 19, 5, //SEnS
12, 31, 20, 19, //C on
12, 20, 15, 15, //Coff
12, 20, 21, 5, //CoPS
31, 22, 14, 18, // rEL
31, 20, 24, 23, // out
33, 19, 21, 23, //InPt
24, 24, 24, 24, //uuuu
28, 28, 28, 28, //^^^^
14, 14, 14, 14, //EEEE
31, 5, 24, 19, // Sun
31, 12, 10, 18, // CAL
29, 21, 13, 23, //UPdt
5, 21, 14, 22, //SPEC
13, 15, 18, 23, //dFLt
2, 0, 0, 0, //2000
31, 1, 0, 0, // 100
11, 20, 20, 23, // boot
14, 22, 22, 22, //Errr
33, 19, 15, 20, //inFo
13, 33, 22, 23, //dirt
19, 20, 5, 13, //noSd
31, 1, 12, 14, // ICE
15, 33, 18, 23, //FiLt
30, 21, 12, 30 //-PC-
};
Thanx for your clean bug report.
The issue is fixed. It was in the optimisation pass. Setting optimisation level to 6 is a workaround.
The fix will be available in the next release.
Stéphane