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.

Rhino debugger crashes when opening debug server session

Other Parts Discussed in Thread: MSP430F2618

I am trying to get DSS working with CCS 5.3 using an MSP430F2618.

The code I am using is the quicksort example code that ships with CCS, though I modified the config so that it works with the F2618. This code compiles and runs normally by itself, and I'm able to load the binary on a target (I'm using an Olimex dev board with an F2618) and it runs as expected. At least that part works!

To start, I copied Quicksort.js from ccs_base\scripting\examples\DebugServerExamples into my quicksort project directory. I modified the server.setConfig line (line 17) to point to my config file. Then I opened up a scripting console and ran loadJSfile on Quicksort.js. The script runs, and it seems to halfway start a debug server, but it hangs, and I don't see a way of aborting it without completely exiting CCS and restarting.

Next I tried using the Rhino debugger to try and step through this script to see where it's getting hung up. I opened up a Windows command prompt, changed the directory to my project directory, and then I ran "dss -dss.debug Quicksort.js". When I try stepping through the script with either "step over" or "step into", when I try to step over the server.openSession() line, Rhino simply exits without an error.

I could use some help on what to do next. How can I debug this script and figure out what is making the launch of the debug server hang if the javascript debugger crashes when I try to step over the line that opens the debug server?

Much appreciated,

M

  • Hello,

    Please enable verbose DSS logging and reproduce the issue. Zip and attach the log to this thread. The log should provide some clues as to what is going on.

    Thanks

    ki

  • I have enabled TraceLevel.ALL and the script is getting farther than last time. I now get a message that says, "MSP430: Can't Single Step Target Program: Could not single step device"

    Again, the only modification I made to the Quicksort.js script that ships with CCS is the addition of the debug message output, and to point the script to the right directories.

    Here is the script: http://pastebin.com/Hgz39Dmp

    And the debug output: http://pastebin.com/7py1Nn4Z

    Also, is there a way to "break" or "kill" a script from the scripting console? It seems that every time a script crashes, I have to restart CCS.

    Greatly appreciate your help!

    M

  • Mateja Putic said:
    I now get a message that says, "MSP430: Can't Single Step Target Program: Could not single step device"

    looking at the logs, it looks like it is the runBenchmark call that the issue occurs.

    It sounds like you don't have the emulation resources to start target execution. The logs say you are setting just one breakpoint. So you should have one resource left over. It could be that the debugger is setting some other breakpoints somewhere. You may want to doublecheck the debugger properties

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

    Mateja Putic said:
    Also, is there a way to "break" or "kill" a script from the scripting console? It seems that every time a script crashes, I have to restart CCS.

    You can try CTRL-Z. Are you running the script from the console or command-line?

  • I checked the link you provided and I tried running debugSession.options.printOptions(".*") but nothing gets printed, neither to the console or the log. The trace level is set to ALL for both the log and the console, so this is quite strange. Is there something else I have to enable to get this output?

    Here's the script I'm working with, it's very stripped back, the referenced line is # 32: http://pastebin.com/6yKeJ5nL

    Also, I appreciate the tip about CTRL+Z, but it doesn't seem to work, I am still having to restart CCS whenever there is something wrong with the script, and the Rhino debugger simply exits silently when I try to step through the same script. It's been a very unforgiving experience so far, but I have to stick with it.

    Thanks again for staying with this issue.

  • Mateja Putic said:
    I checked the link you provided and I tried running debugSession.options.printOptions(".*") but nothing gets printed, neither to the console or the log.

    That should work. Though your script uses 'session' for the debug session instance. So I assume you have 'session.options.printOptions(".*')'?

    Mateja Putic said:
    Also, I appreciate the tip about CTRL+Z, but it doesn't seem to work,

    It is a little tricky. You might have to press CTRL+Z repeatedly and quickly to get a chance to break in. It's not very friendly :)