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.

problems with global variables and debugging

Other Parts Discussed in Thread: CC430F6137

I have a question about declaring global variables and debugging their values.

I compile and debug the code and add "rxBuffer" and "rxBufferCounter" to the watch window in CCS (4.2.4).

When stepping the program with "F5" the variables doesnt change. They are in its "initial" state all the time. I think what the watch window shows is not whats really happens.

Am I doing anything wrong when i assigning the globals?

I have done some coding in CCS and never had this problem before.

I just updated CCS to a new version (4.2.4)

The target is CC430F6137 (EM430F6137RF900 experiment board)

 

I have tried to minimize my code and here it is:

 

#include "cc430x613x.h"

unsigned char rxBuffer[45];                     // Received UART character

unsigned char rxBufferCounter = 0;

void main(void)

{

 WDTCTL = WDTPW + WDTHOLD;               // Stop watchdog timer

 rxBufferCounter = 0;

 while(1){

  for (rxBufferCounter = 0; rxBufferCounter <= 44; rxBufferCounter++){

   rxBuffer[rxBufferCounter] = 0;

   rxBufferCounter++;

  }

 }

}

 

best regards

A frustrated Tomas

  • Tomas,

    This sounds like a previously reported bug in CCS, being tracked in bug # SDSCM00040004. Please see this related post which talks about a similar issue. This bug is fixed internally and should appear in the next CCS update. If you wish, you can check the current status of the bug using the SDOWP link in my signature.

    If what you are experiencing is the same bug, it is only an issue with the display in CCS.  You should still be able to read/write to those addresses programmatically and the code should do the right thing.

  • Hi,

    Thank you very much, its indeed the very same bug it seemes like.

    Thought it was my programming at first. But it didnt make sense in this case =)

     

    /Tomas