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/TMS320F28020: DSS hangs on first target.run() command

Part Number: TMS320F28020

Tool/software: Code Composer Studio

Hello,

I managed to use the DSS Server for multiple devices as described in software-dl.ti.com/.../sdto_dss_handbook.html. The scrip loads the program correctly in all devices but then hangs on the first debugSession.target.run() command. The debugger hangs too. The first device starts to run, but all others remain in halt state. Does anyone have a suggestion how to solve this?

Thanks in advance.

Martin

  • Hello Martin,
    What is your configuration like? Is it a custom board with multiple F28020 devices on it on the same JTAG scan chain? Or is it a multi-emulator setup?

    Also, please describe what you mean by "hang" when you run the target. Does the API call never return? Do you have a timeout set? Note that target.run() is a blocking call. It will not return until the target is halted (via breakpoint, exit point of application, etc) or an exception is thrown when a timeout is triggered.

    Thanks
    ki
  • Hello Ki,

    my actual setup consists of two C28343 in two DIMM100 Docking stations. I want to be capable to program all of them with the same code as one chain and in multi debugger mode. However, my final setup will contain multiple piccolos using multiple debuggers with connected JTAG chains.

    In this final setup I want to be able to program and start all piccolos with on command through an appropriate command file. If I understood it correctly, my problem is that the run-command target does not halt. And they are not supposed to. Once the command is started they all should just run and follow their program without interruption.

    The solution you suggest is to throw an exception by a timeout. Could you provide a simple example or a hint where I can find further Information about this strategy?

    Thanks
    Martin

  • User1164857 said:
    If I understood it correctly, my problem is that the run-command target does not halt

    That is correct. target.run() is a synchronous run command

    User1164857 said:
    The solution you suggest is to throw an exception by a timeout. Could you provide a simple example or a hint where I can find further Information about this strategy?

    The setScriptTimeout() API can be used to set a timeout. The value passed to the API is in milliseconds. Example:

    // Create scripting instance
    script = ScriptingEnvironment.instance();

    // Set 30 second timeout to compensate for the potential long delay for first debugger launch
    script.setScriptTimeout(30000);

    It will throw an exception. You can catch and handle it:

    http://software-dl.ti.com/ccs/esd/documents/users_guide/sdto_dss_handbook.html#exception-handling

    Note that there is also another run API: target.runAsynch(). This run command will not block waiting for a halt. This may be what you are looking for.

    Thanks

    ki

  • Hi Ki,

    thank you very much for the advice.

    The "target.runAsynch()" command solves my problem perfectly. Next time I rtf first.

    Regards,
    Martin