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.

IcePick_D_0: Error initializing emulator

Other Parts Discussed in Thread: AM3359, AM3358, SYSBIOS

Hello,

I am getting an "IcePick_D_0: Error initializing emulator" error when trying to debug the "Hello World" sample application.

I am running CCS v6.1.1.00022 on a Windows 7 PC.  The target is a PhyCORE-AM335x Rapid Development Kit (SOM and Carrier Board).  The connection is through a Spectrum Digital XDS510USB Emulator.  In the Target Configuration Editor, I have chosen the XDS510USB Emulator and the AM3359 Device.

Pressing the Test Connection button indicates success, with the following response:

[Start: Spectrum Digital XDS510USB Emulator_0]

Execute the command:

%ccs_base%/emulation/drivers/sdjtag.exe -f %boarddatafile% -v -X reset -X scantest

[Result]

** BoardFilePath: C:\Users\ESD~1.ORM\AppData\Local\TEXASI~1\CCS\ti\0\0\BrdDat\testBoard.dat
** Resetting Emulator
 -- Emulator is Reset
** Emulator Scan Test
 -- Found JTAG IR Length of 6
 -- Found 1 device(s) in the scan chain

[End: Spectrum Digital XDS510USB Emulator_0]

Any ideas as to why I cannot connect with a debug session?

