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.

DSS Disable Autorun on binary load?

Hi,

I have been doing some DSS scripting for the DM814x, with the XDS560v2, and XDS510 debuggers. From the CCS GUI, when I load a binary to the CortexA8 core of the device, it auto-runs but  apparently not from main. In order for it to run correctly, I have to click Pause, Restart and then Resume.

This seems to be causing an issue with DSS because when I called debugSession.target.halt() after loading the binary, it simply times out waiting for the device to halt. It works ok if I click Pause manually though, and the script can then automatically restart and resume the core.

I have tried disabling Autorun from Main on Application Load in the debugger configuration, but it seems to have no effect.

Any help on this would be appreciated.

Thanks!

  • Hi Joseph,

    Joseph Pentland said:
    I have tried disabling Autorun from Main on Application Load in the debugger configuration, but it seems to have no effect.

    If you are doing this from the GUI, this will have no effect on a DSS session (as you already observed). You need to use the DSS APIs to disable the auto-run to main. See the below wiki topic on how to do this:

    http://processors.wiki.ti.com/index.php/Debug_Server_Scripting#Debugger_Properties

    Thanks

    ki

  • Thanks for the reply. I hadn't previously noticed the printOptions method. For some reason it also wasn't displaying anything in the DSS console, maybe due to trace levels, but I was able to get it to display from a batch/js script.

    For anyone reading this in future, the following command seems to have solved the problem:

    debugSessionA8.options.setBoolean("AutoRunToLabelOnRestart", false);

    Thanks very much

  • Ok after further investigation this doesn't seem to work correctly, as the program never gets to main. When runAsynch is called, the CortexA8 seems to be running, but it no longer runs from main. I have to pause the core in the GUI, restart, and click run before it successfully runs.

    The same thing also happens when it auto-runs on program load. It does not appear to run from main, but I am unsure where it does auto-run from.

  • Joseph Pentland said:
    The same thing also happens when it auto-runs on program load. It does not appear to run from main, but I am unsure where it does auto-run from.

    Sorry, I think I misunderstood you. When you load a program, the default entry point in 'c_int00'. The debugger option you and I are talking about is NOT auto-run FROM main. It is auto-run TO main (or whatever label specified).

    So when you disabled the auto-run to main, the program should not be automatically executed on program load. When you called runAsynch, it will just run and continue to run until you call the halt API or a breakpoint is reached.

  • Hi

    For some reason I think the problem is that when the application runs, it never reaches main from wherever it starts. The only workaround I've found is to disable autorun from main, use runAsync(), halt(), restart() and then runAsync() again. This allows it to actually run the program.

  • Do you actually have a 'main' in your program? If so, it could just be a certain quirk of your target. Many targets I've seen needs some funky initialization (reset, etc) to get it in the correct state.

    Anyway glad you found something that works for you

    ki

  • Yeah. After restarting it runs from main()

    Thanks