Shift operation doesn't compile with MSP430 V3.2.0
In my code running on MSP430F2370, we have the following function that compiled successfully with version V3.1.0:
void char2hexstr(char *s, char c)
{
s[1] = (c & 0x0f);
if(s[1] > 9)
s[1] += 7;
s[1] += 0x30;
s[0] = (c & 0xf0);
s[0] >>= 4;
if(s[0] > 9)
s[0] += 7;
s[0] += 0x30;
}
On version V3.2.0, it doesn't compile and shows "build failed" without any other relative information. In "output" window we can see some windows assembler code that has nothing to do with that function or file:
If I remove the line s[0] >>= 4 or/and replace it with s[0] = s[0]>>4 it compiles successfully ! That version seems to have problems with shift operation. We had the same problem with another code where the shift operation was on 16bits integer. I think we come back to the version V3.1.0 even if there were other bugs (With the post-process commands with .BAT file for example).
Please sign in to leave a comment.
Comments
0 comments