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.

Unable to see static variables when debugging CC430F6137 using IAR Embedded Workbench 430 5.3

Other Parts Discussed in Thread: CC430F6137, MSP430F449

I've been searching for why for two hours. Now I'm using IAR Embedded Workbench Evaluation 5.30 to debug on a CC430F6137 dev kit board. As I have declared some global static variable, I realize that I am not able to watch that correctly. They are shown as either FF or 3F.

I tried to look them up in the memory table, the pattern looks like ff 3f ff 3f .... This pattern last from 0x1C00-0x1CFF; Data shown in 0x1D00 - 0x2BFF. According to the datasheet of CC430F6137, the section 0 of the RAM ranges from 0x1C00 - 0x23FF, which is 2KB in total. Section 1 ranges from 0x2400 to 0x2BFF.

For example, on static variable is located at 0x1CED, according to the watch window. However, the value is 0x3F. When I use a local variable to copy the value from that static var, it is however not 0x3F. My static variable falls in a small boundary area(that has the strange pattern) in section 0. My hardware: USB-MSP430 debug interface by TI. The eval board is EM430F6137F900.

I tried the simulator, no problem. I also created a simple piece of code utilizing static variable for MSP430F449 (by TI LPT MSP430 debugger) and the static variables can also be seen. Does anyone have any idea why this happens and possible solutions? THANKS IN ADVANCE!

  • I've been struggling with the same problem on the same platform, using IAR kickstart evaluation version 6.  I"m new to the debugging environment, so I thought I was just making a stupid mistake somewhere, but someone else is struggling also !

    I'm using the parallel port debugger.  I get variable to display in the watch window when I use the simulator rather than running on hardware.  Running on hardware displays the never changing 3F FF values.

    I reverted to using a sample app that TI provides (packet communication between two eval boards).  With no changes on my part, I cannot get the debugger to display a received packet, even though the code has a "no operation" right at the location for the debugger to display contents.  I just see 3F FF contents. 

    I set compiler optimization to none already.  Tried setting the packet buffer static -> no effect.  Tried volatile qualifier on packet buffer -> compiler error. Tried a printf to a terminal window -> got the same value for each packet byte, which in no way matched what was actually being transmitted.

    I've been battling with this for quite a while.  I desperately need some direction to lick this problem.  Debuggers are supposed to make our lives easier, not more difficult.

    Any advice would be deeply appreciated.

    Thanks,

    Dave

  • A pattern of 0x3fff is returned by the flash controller for vacant memory space. So the static variable location seems to be outside flash/ram area.

    However, there seems to be a bug in the debugger that causes an improper access ot the first 256 bytes of flash on some devices.
    This is not the first thread about this issue, and IIRC, a program update is available.

  • tinkerer said:
    ebuggers are supposed to make our lives easier, not more difficult.

    Hah! Often the debugger is a bugger. Especially if you do not know its limitations.
    When it comes to real-time events, a debugger heavily intrudes the code flow and corrupts all timings, leading to strange and often unexpected/undetected problems.
    Personally, I NEVER used a debugger on any of my many MSP projects. (I do use debuggers on plain software projects, where no realtime requirements apply)

    In this case, I'm pretty sure it is a bug in this specific debugger version.

  • JM:

    you are right.  I contacted IAR, they recommended an update, and that did the trick.  Debugger is working great now.

    I did check IAR website for bug reports on my previous version, couldn't find anything specific, frustrating.

  • tinkerer said:

    JM:

    you are right.  I contacted IAR, they recommended an update, and that did the trick.  Debugger is working great now.

    I did check IAR website for bug reports on my previous version, couldn't find anything specific, frustrating.

    How can I do an update? By downloading the installer again?

    Thanks,

**Attention** This is a public forum