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.

java.lang.UnsatisfiedLinkError when load debug session

Now we have upgraded CCS(5.4.0.00091) and (XDS560v2 Pro) with clean Test PC(reinstalled OS).  

 After try auto trace automation with reconfigured ccxml and delete .metadata(all info is new and clean).

4300..TI-trace.7z

8524.AutoTrace.7z

There are some new issues from green font, ti_xpcom.dll file existed in PC. My draft analysis is debug session can’t get through. But why dll file can’t be loaded. 

java.lang.UnsatisfiedLinkError: Can't load library: c:\ti\ccsv5\ccs_base\DebugSe

rver\win32\ti_xpcom.dll

        at java.lang.ClassLoader.loadLibrary(Unknown Source)

 PS: info/logs/script/versions attached

TI emulators 5.1.73.0

TI Simulators 5.4.0.4

Debug Server 5.4.0.279

Spectrum Digital Emulators 5.2.0.07

Checked CCS JAVA API document, I found CCS5.4 removed TraceAnalyzerSession API( No longer in JAVA API doc/ C:\ti\ccsv5\ccs_base\scripting\docs), here commented these Analyzer 3 line codes to debug first, as Analyzer is only called after trace correctly be caught

  • The CCS(5.4.0.00091) and (XDS560v2 Pro) can catch trace by CCS IDE.

    But if we use TI scripting API (C:\ti\ccsv5\ccs_base\scripting\docs) to catch trace, it can't work with Faraday platform chips.

    Waiting support online.

  • Anybody help this? thanks.

  • Hi Thomas, David,

    Thomas Yang55737 said:
    Now we have upgraded CCS(5.4.0.00091) and (XDS560v2 Pro) with clean Test PC(reinstalled OS).  

    From what version of CCS did you upgrade from?

    Can you also attach your script (or just a portion of it)?

    Thanks

    ki

  • Hi,

    Upgraded from CCS5.2.1.00018_win32 to CCS5.4.0.00091_win32

    All scripts and logs have attached in Thomas's first paragraph. Let's hurry up for this blocking issue, thanks.

    Ki-Soo Lee said:

    From what version of CCS did you upgrade from?

    Can you also attach your script (or just a portion of it)?

    Thanks

    ki

  • Thanks David. Sorry for overlooking the existing attachments.

    Can you remove all the -D options from line 57:

    java -Dxpcom.bridge.executeOnDedicatedThread=yes -Dorg.eclipse.swt.browser.XULRunnerPath="%CCS_PATH%\DebugServer\win32" -DXPCOM.RUNTIME="%CCS_PATH%\DebugServer\win32" autotrace

    Those options are not needed for CCSv5 and the .\DebugServer\win32 path was simply removed in later versions of CCSv5. That would account for the missing dll error in the old directory since it dos not exist.

    I suspect that should resolve the issue. I'm trying to find a 6488 target to test this theory myself but in the mean time you can try this and see if this resolves the issue for you

    Thanks

    ki

  • Hi Ki,

    By change java -Dxpcom.bridge.executeOnDedicatedThread=yes -Dorg.eclipse.swt.browser.XULRunnerPath="%CCS_PATH%\DebugServer\win32" -DXPCOM.RUNTIME="%CCS_PATH%\DebugServer\win32" autotrace

    to java autotrace, 

    Now java.lang.UnsatisfiedLinkError when load debug session issue solved. Thanks!!

    When execute autotrace.bat,  Line 238 in autotrace.java is not working as expected.

    traceChannel.startTraceRecording();   //Line 238
    CToolsTraceChannelStatus channelStatus = traceChannel.getStatus();
    if (!channelStatus.isEnabled()) {
    scriptingEnvironment.traceWrite("Error: trace did not enable for some reason!");
    teardown(1);
    }

    if (!channelStatus.isRecording()) {
    scriptingEnvironment.traceWrite("Error: trace did not start recording for some reason!");
    teardown(1);
    }

    Screen output:

    Error: trace did not start recording for some reason!

    Attached are logs and updated scripts.6237..TI-trace.7z2330.AutoTrace_startTraceRecordingIssue.7z

    If you need 6488 target environment, my working environment can be debug, conference call and remote debug ok for me. We may ask TS expert Thomas help to organize remote debug meeting.

    Thanks, -David

  • Hi David,

    I will need to get some help from the engineers who support the ctools trace APIs. I will keep you posted

    ki

  • Ok, You can also contact me or Thomas for more issue background.

  • Thanks. I've already copied in Thomas in the e-mail discussions I've started.

  • The call to setupTraceChannel in autotrace.java at line 177 is commented out.  This call is needed to proceed and  probably the reason that startRecording is failing.  Please try uncommenting this line and see if that resolves the issue.

    I suspect that line was commented out for a reason. So if, by uncommenting, you run into a different problem then please capture the following information and post it here.

    1. Enable trace logging by running the command "set TI_TRACE_LOGGING=6" in the DOS shell.
    2. Run the script and capture the failing sequence.
    3. Zip up the new files in %USERPROFILE%\.TI-trace folder and post it along with any error messages you see in the shell.
  • Hi,

    Error messages,

    AutoTrace: exception caught, java vm process should terminate now
    java.lang.RuntimeException: Internal software error while applying trace setting
    s for C64XP_2 : no pin map or pin count was specified in the channel settings fi
    le for C64XP_2.
    at com.ti.ctoolstrace.scripting.CToolsTraceChannel.importProperties(Nati
    ve Method)
    at com.ti.ctoolstrace.scripting.CToolsTraceChannel.setupTraceChannel(CTo
    olsTraceChannel.java:54)
    at autotrace.main(autotrace.java:178)

    traceChannel.setupTraceChannel(traceSettingsPath);  //Debug  line 178.

    Do you have correct tracesetting.xml? 

    logs and output in attached. 5873.AutoTrace_uncomment_setupTraceChannel.7z

    2146..TI-trace.7z

    Thanks, -David

  • Hi David

    There is an example under ccs_base\scripting\examples\CtoolTrace\Examples\Faraday_DSP_SD560V2_PRO.   This file has references to the different xml files that you can use as defaults. Please see if that helps.

  • David, thanks for sending the logs.  It looks like traceSettingsPath at line 20 of autotrace.java needs to be changed to the absolute path of the file (including the drive and all the sub-directories).

  • Hi, Jason  and Vikas,

    I have added absolute path into line 20, and using example/default setting xml.

    Still exception at line 178, but error becomes another error type, 

    java.lang.RuntimeException: Unable to communicate with the receiver,

    what else/configuration should be set?


    D:\SCT_Workspace\Tools\Profiling\AutoTrace>run_autotrace.bat > Screen_output.txt

    The system cannot find the path specified.
    RETURN (com.ti.dvt.engine.scripting.DVTServer.start Mon Jul 28 11:20:12 CST 2014
    )
    java.lang.RuntimeException: Unable to communicate with the receiver. Please ver
    ify that the pro trace receiver address is correct. Note: unable to connect to
    pro trace receiver at usb port 1
    at com.ti.ctoolstrace.scripting.CToolsTraceChannel.importProperties(Nati
    ve Method)
    at com.ti.ctoolstrace.scripting.CToolsTraceChannel.setupTraceChannel(CTo
    olsTraceChannel.java:54)
    at autotrace.main(autotrace.java:178)
    ENTRY (com.ti.dvt.engine.scripting.DVTServer.stop Mon Jul 28 11:20:20 CST 2014)
    Stopping DVTServer (com.ti.dvt.engine.scripting.DVTServer.disposeAndUnload Mon J
    ul 28 11:20:20 CST 2014)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.stop Mon Jul 28 11:20:20 CST 2014)

    Attached are logs and scripts.7343.AutoTrace_AbsolutePathADefaultTraceSetting.7z4214..TI-trace.7z

    Thanks,

    David

  • David, it looks like the settings file may be specifying the wrong USB port number.  Typically, port 0 is used.  Also, please make sure the USB cable is connected to both the receiver and the PC.  You can test the USB connection using the Spectrum Digital tool (<ccs-directory>\ccsv6\ccs_base\common\uscif\Sd560v2Config.exe).

    Also, I'm curious why port 1 is being specified.  Does this mean you have two receivers connected to the same PC, one on port 0 and another on port 1?  If so it is possible that these receivers switch ports when the computer is rebooted or other the receiver is power cycled.  So, if you have more than one receiver, I recomend only using USB for one receiver and using ethernet for any additional receivers.

  • hi,

    there is only one USB tracepod connected, and USB status ok when we test via Sd560v2Config.exe.  

    one point is that the CCS5.4 GUI operation to catch trace, it works. so I think the tracepod script automation issue is the JAVA API calling exceptions. need you confirm.  also attached GUI operation output.4276.ccs5-4.rar

    David, it looks like the settings file may be specifying the wrong USB port number.  Typically, port 0 is used.  Also, please make sure the USB cable is connected to both the receiver and the PC.  You can test the USB connection using the Spectrum Digital tool (<ccs-directory>\ccsv6\ccs_base\common\uscif\Sd560v2Config.exe).

    Also, I'm curious why port 1 is being specified.  Does this mean you have two receivers connected to the same PC, one on port 0 and another on port 1?  If so it is possible that these receivers switch ports when the computer is rebooted or other the receiver is power cycled.  So, if you have more than one receiver, I recomend only using USB for one receiver and using ethernet for any additional receivers.

  • publish example test result as Thomas request.  Thanks, -David

    ===================================================================================

    Hi Thomas,

     

    I have corrected part of bat paths,

    You can find Faraday_DSP_SD560V2_PRO.bat execution result,

     

    Beginning of Faraday_ETB_Test..............

    -receiver = Pro Trace

    -setupfile = C:\\ti\\ccsv5\\ccs_base\\scripting\\examples\\CtoolTrace\\Faraday\\

    Faraday_xds560v2usb.ccxml

    -app = C:\\ti\\ccsv5\\ccs_base\\scripting\\examples\\CtoolTrace\\Faraday\\autote

    st.out

    -triggerfile = C:\\ti\\ccsv5\\ccs_base\\scripting\\examples\\CtoolTrace\\C64xp\\

    Trace_On.xml

    -targetname = Spectrum Digital XDS560V2 STM USB Emulator_0/C64XP

    -channelfile = C:\\ti\\ccsv5\\ccs_base\\emulation\\analysis\\bin\\TraceCntrl_Def

    aultSettings_PRO_Dsp.xml

    -outfile = C:\\ti\\ccsv5\\ccs_base\\scripting\\examples\\CtoolTrace\\Examples\\T

    raceOutput.txt

    org.mozilla.javascript.WrappedException: Wrapped com.ti.ccstudio.scripting.envir

    onment.ScriptingException: Could not start server: DebugServer.1: Cannot read Sy

    stem Setup data from XML file C:\\ti\\ccsv5\\ccs_base\\scripting\\examples\\Ctoo

    lTrace\\Faraday\\Faraday_xds560v2usb.ccxml

    Error parsing file:

    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The

    primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\

    examples\CtoolTrace\Faraday\devices\tci6488_NoPeripheralRegs.xml while parsing f

    ile: C:\ti\ccsv5\ccs_base\scripting\examples\CtoolTrace\Faraday\devices\tci6488_

    NoPeripheralRegs.xml (Faraday_DSP_PRO_Test.js#96)

            at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:17

    05)

            at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:157)

            at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:20

    1)

            at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)

     

            at org.mozilla.javascript.gen.c1._c0(Faraday_DSP_PRO_Test.js:96)

            at org.mozilla.javascript.gen.c1.call(Faraday_DSP_PRO_Test.js)

            at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:3

    37)

            at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:275

    5)

            at org.mozilla.javascript.gen.c1.call(Faraday_DSP_PRO_Test.js)

            at org.mozilla.javascript.gen.c1.exec(Faraday_DSP_PRO_Test.js)

            at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:500)

     

            at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:4

    22)

            at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:388)

            at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:379)

            at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:176)

            at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:97)

            at org.mozilla.javascript.Context.call(Context.java:540)

            at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:447)

            at org.mozilla.javascript.tools.shell.Main.exec(Main.java:159)

            at org.mozilla.javascript.tools.shell.Main.main(Main.java:137)

    Caused by: com.ti.ccstudio.scripting.environment.ScriptingException: Could not s

    tart server: DebugServer.1: Cannot read System Setup data from XML file C:\\ti\\

    ccsv5\\ccs_base\\scripting\\examples\\CtoolTrace\\Faraday\\Faraday_xds560v2usb.c

    cxml

    Error parsing file:

    Fatal Error at (0, 0): An exception occurred! Type:RuntimeException, Message:The

    primary document entity could not be opened. Id=C:\ti\ccsv5\ccs_base\scripting\

    examples\CtoolTrace\Faraday\devices\tci6488_NoPeripheralRegs.xml while parsing f

    ile: C:\ti\ccsv5\ccs_base\scripting\examples\CtoolTrace\Faraday\devices\tci6488_

    NoPeripheralRegs.xml

            at com.ti.debug.engine.scripting.DebugServer$SessionFactory.<init>(Debug

    Server.java:161)

            at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.jav

    a:1128)

            at com.ti.debug.engine.scripting.DebugServer.openSession(DebugServer.jav

    a:65)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

            at java.lang.reflect.Method.invoke(Unknown Source)

            at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)

            ... 18 more

     

    C:\ti\ccsv5\ccs_base\scripting\examples\CtoolTrace\Examples>

  • David, please change the USB port in TraceCntrl_DefaultSettings_PRO_Globals.xml from 1 to 0 as shown below.

    <ADDR_CURRENT_USB>0</ADDR_CURRENT_USB>

  • David, please ignore the prior post.  We found the root cause of the issue in both the example and the autotrace.java script.  The problem is that the NewTargetConfiguration.ccxml file being used is for a different type of receiver.  Please replace NewTargetConfiguration.ccxml with a file created in CCS for the "Spectrum Digital XDSPRO USB Emulator" Connection type (shown below in green).   Since you have already created a target configuration file in CCS that works with this receiver you may choose to use that existing file.  To determine the path where the target configuration file is stored on your PC, pelase hover the mouse pointer over the tab name in the Target Configuration pane (shown below in red).

  • Hi Jason,

    Actually for autotrace script ccxml configuration file, which is already copied from CCS GUI ccxml file. this configuration file works when catch trace by CCS GUI. see below picture.

    Compared further more, you are asking to create configuration with Spectrum Digital XDSPRO USB Emulator, I will recreate this type configuration and try. 

  • Hi,

    With new Spectrum Digital XDSPRO USB Emulator configuration,

    1. CCS GUI to catch trace is ok whatever in Spectrum Digital XDSPRO USB Emulator or Spectrum Digital XDS560 V2 USB Emulator connection.

    2. Automation script can run and can get trace.bin and mytrace.tdf files after execution. But trace data is incorrect. We use CCS GUI to analyze such bin/tdf first, (Automation script analysis is not working yet as API change, code commented).

    See below pic and logs.

    D:\SCT_Workspace\Tools\Profiling\AutoTrace>run_autotrace.bat > Screen_output.txt

    The system cannot find the path specified.
    RETURN (com.ti.dvt.engine.scripting.DVTServer.start Wed Jul 30 14:08:33 CST 2014
    )
    ENTRY (com.ti.dvt.engine.scripting.DVTServer.stop Wed Jul 30 14:09:06 CST 2014)
    Stopping DVTServer (com.ti.dvt.engine.scripting.DVTServer.disposeAndUnload Wed J
    ul 30 14:09:06 CST 2014)
    RETURN (com.ti.dvt.engine.scripting.DVTServer.stop Wed Jul 30 14:09:06 CST 2014)


    D:\SCT_Workspace\Tools\Profiling\AutoTrace>

    logs:3404.AutoTrace_XdsproConfiguration_NoTraceRecord.7z 4442..TI-trace.7z

    Now issue is same with CCS5.2 we have met before, autotrace.java can get trace.bin. but no trace record.

    Thanks, -David

  • Hi

    As request, post email communication of TD command result here, 

    ==============================================================================

    Hi Thomas,

    I have tried with TD command to parse trace.bin. 

    c:\ti\ccsv5\ccs_base\emulation\analysis\bin\td.exe -procid 64x -bin D:\SCT_Workspace\Tools\Profiling\AutoTrace\trace.bin -app D:\SCT_Workspace\Tools\Profiling\AutoTrace\core3.out -rcvr pro -format CSV_NO_TPOS_QUOTE -output D:\SCT_Workspace\Tools\Profiling\AutoTrace\mytrace.csv

    rem -format CSV_NO_TPOS_QUOTE -timestamp abs -seekpos 10 -samples 100000

     

    Output,

    Bad PC, current export frame processing aborted, Sample not verified, The causes of this may be a possible bad branch pointer, corrupted trace data, wrong program file used during post-processing, unintended corruption of program image, use of non-traceable program image overlay, or self-modifying code.

    Sample not verified

    Bad data trace, Bad trace data packet sequence

     

    From parser result trace.bin are bad trace, so now problem should be located in one of below,  trace catch issue;trace parser issue.

     

    And I have another questions that, in mytrace.csv, there is no cycle data,

    Program Address

    Load Address

    Program Data

    Read Address

    Read Data

    Read Size (In Bits)

    Write Address

    Write Data

    Write Size (In Bits)

    Cycles

    Trace Status

     which command that we can get functional level CPU cycle in script? 

    Thanks,

    -David