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.

CCS/MSP430I2041: Convert IAR to CCS, Array Multiple Error

Part Number: MSP430I2041

Tool/software: Code Composer Studio

Hello~ I'm Mr. jung

I wish you help me about CCS error.

My MCU is MSP430i2041 and Program is CCS v7. I converted IAR to CCS then compile was successed.

However, I don't understand this situation.

A part of code

{

variable definition

int32 a[32];

int16 b[32];

const int32 c[ ] = {0,1,2,3,4,5, ... 31};

uint8 A;

a[A] = (int32) ( (int32)b[A] * c[A] ); // want to process multiple. However, a[A] value is not empty in add(+) processing

}

After debugging and running, a problem is that a[A] value is empty.

value b and c have some values. it' s not empty.

There is no the problem in the IAR. So, I think that C/C++ code is correct.

I can't set my CCS properties or miss something.

What can i do? T.T I look forward to your reply.

thanks.

Have a nice day~!

  • I presume all of these variables ...

    Jung Hyun Young said:

    int32 a[32];

    int16 b[32];

    const int32 c[ ] = {0,1,2,3,4,5, ... 31};

    uint8 A;

    ... are not global, but local to a function.  If that is the case, then a, b, and A are not initialized.  They can contain anything.  You must be getting lucky with the IAR compiler.

    Thanks and regards,

    -George