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.

Difficulty in using 'long long' within structures with CCS 5.1 and MSP430F47177



I am having difficulties when assigning values to 'long long' types within structures. Code with structure members of 'long' type compiles and works but when the member type is changed to 'long long' type it compiles without error but no longer assigns values to the member. Specifically the simple line:

gRawArms.Rec.Sum++;

works for:

but not for:

Ideas would be helpful.

-B

  • I see that CCSv5 has an issue with displaying long long variables in the expressions view, they always remain at 0 and do not get updated. Is that what you are referring to? The compiler itself does generate correct code and should execute properly, the bug seems to only be in displaying the long long variables in CCS. Could you confirm if that is what are you seeing as well? I will submit a bug report against CCS and then update this forum thread.

     

     

  • Bug # SDSCM00042523 has been submitted against CCS. Feel free to track the status of the issue using the SDOWP link in my signature.

  • I can confirm that the problem is partially with expressions view not updating however the actual values are also not correct in memory at times. To start if the long long is initialized with '0' rather than '0x00000000' garbage may remain in the lower 32 bits. In addition on the first call to move a 64-bit long long number from a GP register to the memory location of the storage variable extaneous LSBs are also appear to be added.

    After adding the first one:

     

     -B

  • There is another known bug that we are tracking where when long variables are stored in registers they are stored in a register pairs, but the debug information generated is incorrect, so only one register's contents (lower bits) is written to expressions view. The bug # for this is SDSCM00042242. Once again the bug is in incorrect debug information being generated, so the CCS displays will be affected. However the code produced by the compiler itself should be correct and should execute properly.

  • Thank you AartiG,

    I am also seeing inconsitencies when moving long long variables from GP registers into main memory. I am seeing these inconsistancies *within memory view in the disassembly window* (see above message). No one has yet mentioned any bugs that cause this view to be corrupted. Is this view corrupted too? If so, there is no way (neither expressions view nor disassebly view) that can verify code involving long long is working properly. I need to fix this problem urgently.

    Hopefully this is a non-issue and I have instead made a silly interpretation error. I am checking on that possibility now...

  • Yes this was my interpretation mistake, the memory and dissassembly view do contain the correct data. So the entire problem can be attributed to the Bug you mentioned and expressions view.

    -B