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.

CCS/EK-TM4C129EXL: Clearing "auto run" aborts the program

Part Number: EK-TM4C129EXL

Tool/software: Code Composer Studio

Hi,

I am working on the EK-TM4C129EXL launch pad. I have written a simple counter loop which runs perfectly. However, when I clear the "auto run" tab and disable the tick marks in the "debug configurations" window, the PC starts at "_c_int00_noinit_noargs" and enters into the abort function WITHOUT entering the "main" function. Can anybody explain, how this is even possible?

Thanks,

Sagar

  • Sagar,

    So you are going into here and unchecking the box to run to main on a program load or restart:

    Then when you launch your debug session you end up somewhere like this:

    At this point if you set a breakpoint in main() like this:

    And then run does it end up at main() ok?

    That is effectively what that option to auto run does. It sets a breakpoint at main() and runs to it.

    If you try that does it hit the breakpoint? The reason I ask is that you stated that the program does not enter main() and goes straight to abort. How do you know that it did not enter main()? Is it an infinite loop? If not then main likely completed and you ended up at abort.  If I take the infinite loop out of my main() then when I hit run that is what I will see.

    Regards,

    John

  • John,

    I am running the code line by line, and that's how I get to know whether the PC enters "main" or not. So, this is what happened after setting a breakpoint in "main".
    The PC started at "_c_int00_noinit_noargs" as usual, and after a bunch of "step over" clicks it ENTERED "main".

    So, my understanding is: Without a breakpoint, a "step over" click would run the entire "main" at a time, so I am not able to see the main running. However, it is not the case with a breakpoint.
    Can you confirm if I am right?
  • if you step over main() then it is not going to halt in main() unless you have a breakpoint in it. Stepping over a function call places the breakpoint at the point where it returns. If you were to select "step into" then it steps into the function.

    So if you are in c_int00 at the line 96 below

    Step over will take you to exit(1) after having completed the call to main().

    Step into will step into main()

    Now if there is a breakpoint set inside main() then that breakpoint would be hit when main() is executing.

    Regards,

    John

  • Ok. Thank you so much.