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.

Trouble to start debug MSPF5310: running in debug section could not stop after loading program and show set PC to entry point

I could easily erase my CPU, load code and debug with other project. But when I try to load a particular code. It shows completing load .out file and set PC to entry point and then never stop running at the very beginning of the main function (it  by default set automatically return to main after loading load .out file and erase file). When I try to suspend it or terminate it, it waits a long time and shows ''trouble halting target''

It happens frequently sometimes. Only sucessful reach the entry point occasionally (means it would stop at the main function after loading the code). How could I fix it. I spend so much time to just start debugging

  • Hi,

    It sounds like you are running into the same problem as this thread, especially if this has only started happening as your program (and number of arrays/variables) has gotten large: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/p/41652/145337.aspx#145337

    Basically what happens is that the Watchdog timer is enabled at device startup. If you have a large number of variables or large arrays these all get initialized at the beginning of your code prior to the jump to main. If there are too many of these, the initialization takes long enough that the Watchdog timer times out and resets the part, and the cycle repeats. You can fix this by doing what Devin and aBUGSworstnightmare mention in the thread above - you make a special pre-init function that disables the watchdog before the variables all initialize.

    Hope this helps!

    -Katie

  • Katie Enderle said:

    Hi,

    It sounds like you are running into the same problem as this thread, especially if this has only started happening as your program (and number of arrays/variables) has gotten large: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/p/41652/145337.aspx#145337

    Basically what happens is that the Watchdog timer is enabled at device startup. If you have a large number of variables or large arrays these all get initialized at the beginning of your code prior to the jump to main. If there are too many of these, the initialization takes long enough that the Watchdog timer times out and resets the part, and the cycle repeats. You can fix this by doing what Devin and aBUGSworstnightmare mention in the thread above - you make a special pre-init function that disables the watchdog before the variables all initialize.

    Hope this helps!

    -Katie

    Hi Katie,
    Thanks for your solution, I implement the method you mentioned. It still doesn't work properly. Sometimes I am able to go into the entry, sometimes not even I didn't change anything. When I step into the _system_pre_init, it run until the end but show "No source available for "c_int00_noexit() at 0x9276"" after it return.
  • Katie Enderle said:

    Hi,

    It sounds like you are running into the same problem as this thread, especially if this has only started happening as your program (and number of arrays/variables) has gotten large: http://e2e.ti.com/support/microcontrollers/msp43016-bit_ultra-low_power_mcus/f/166/p/41652/145337.aspx#145337

    Basically what happens is that the Watchdog timer is enabled at device startup. If you have a large number of variables or large arrays these all get initialized at the beginning of your code prior to the jump to main. If there are too many of these, the initialization takes long enough that the Watchdog timer times out and resets the part, and the cycle repeats. You can fix this by doing what Devin and aBUGSworstnightmare mention in the thread above - you make a special pre-init function that disables the watchdog before the variables all initialize.

    Hope this helps!

    -Katie

    Hi Katie,

    I use pre-int function and autu run to the beginning of the _system_pre_init function. It seems that it still could not turn to the main function with a free run but it could turn to main () function if I use assembly step in to debug. Why it happens? Thanks for your reply? I have been suck in this problem for a whole week.

  • Yi Zhao1 said:
    "No source available for "c_int00_noexit() at 0x9276"

    That's normal. The init function is linked automatically from the runtime library, but there is no source code for the debugger included for it. So when you r pre-init funciton returns, it returns to library code where there is no source code available for. You can still step through it in assembly view until it finally calls your main function where there is source code available for.
    The same thing happens for all code when you make a release build and run the debugger with it: the release output file also does nto contain source code information and the debugger can debug, but only on assembly level.

**Attention** This is a public forum