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.

CCSV4 Debug Stellaris Startup fails but was Previously working.

Other Parts Discussed in Thread: CCSTUDIO

Everything was working fine for days; Then with no warning I could not start the debug of the active project.

hello world (modified) on lm3s9b92 through TI ICDI.

Error was:

Error initializing emulator:
Unable to load C:\Program Files\Texas Instruments\ccsv4\DebugServer\drivers\DebugLib.dll because The operating system cannot run %1.

Using the ICDI successfully previously and through LM Flash Programmer on this board on this project.

Cleaned out as many caches as I could find and tried to set up a new target configuration.

Debug log shows lots of Polling messages then:

00012190    3.32735419    [2244] 0x00000CE4 4 CORTEX_M3_0 POLL I: TimeToPollAgain() target is idle and needs polling in 1937 ms   
00012191    3.32741976    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::Poll(timeToNextPoll = 0) = S_OK   
00012192    3.32747197    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::Poll()   
00012193    3.32770181    [2244] 0x00000CE4 4 CORTEX_M3_0 POLL I: TimeToPollAgain() target is idle and needs polling in 1937 ms   
00012194    5.16026878    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::Poll(timeToNextPoll = 0) = S_OK   
00012195    5.16062784    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::Poll()   
00012196    5.16067839    [2244] 0x00000CE4 4 CORTEX_M3_0 POLL I: TimeToPollAgain() target is idle and needs polling in 94 ms   
00012197    5.16079283    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::Poll(timeToNextPoll = 0) = S_OK   
00012198    5.16084242    [2244] 0x000008B0 5  COM_DBG_IF C: DS_Message_Dialog::SetButtonResponse()   
00012199    5.16272116    [2244] 0x000008B0 5  COM_DBG_IF R: DS_Message_Dialog::SetButtonResponse()   
00012200    5.16318512    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::Poll()   
00012201    5.16324568    [2244] 0x00000CE4 3 CORTEX_M3_0 POLL C: Polling with state STATE_ERROR and status EVENT_DSP_HALT   
00012202    5.16330099    [2244] 0x00000CE4 3 CORTEX_M3_0 POLL R: Poll() returning   
00012203    5.16334963    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::Poll(timeToNextPoll = 0) = S_OK   
00012204    5.16353226    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::Poll()   
00012205    5.16362286    [2244] 0x00000CE4 3 CORTEX_M3_0 POLL C: Polling with state CPU_ST_INITIALIZE_FAILED and status EVENT_DSP_HALT   
00012206    5.16367197    [2244] 0x00000CE4 1 CORTEX_M3_0 GTI C: GTI_QUIT( 0x00000000 )   
00012207    5.16374016    [2244] 0x00000CE4 1 CORTEX_M3_0 GTI R: GTI_QUIT( 0x00000000 )   
00012208    5.16445303    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::OnConfigured()   
00012209    5.16450930    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::OnConfigured()   
00012210    5.16458654    [2244] 0x00000CE4 5  COM_DBG_IF R: dsDebugger::Poll(timeToNextPoll = 0) = S_OK   
00012211    5.16506720    [2244] 0x00000CE4 5  COM_DBG_IF C: dsDebugger::Poll()   
00012212    5.16539049    [2244] 0x00000CE4 3  POLL C: SystemDeInitializer::Poll()   
00012213    5.16544437    [2244] 0x00000CE4 3  POLL C: SystemDeInitializer::BeginShutdown()   
00012214    5.16550398    [2244] 0x00000CE4 1  COM_DBG_IF C: ImplementationValidity::MarkInvalid()   
00012215    5.16563320    [2244] 0x00000CE4 1  COM_DBG_IF R: ImplementationValidity::MarkInvalid()   
00012216    5.16568613    [2244] 0x00000CE4 3  LIB C: Locating "CleanupCtools" in 0x1B520000   
00012217    5.16608000    [2244] 0x00000CE4 3  LIB R: Located "CleanupCtools" at 0x1B567190   
00012218    5.16640186    [2244] 0x00000CE4 3  LIB C: Locating "CleanupCtoolsAsync" in 0x1B520000   
00012219    5.16644955    [2244] 0x00000CE4 3  LIB R: Located "CleanupCtoolsAsync" at 0x1B567570   
00012220    5.16653490    [2244] 0x00000CE4 3  CT C: CleanupCtoolsAsync()   
00012221    5.16688681    [2244] 0x000001FC 3  CT C: CleanupCallback::OnComplete()   
00012222    5.16693830    [2244] 0x000001FC 3  CT R: CleanupCallback::OnComplete()   
00012223    5.40635395    [2244] 0x00000CE4 3  CT R: CleanupCtoolsAsync()

  • hello.launch -- It's greek to me....

     

    <?xml version="1.0" encoding="UTF-8"?>
    <launchConfiguration type="com.ti.ccstudio.debug.core.CCELaunchType">
    <booleanAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_S_ONLY" value="false"/>
    <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
    <stringAttribute key="CCEDebugOptions.CPU_RESOLVE_OPTION" value="exact"/>
    <stringAttribute key="org.eclipse.debug.ui.DISPLAY_NAME" value="hello [Debug] - Stellaris In-Circuit Debug Interface_0/CORTEX_M3_0"/>
    <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
    <stringAttribute key="CCEDebugOptions.LOADING_OPTION" value="program"/>
    <stringAttribute key="CCEDebugOptions.DEBUG_PROPERTIES.Stellaris In-Circuit Debug Interface_0/CORTEX_M3_0" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot; ?&gt;&#10;&lt;PropertyValues&gt;&#10;&#10;  &lt;property id=&quot;ConnectOnStartup&quot;&gt;&#10;    &lt;curValue&gt;1&lt;/curValue&gt;&#10;  &lt;/property&gt;&#10;&#10;&lt;/PropertyValues&gt;&#10;"/>
    <stringAttribute key="CCEDebugOptions.CPU_ISA" value="CORTEX_M3"/>
    <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="com.ti.ccstudio.debug.core.CCEDebugger"/>
    <mapAttribute key="com.ti.ccstudio.debug.core.VARIABLE_STATE"/>
    <mapAttribute key="com.ti.ccstudio.memory.ui.displayFormats">
    <mapEntry key="Stellaris In-Circuit Debug Interface_0/CORTEX_M3_0@##separator##@0" value="TI_STYLE_HEX_32"/>
    </mapAttribute>
    <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
    <stringAttribute key="com.ti.ccstudio.debug.core.DISPLAY_NAME_FORMAT" value="hello [Debug] - {0}"/>
    <stringAttribute key="CCEDebugOptions.TARGET_CONFIGURATION_OPTION" value="full"/>
    <stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
    <stringAttribute key="com.ti.ccstudio.debug.core.MRU_PROGRAM_NAME" value="C:\StellarisWare\boards\ek-lm3s9b92\hello\ccs\Debug\hello.out"/>
    <stringAttribute key="CCEDebugOptions.CPU_NAME" value="Stellaris In-Circuit Debug Interface_0/CORTEX_M3_0"/>
    <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="hello"/>
    <stringAttribute key="com.ti.ccstudio.debug.core.MRU_MODULES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;modules&gt;&#13;&#10;&lt;module name=&quot;C:\StellarisWare\boards\ek-lm3s9b92\hello\ccs\Debug\hello.out&quot; time=&quot;Tue May 03 09:20:57 PDT 2011&quot; time_long=&quot;1304439657413&quot;/&gt;&#13;&#10;&lt;/modules&gt;&#13;&#10;"/>
    <stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
    <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/hello.out"/>
    <stringAttribute key="com.ti.ccstudio.debug.core.BUILD_CONFIGURATION" value="Debug"/>
    <stringAttribute key="CCEDebugOptions.TARGET_CONFIGURATION_FILE" value="C:\StellarisWare\boards\ek-lm3s9b92\hello\ccs\target_config.ccxml"/>
    </launchConfiguration>

  • Robert Parker said:

    Error was:

    Error initializing emulator:
    Unable to load C:\Program Files\Texas Instruments\ccsv4\DebugServer\drivers\DebugLib.dll because The operating system cannot run %1.


    Can you check the suggestion in this related post, and verify that debuglib.dll and the other dlls mentioned there exist in the respective directories?

  • The dlls are where I expect them.

  • Did an un-install and re-install of CCSV4.2.2.00033 and the problem persists..

  • Is this on Windows7?

    I know you said you did this before, but could you reconfirm that you deleted target cache and debug launch files are described here?
    http://processors.wiki.ti.com/index.php/Troubleshooting_CCS#Debugger

  • Sequence of events:
    Debug session works OK. Debugging code. (Version 4.2.2.00033 with patch for LM3S9B92 rev C5.)
    I may have worked on a CCS3.3 MSP-430 project in this time frame and mucked about some as I had lost the
    bin/d43 build configuration for debug AND/OR softbaugh programming.
    I think I did at least one successful Stellaris cortex-M3 debugging session here.
    Wrote enhancement code into project.
    Numerous test compiles to get out coding errors and warnings.
    Tried another debug session of the now compiling code and it failed with the error below.
    Tried a previously working debug session on another project. It failed the same way.
    Cleaned out all caches and the workspace and re-installed code Composer Studio.
    Still fails as below. Looked at the DbgView, hello.launch and eclipse logs and saw nothing obvious.

    Note: no longer see the Texas Instruments/Luminary ICDI debugger available in the Debug Target configuration menu.
    Using:
    Stellaris In-Circuit Debug Interface

    Error:
    Error initializing emulator:
    Unable to load C:\Program Files\Texas Instruments\ccsv4\DebugServer\drivers\DebugLib.dll because The operating system cannot run %1.

    Either I lost the "magic" target configuration across the board (All projects.) or I wiped out a path/script in Eclipse or the JRE

    I'm running an XP virtual machine under VMWare on Ubuntu 10.4.

  • Robert Parker said:
    I'm running an XP virtual machine under VMWare on Ubuntu 10.4.

    I wonder if this is the source of the problem. Do you have access to a native XP machine that you can test the same hardware and CCS with?

  • This virtual machine was what the system was working on previously. All other IDE's and targets worked on it.

    Tried deleting caches and the workspace again and starting over to the same effect/error.

  • Found a few things that point to the error but haven't yet connected the dots....

    The error is probably an Windows XP Operating System error. The message is associated with codes 182, 188, 189, 190, 192, 194, 195, 198, 201, 202

    Looked into Administrative tools \ Event Viewer and found the following 3 errors:

    Error Source - SideBySide   Event -  59  Generate Activation Context failed for C:\Program Files\Texas Instruments\ccsv4\common\bin\xerces-c_2_5_0D.dll. Reference error message. The operation completed successfully.

    Error Source - SideBySide   Event -  59 Resolve Partial Assembly failed for Microsoft.VC80.DebugCRT. Reference error message: The referenced assembly is not installed on your system

    Error Source - SideBySide   Event -  32 Dependent Assembly Microsoft.VC80.DebugCRT could not be found and Last Error was The referenced assembly is not installed on your system.

  • I'm not sure if this will help, but it would be quick to test:

    1) Download and re-install the VS2005 redistributable: http://www.microsoft.com/downloads/en/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

    2) Download and re-install the VS2005 SP1 redistributable: http://www.microsoft.com/downloads/en/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

    3) Check your Windows\system32 folder for any copies of xerces_2_5*.dll. If you find one, temporarily rename it.

    4)  Retest ...

  • Tried all the above to no effect.  The Debug session launch fails with the same error.

    Loaded up a new virtual machine and installed Code Composer Studio, grabbed my modified

    StellarisWare/hello and the debug launch works fine.

    It's clear I broke the XP operating system install.  This is no longer a "show stopper" but I would still

    like to know why and learn how to trace the error faster.

  • One thing to try to trace such errors might be to load debuglib.dll in "Dependency Walker". It may be that this dll communicates with a windows driver that is not correctly installed on the system. This tool would flag any missing dependencies.