Thanks.

  • Hi,

    I would first check the reference below that helps thoroughly check the various scenarios where the connection issues can happen. Given your report I would start on section 3.2:

    processors.wiki.ti.com/.../Debugging_JTAG_Connectivity_Problems

    Hope this helps,
    Rafael
  • Hi Rafael,

    I have already been through that wiki page (and many of the places it links to) to no avail. Here is my ccxml config file, if that helps:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="configuration_0">
    <instance XML_version="1.2" desc="Spectrum Digital XDS510USB Emulator" href="connections/SD510USB_Connection.xml" id="Spectrum Digital XDS510USB Emulator" xml="SD510USB_Connection.xml" xmlpath="connections"/>
    <connection XML_version="1.2" id="Spectrum Digital XDS510USB Emulator">
    <instance XML_version="1.2" href="drivers/sdgoicepickusb_d.xml" id="drivers" xml="sdgoicepickusb_d.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgocs_dapusb.xml" id="drivers" xml="sdgocs_dapusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgocortexMusb.xml" id="drivers" xml="sdgocortexMusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgocschildusb.xml" id="drivers" xml="sdgocschildusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgocortexAusb.xml" id="drivers" xml="sdgocortexAusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgocsstmusb.xml" id="drivers" xml="sdgocsstmusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdgoetbcsusb.xml" id="drivers" xml="sdgoetbcsusb.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/sdxds510usbpru.xml" id="drivers" xml="sdxds510usbpru.xml" xmlpath="drivers"/>
    <property Type="stringfield" Value="1" id="TCK Divisor/Adaptive TCK Delay"/>
    <property Type="choicelist" Value="0" id="portAddr1"/>
    <property Type="choicelist" Value="0" id="Assert target system reset on startup"/>
    <property Type="choicelist" Value="0" id="Pulse TRST on startup"/>
    <platform XML_version="1.2" id="platform_0">
    <instance XML_version="1.2" desc="AM3359" href="devices/AM3359.xml" id="AM3359" xml="AM3359.xml" xmlpath="devices"/>
    <device HW_revision="1" XML_version="1.2" description="AM33x - Cortex A8 Embedded Processor" id="AM3359" partnum="AM3359">
    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
    <property Type="choicelist" Value="0" id="bypass"/>
    </router>
    </device>
    </platform>
    </connection>
    </configuration>
    </configurations>

    This seems to match my hardware and, as I said, the "Test Connection" works. But "Launch Selected Configuration" does not work.
  • Hi,

    Thanks for sending the .ccxml file. I was able to connect to my BeagleBone here using your configuration, therefore the problem may be on the device itself or on the adapter board (your kit seems to use an ARM 20-pin JTAG connector).

    Therefore I ask: do you have any code running in your board? There are cases where Linux turns off the clock to the Debug Subsystem circuitry while running, thus preventing any connections via this port. A long and detailed discussion is here, but to isolate this I usually do the steps shown here. Additional links to properly debug a system with embedded Linux is shown in this other discussion.

    The adapter itself should follow the pinouts described in section 3 of this wiki page.

    Apart from this I am unsure what may be happening short of a faulty development kit. In any case, please give these suggestions a try.

    Hope this helps,

    Rafael

  • Hi Rafael,

    You are correct that my kit uses a 20-pin JTAG connector.  My XDS510USB has a 14-pin connector.  I have a home-made adapter to connect the two.  I verified that the adapter is built correctly using the JTAG link you provided.

    The kit has a Phytec example distribution of Linux stored in flash, but I am not booting to that.  I verified this by watching it boot with PuTTY then changing the boot switch settings on the kit and seeing nothing boot.  So there is no code running on the board currently.

    I said in my original message that the "Test Connection" button in CCS reports:

    -- Found JTAG IR Length of 6
    -- Found 1 device(s) in the scan chain

    Does this mean that CCS is seeing the ICEPick Router on the AM3359 but none of the processors?  On the CCS Target Configuration screen there is a spot to define an initialization script for the router.  Is there some Gel file that I should be specifying there?  Or is there something else that would cause it to see the router but not the other devices?

    Thanks again.

  • Hi Rafael,

    Here is some more information. I found that the ICEPick boot mode is set by the AM3359's EMU0 and EMU1 pins (section 27.1.2.2 in the AM335x Tech Ref Manual). These are connected to push buttons on my kit. But no combination of holding these buttons at power-up made any difference.
  • Hi,

    >>Does this mean that CCS is seeing the ICEPick Router on the AM3359 but none of the processors?  On the CCS Target Configuration screen there is a spot to define an initialization script for the router.  Is there some Gel file that I should be specifying there?  Or is there something else that would cause it to see the router but not the other devices?

    The Test Connection button validates the hardware connection between the JTAG pod and the device, but it does not get to the point of verifying if the ICEPICK is up and running correctly.  With this in mind I thing my last suggestion is moot: the hardware (including the adapter) should be electrically fine.

    In this case other factors may be at stake. One example is the "Test Connection" button transfers a minimal amount of data, but longer JTAG bitstreams may suffer from jitter, attenuation or crosstalk. To verify if these artifacts are at play, the JTAG TCLK speed can be reduced. The XDS510USB uses the setting "Emulator port speed" as a delay counter on the TCLK line - the larger the number the slower the connection.

    Another very unusual scenario is the boot mode of the device (set via the EMU pins), although most of the boards are hardwired to enable the debug mode - I didn't check yours. In this case, try to locate any switches or jumpers and follow the device specifications. In the case of AM335x, this is described in section 27.1.2.2.2 of its TRM:

    One last detail I didn't mention is the use of the "Target Status" functionality to evaluate the status of each core of the device. For details on how to use it, check the forum post below:

    https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/195554/698524#698524

    I will think of other scenarios and let you know if I find something that could be contributing to this.

    Hope this helps,

    Rafael

  • Hi Rafael,

    I'm not sure what are reasonable values for "Emulator port speed", but I tried 1, 10 and 100.  This made no difference.

    Maybe you didn't see my update from yesterday, but I found two pushbuttons on the carrier board that are tied to EMU0 and EMU1.  I tried all combinations of holding these down while powering up and that made no difference.  (BTW, these buttons are connected through jumpers and I made sure the jumpers were installed).

    Your last suggestion of checking the Target Status won't work because the "IcePick_D_0: Error initializing emulator" error prevents me from launching a debug session.

    I will continue to stumble around looking for a solution.  Any other ideas you have would be greatly appreciated.

    Thanks.

  • Hi Rafael,

    This might be some useful information. I was able to launch a debug session with a Target Configuration using an XDS510USB Emulator TI-JSC (rather than the non JSC that I've been using so far). The Target Status window shows the ICEPick (and everything attached to it) as Unavailable. If I try to connect to any of the devices I get:

    IcePick_D_0: Error connecting to the target: (Error 102 @ 0x0) Internal error: Invalid error code.

    Hope this helps in figuring out what is going on.
  • Nevermind. That JSC test was probably meaningless. I don't think it was talking to the board at all, since I get the exact same results if the emulator pod is not even connected to the board.
  • Hi,

    I was trying to reproduce the exact same issue here found the same error message as you when I simply disconnect my XDS510USB from the host PC:

    Therefore the SDConfigExv5 utility is able to "see" the XDS510USB but CCS is not. I vaguely recall this happening in the past but I couldn't find any specific threads where this is discussed. I will continue searching.

    Besides, the only way I was able to "break" this by having the JTAG debugger properly attached to the host PC is if something else is clinging to it - for example, I configured the SDConfigExv5 utility to continuously run a scan pattern test and tried to connect to CCS. As expected, I got the same error.

    As soon as I stopped the test CCS was able to reconnect.

    Therefore I suspect there may be a corruption in your CCS setup (some driver file corrupt, for example) or another process locking up the JTAG debugger. I can't suggest any solutions for the latter other than restarting the PC, making sure all the utilities are closed, etc. For the former, though, I would suggest trying to update or reinstall the Spectrum Digital component of your CCS setup. For details, check section 3 of:

    http://processors.wiki.ti.com/index.php/Updating_CCSv6

    Apart from this I am really running out of ideas.

    Hope this helps,

    Rafael

  • desouza said:
    I was trying to reproduce the exact same issue here found the same error message as you when I simply disconnect my XDS510USB from the host PC:

    While the same error message appears when attempting to start a debug session with the XDS510USB disconnected from the host PC, that doesn't completely stack up with the test connection passing (as reported in the first post).

    With a Spectrum Digital XDS510USB PLUS not connected to the host PC the CCS 6.2.0 test connection fails with a specific message that the emulator is not connected:

    [Start: Spectrum Digital XDS510USB Emulator_0]
    
    Execute the command:
    
    %ccs_base%/emulation/drivers/sdjtag.exe -f %boarddatafile% -v -X reset -X scantest
    
    [Result]
    
    ** BoardFilePath: C:\Users\MR_HAL~1\AppData\Local\TEXASI~1\CCS\TI_CCS~4\0\0\BrdDat\testBoard.dat
    ** Resetting Emulator
         ERROR -- XDS510-USB Emulator not connected/enumerated
    
    [End: Spectrum Digital XDS510USB Emulator_0]

    I tried to repeat the specific "IcePick_D_0: Error initializing emulator" error by disabling the DEBUGSS functional clock by writing to the CM_WKUP_DEBUGSS_CLKTRL register. This prevented the debugger from being able to connect to the CS_DAP_DebugSS or CortexA8 in an AM3359 but was still able to connect to the IcePick_D. With the DEBUGSS functional clock disabled the error when starting a debug session was different in that CCS reported that was unable to connect to the DAP, rather than unable to connect to the IcePick:

    i.e. even if the code running on the target has disabled the debug sub-system clock, that doesn't explain the observed "IcePick_D_0: Error initializing emulator" error .

  • Eric Dye said:
    I am getting an "IcePick_D_0: Error initializing emulator" error when trying to debug the "Hello World" sample application.

    I did manage to get the "IcePick_D_0: Error initializing emulator" error when using a Spectrum Digital XDS510USB PLUS with CCS 6.2.0.00050 and TI Emulators 6.0.407.6 under Windows 7. The target device was an AM3358 in an Ardunino Tre. However, I have only got the "IcePick_D_0: Error initializing emulator" error very intermittently in 2 out of over 50 attempts at starting a debug session and so can't determine exactly what triggers the "IcePick_D_0: Error initializing emulator" error.

    However, when using the Spectrum Digital XDS510USB PLUS to run the SYS/BIOS Task Mutex Example I was getting other intermittent errors. When the target configuration was created the "TCK Frequency MHz (Counter Mode)" was set to 10 MHz by default:

    With the TCK Frequency set to 10 MHz in ten tests of trying to run the SYS/BIOS Task Mutex Example:

    - 1 run successfully completed the test

    - 1 run suffered a Data Abort exception

    - 8 runs suffered a " ti.sysbios.timers.dmtimer.Timer: line 1148: E_freqMismatch: Frequency mismatch: Expected 32768 Hz, actual: 22807707 Hz." assertion failure.

    When the TCK Frequency was changed to 1 MHz then ran the SYS/BIOS Task Mutex Example 10 out of 10 times successfully.

    When the TCK Frequency was changed back to 10 MHz then intermittent SYS/BIOS errors started again.

    I don't really understand why the TCK Frequency causes the SYS/BIOS runtime errors, but maybe reducing the TCK Frequency will help avoid your errors.

    [At the time I did get "IcePick_D_0: Error initializing emulator" errors the TCK Frequency would have been at the default of 10 MHz]

  • Hi,

    So you also have a XDS510USB PLUS but this one works? If so, in this case I don't think the CCS install is at fault.

    Summarizing:
    - The original ICEPICK_D_0 Error is triggered by the fact CCS cannot find the XDS510USB at all, either due to a bad cable (improbable), corrupt or conflicting SW. This is confirmed by the tests I did before: leaving the JTAG debugger disconnected or another windows process running will trigger the exact same response from CCS. Something is somehow preventing this JTAG debugger from being recognized, but I can't pinpoint what it is. There is a slight chance the Debug Server log I mentioned before can shed some additional light to the problem.
    - I get the exact same error as you with my XDS510USB if I disable the clock on the CM_WKUP_DEBUGSS_CLKCTRL register of my BeagleBone. Therefore the drivers are responding identically.
    - The test connection button works if the device is in the state above - i.e., as I mentioned before the status of the cores do not influence the "Test Connection" functionality.

    I just want to clarify something: at the moment of your tests you have only one XDS510USB plugged to the host PC, right?

    Regards,
    Rafael
  • Chester,

    These settings are only applicable to the XDS510USB PLUS. The top five options are the ones that affect both models.

    Unfortunately the XDS510USB and XDS510USB PLUS are not actively supported by Spectrum Digital anymore, thus these intermittent errors may not be ever fixed. (reference here)

    Regards,

    Rafael

  • desouza said:
    These settings are only applicable to the XDS510USB PLUS. The top five options are the ones that affect both models.

    Eric and Rafael, I apologize for any confusion I caused by attempting to investigate the problem using a Spectrum Digital XDS510USB PLUS, when the problem occurs with a Spectrum Digital XDS510USB.

    Until Rafael pointed it out I wasn't aware that some of the options on the CCS 6 target configuration settings for a "Spectrum Digital XDS510USB" Emulator are only for the Spectrum Digital XDS510USB PLUS.

    Looking at the configuration screens in the <ccs_install_dir>\ccsv6\ccs_base\emulation\specdig\sdconfigex\SdConfigEx.exe program it is clearer which options are for the XDS510USB:

    And which are for the XDS510USB PLUS:

    Eric Dye said:
    I'm not sure what are reasonable values for "Emulator port speed", but I tried 1, 10 and 100.  This made no difference.

    The <css_install_root>\ccsv6\ccs_base\emulation\specdig\docs\pdf\SdTechNote_1.PDF has some notes about reasonable values for "Emulator port speed", albeit for the OMAP16XX based on an ARM926 core.

    I also found Additional Emulator Setting on the Spectrum Digital website which describes the Disable certain emulation polling option as:

    Check this box if you want the highest emulator performance. Uncheck this box if you see erratic behavior under Code Composer.

    Maybe trying either of the following options, as per the SdTechNote_1.PDF, may help:

    - Emulator port speed of 8 and "Disable certain emulation polling" checked

    - Emulator port speed of 16 and "Disable certain emulation polling" unchecked