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.

Problem while debugging in CCSv4

Hi everyone,

I wrote following code:

 

 

 

 

volatile int  *p;

 

 

 

// p = (int *)0x0300;

p = (

int *)malloc(30);

*p++= 0x02;                                       //code stuck here

*p++= 0x09;

 

My code stuck at above line & following warning appears:

MSP430: Can't Single Step Target Program: Could not single step device

  • dearAnkur,

    I had done debugging with your code and it is successfully debugging with my CCSv4.

    volatile int  *p;
     
    #include <msp430x54x.h>
    #include <stdio.h>
    #include <math.h>
    #include <string.h>
     
    void main(void)
      {
    // p = (int *)0x0300;

    p = (

    int *)malloc(30);

    *p++= 0x02;                                       //code stuck here

    *p++= 0x09;

    while(1);

    }

    kindly settings your debugger option and tell me what happens actually.

     

  • Have you disabled the watchdog? Is the voltage stable which you supply to the MSP? Have you made the right voltage settings for the set working frequency?

    This error happens most often if something goes wrong e.g. a reset happens or something like that. The three points are just a small set of what might go wrong.

  • I have checked watchdog is disabled, voltage is fixed, I aam using MSP-EXP430G2 kit. Afetr entering into this line PC jumps to reset vector address 0xFFFE. No int is enabled, I have disabled all the int.

  • Ankur Tech said:
    Afetr entering into this line PC jumps to reset vector address 0xFFFE.

    What is your actual code? Not only the three lines but the complete code. What hapens after these lines? does the code "fall" out of main?

**Attention** This is a public forum