This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2355: Inexplicable error with basic for loop

Part Number: MSP430FR2355

CCS is throwing an error with a damn for loop iterator for no reason.

    volatile unsigned short m = 40, M = 72;
    volatile unsigned int P;

    for (int i = 1; i <= M; i++) {
        P += m;
    }

When I compile, the for loop line throws errors 29 "expected an expression" and 20 "identifier 'i' is undefined" even though I'm f**king defining it right there. Changing data types doesn't help, neither did setting int i=0 and making the comparator 1<M. I had to predefine i above the for loop to clear the errors.

**Attention** This is a public forum