Other Parts Discussed in Thread: MSP430F2012
Hi all,
This may seem like a silly question, but I wanted to know more about the warning message I receive in the following program (using MSP430F2012):
int test = 0;
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog
int x = 5;
int y = 10;
int z = x*y;
test = z;
x = test;
} // BREAKPOINT HERE -- after everything happens
On the line where I try to make z, I get a warning that says: "#1533-D (ULP 6.1) Detected use of multiplication on a device that has no hardware multiplier" What exactly does that mean? Furthermore, when I run this program, all the way to the end at a breakpoint at the end, I try to observe what all of the variables contain. When I move my mouse over each of the variables -- to show what they are, it shows that x, z and test are all 50, which should be the case. However, for some reason y shows up to be 80. Would anyone know why that is and if it has to do with the multiplication warning?
There is another warning next to "int y = 10;" which says: #1535-D (ULP 8.1) variable "y" is used as a constant. Recommend declaring variable as either 'static const' or 'const'. Even more interesting is the fact that when I take out the line that assigns x to test, the line "int x = 5" gets the same warning as when y is assigned, however it still apparently ends up being 50 at the end of main (even without assigning it to test). Can anyone explain what is going on here, in particular, the significance of those two errors?
Any help would be greatly appreciated!
Thanks,
Matt