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.

CODECOMPOSER: Debug Server Scripting: Multiple errors while uploading binaries

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: TMS320C6678

Tool/software:

IDE: Code Composer Studio Version 12 | Target: TMS320C6678 | Debug Probe: Blackhawk XDS560v2 System Trace


Hello there,

I am currently trying to implement an automated ethernet-based test framework in order to test our modules. To achieve this I have been using an debug server in order to connect to the debug probe and upload my binaries to all cores of my target. Overall this approach works, however it isn't working as reliable as I hope it'd be, since sometimes I've been getting various error messages like:

SEVERE: File: /path/to/binary.elf: Load failed.
SEVERE: C66xx_0: Unable to terminate memory download

or

SEVERE: C66xx_2: Error: (Error -6311) PRSC module failed to write to a register. (Emulation package 9.13.0.00201)

or

Error connecting to the target: (Error -1143 @ 0x0)
Device core was hung. The debugger has forced the device to a ready state and recovered debug control, but your application's state is now corrupt. You should have limited access to memory and registers, but you may need to reset the device to debug further.
Emulation package 9.2.0.00002)

The various kinds of error messages are making it hard for me to narrow down the cause of this problem. I have tried the following in order to minimize the problem (with little to no success):

- Lowered the clock speed (TCLK frequency)
- Raised the TCLK in order to see if I can reproduce the error more reliably
- Tried an older CCS version (v8)
- Compiled different binaries and uploaded them
- Uploaded the same binaries with CCS (successfully most of the time) and then tried it via the debug server (unsuccessful most of the time)
- Power-cycled the board and the debug probe
- Tried with a different board and debug probe

Do you have any idea what exactly might be causing this problem / how to increase the reliability of the debugger?

Thanks,

Long

  • Hello,

    Both -6311 and -1143 error is described in the below document:

    https://dev.ti.com/tirex/explore/node?node=A__ANoamrIZPWD2-6T-NDDWGg__ccs_devtools__FUz-xrs__LATEST

    In both cases, the issue is typically due to the device/target getting in a bad state. This can be an issue with the running application. 

    - Uploaded the same binaries with CCS (successfully most of the time) and then tried it via the debug server (unsuccessful most of the time)

    Based on the above comment, it sounds like the issue rarely occurs with the CCS IDE but happens very often with DSS? Considering both CCS IDE and DSS would use the same debugger underneath, the issue could be something else like the DSS script.

    ki

  • Hello Ki,

    the errors -6311 and -1143 were indeed caused by a misconfiguration on my end resulting that my device/target getting in a bad state. Thank you for this input.

    However I could not determine the reason why my binary uploads are failing. Attached are code snippets of my client and server script.

    # Evaluate symbols command configuration (Client snippet)
    my @cmdEvaluate = map {{
        "name"     => "evaluate",
        "exprs" => {"'utest.cpp'::avgValue" => undef, "'utest.cpp'::maxValue" => undef,
                    "'utest.cpp'::minValue" => undef, "'utest.cpp'::hits" => undef,
                    "'utest.cpp'::error" => undef},
        "core"     => $_,
        "func"    => $func,
    }} (0..$coresN);

    // Server snippet
    function loadCommandHandler(server, cmd){
        try {
            var session = server.sessions[cmd.core];
            session.memory.loadProgram(cmd.program,[cmd.args]);
            print(cmd.program);
            return { "status": "OK" };
        } catch (err) {
            return { "status": "FAIL", "message": "" + "" + err};                  
        }    
    }

    I have verified that the supplied arguments are correct and I've been using functions supplied by the DSS API.

  • Looks like you are using a custom implementation of the load command. I assume you are passing arguments to main?

    In any case, a few comments:

    verall this approach works, however it isn't working as reliable as I hope it'd be, since sometimes I've been getting various error messages like:

    SEVERE: File: /path/to/binary.elf: Load failed.
    SEVERE: C66xx_0: Unable to terminate memory download

    You mentioned that this error is sporadic. How often does it fail?

    Does the same executable load successfully all the time when using the CCS IDE for debug?