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.

AM335x_Starter Kit xds100 debugging woes with CCS 5.3

Other Parts Discussed in Thread: AM3358

I cannot get debugging to work with CCS5.3 with my AM335x starter kit.

I  followed advice in another TI column that stated to use Mprog.exe 3.5 to flash the FTDI device to use ProductId A6D0 instead of 6001.

I did this, and now i get 2 "Texas Instruments XDS+Rs232 V1.0" devices in Windows device manager with no known Windows drivers (I am using Windows 7).

I then saw another column that stated that the TI  AM335x starter kit should use ProductID 6001 and *NOT* A6D0.

2 questions:

1) Which ProductID is the correct one to use with the AM335x starter Kit?

2) If it is 6001, does anyone have an ept file with the correct settings for the AM335x starter kit, because I will need to reflash it with Mprog.exe in order to use it.

Thanks!

Clive

Post

  • Clive,

    I think the Product ID you are trying to use is incorrect. The AM335x Starter Kit should have come with the standard FTDI's VID/PID (check the attached screen with my board connected to the serial port) - i.e., VID = 0x0403 and PID = 0x6010 (no 0x6001)

    To help clarify the differences, check question 6.5 (and 6.6 in specific cases) of the CCSv5 FAQ.

    Hope this helps,

    Rafael

     

  • Thanks.

    Do you have an ept file so I can re-flash my board to use the correct PID?

  • Clive,

    Please check the Template file I got from my board (AM335xSK Rev 1.2b). If your board revision is different, try at your own risk (I am not sure if this is compatible with all SKs).

    Regards,

    Rafael

     

    AM335xSK.rar
  • Thanks!

    My board was also Rev 1.2b, and flashing it worked. When I plugged it back into Windows, It used the standard FTDI driver.

    However, my problem is now that I am getting a very flaky connection within CCS 5.3 to the starter kit board.

    I am using the GEL file AM335x_SK_1.2.gel provided with the StarterWare 2.0.0.7.

    When I created the target .ccxml file for the very first time, I could connect to the board through the USB cable and set breakpoints and step through the code..

    On subsequent tries, however, I am getting errors and most of the time I fail to download the program (rtcClock provided as part of StarterWare).

    An example log of what I am getting is:

    CortxA8: Output: **** AM335x 15x15 EVM Initialization is in progress ..........
    CortxA8: Output: **** AM335x ALL PLL Config for OPP == OPP100 is in progress .........
    CortxA8: Output: Input Clock Read from SYSBOOT[15:14]: 24MHz
    CortxA8: Output: **** Going to Bypass...
    CortxA8: Output: **** Bypassed, changing values...
    CortxA8: Output: **** Locking ARM PLL
    CortxA8: Output: **** Core Bypassed
    CortxA8: Output: **** Now locking Core...
    CortxA8: Output: **** Core locked
    CortxA8: Output: **** DDR DPLL Bypassed
    CortxA8: Output: **** DDR DPLL Locked
    CortxA8: Output: **** PER DPLL Bypassed
    CortxA8: Output: **** PER DPLL Locked
    CortxA8: Output: **** DISP PLL Config is in progress ..........
    CortxA8: Output: **** DISP PLL Config is DONE ..........
    CortxA8: Output: **** AM335x ALL ADPLL Config for OPP == OPP100 is Done .........
    CortxA8: Output: **** AM335x DDR2 EMIF and PHY configuration is in progress...
    CortxA8: Output: EMIF PRCM is in progress .......
    CortxA8: Output: EMIF PRCM Done
    CortxA8: Output: DDR PHY Configuration in progress
    CortxA8: Output: Waiting for VTP Ready .......
    CortxA8: Output: VTP is Ready!
    CortxA8: Output: DDR PHY CMD0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD1 Register configuration is in progress .......
    CortxA8: Output: DDR PHY CMD2 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA0 Register configuration is in progress .......
    CortxA8: Output: DDR PHY DATA1 Register configuration is in progress .......
    CortxA8: Output: Setting IO control registers.......
    CortxA8: Output: EMIF Timing register configuration is in progress .......
    CortxA8: Trouble Writing Memory Block at 0x4c0000e4 on Page 0 of Length 0x4: (Error -1065 @ 0x4C0000E4) Unable to access device memory. Verify that the memory address is in valid memory. If error persists, confirm configuration, power-cycle board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.1.114.0)
    CortxA8: GEL: Error while executing OnTargetConnect(): target access failed at *((unsigned int *) (0x4C000000+0x0E4))=(unsigned int) 0x05 [AM335x_EVM.gel:264] at DDR2_EMIF_Config() [AM335x_EVM.gel:352] at AM335x_EVM_Initialization() [AM335x_EVM.gel:338] at OnTargetConnect() .
    CortxA8: File Loader: Data verification failed at address 0x80000000 Please verify target memory and memory map.
    CortxA8: Unable to terminate memory download: NULL buffer pointer at 0x3a9f
    CortxA8: GEL: File: C:\ti\AM335X_StarterWare_02_00_00_07\binary\armv7a\cgt_ccs\am335x\evmskAM335x\rtc\rtcClock.out: a data verification error occurred, file load failed.

    I would appreciate any help you can give on this.

    My ccxml file is:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <configurations XML_version="1.2" id="configurations_0">
    <configuration XML_version="1.2" id="Texas Instruments XDS100v2 USB Emulator_0">
    <instance XML_version="1.2" desc="Texas Instruments XDS100v2 USB Emulator_0" href="connections/TIXDS100v2_Connection.xml" id="Texas Instruments XDS100v2 USB Emulator_0" xml="TIXDS100v2_Connection.xml" xmlpath="connections"/>
    <connection XML_version="1.2" id="Texas Instruments XDS100v2 USB Emulator_0">
    <instance XML_version="1.2" href="drivers/tixds100v2icepick_d.xml" id="drivers" xml="tixds100v2icepick_d.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2cs_dap.xml" id="drivers" xml="tixds100v2cs_dap.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2cortexM.xml" id="drivers" xml="tixds100v2cortexM.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2cortexA.xml" id="drivers" xml="tixds100v2cortexA.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2cs_child.xml" id="drivers" xml="tixds100v2cs_child.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2csstm.xml" id="drivers" xml="tixds100v2csstm.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2etbcs.xml" id="drivers" xml="tixds100v2etbcs.xml" xmlpath="drivers"/>
    <instance XML_version="1.2" href="drivers/tixds100v2pru.xml" id="drivers" xml="tixds100v2pru.xml" xmlpath="drivers"/>
    <platform XML_version="1.2" id="platform_0">
    <instance XML_version="1.2" desc="SK_AM3358_0" href="boards/sk_am3358.xml" id="SK_AM3358_0" xml="sk_am3358.xml" xmlpath="boards"/>
    <board XML_version="1.2" description="AM3358 StarterKit Board" id="SK_AM3358_0">
    <device HW_revision="1" XML_version="1.2" description="AM33x - Cortex A8 Embedded Processor" id="AM3358_0" partnum="AM3358" simulation="no">
    <router HW_revision="1.0" XML_version="1.2" description="ICEPick_D Router" id="IcePick_D_0" isa="ICEPICK_D">
    <subpath id="subpath_11">
    <router HW_revision="1.0" XML_version="1.2" description="CS_DAP Router" id="CS_DAP_M3" isa="CS_DAP">
    <subpath id="M3_wakeupSS_sp">
    <cpu HW_revision="1.0" XML_version="1.2" desc="M3_wakeupSS_0" description="Cortex_M3 CPU" deviceSim="false" id="M3_wakeupSS" isa="Cortex_M3"/>
    </subpath>
    </router>
    </subpath>
    <subpath id="subpath_12">
    <router HW_revision="1.0" XML_version="1.2" description="CS_DAP Router" id="CS_DAP_0" isa="CS_DAP">
    <subpath id="ModenaSS">
    <cpu HW_revision="1.0" XML_version="1.2" description="Cortex_A8 CPU" deviceSim="false" id="CortexA8" isa="Cortex_A8">
    <property Type="filepathfield" Value="..\..\..\..\AM335X_StarterWare_02_00_00_07\tools\gel\AM335x_SK_1.2.gel" id="GEL File"/>
    </cpu>
    </subpath>
    </router>
    </subpath>
    </router>
    </device>
    </board>
    </platform>
    </connection>
    </configuration>
    </configurations>

  • Hi,

    I get similar instabilities after successfully running the rtcClock code for the first time, and the difference is that I am using the GEL file provided with CCS and not from Starterware.

    Since the code runs fine again if I power cycle the board, this leads me to believe the code itself is the root cause.

    My reason comes from the fact that, when the code runs for the first time, the processor is coming straight from reset and most of its registers will have the default reset values (apart from the ones modified by the GEL hardware initialization routine). When running the code for the second time (without resetting or power cycling the board), several registers are already modified by the first run - in my case, this prevented the program to run without trouble (I usually got an inoperative terminal). Disconnecting and reconnecting to the Cortex A8 core also caused the GEL file problems as you reported - probably the initialization previously done by the rtcClock application conflicts with the one done by the GEL file (the "EMIF timing register configuration" function as shown in the error message).  

    However, performing a CPU reset (HW), disconnecting and reconnecting (so the GEL initialization runs again) seems to workaround this behavior.

    How to correct this? I am really not sure, as I am not an expert on the device or its peripherals. However, you can inspect the routines performed by the GEL and the application and see if there are any conflicts or incomplete initialization (which would prevent the code from running without needing to reset or disconnect the target). The experts at the AM335x device forum may have more knowledgeable suggestions with this regard.

    Hope this helps,

    Rafael

     

  • In my case the code never runs fine again after power cycling the board.

    The only way I can get it to work is to remove the ccxml file and recreate a new one, and then I get one-time debugging after restarting the board.

    It seems to me as if the GEL file provided by starterware has tight timing requirements that are beyond what my board can achieve.

    When I try to use the GEL file provided by CCS, I get an error due to a missing entry in that file.

    What I would like is to have someone at TI look into this and recommend a solution that works.

    Its really impossible to use the starter kit for any serious work if you cannot reliably debug.

  • Hi Clive,

    I suspect that the GEL files is not fully robust. I don't think it should always be reinitializing the target on every target connect. Hence why subsequent initializations fail for an initialized target. Hence why a power cycle or reset resolves the issue since the board would need to be reinitialized (both work for me)

    Clive Jarman said:
    In my case the code never runs fine again after power cycling the board.

    Please explain what this means. Do you mean you can connect and load the program but the code does not execute as expected? Or you still get the same init error?

    Thanks

    ki

  • The problem has been resolved.

    It tuns out that I was using a global ccxml file, and when you use one of these, it doesn't automatically load the program after connecting.

    This was not obvious to me from the documentation. A local ccxml file in the project does load the program after connecting.

    So after connecting, I had to manually load the program before I could debug it.

    Problem was really user error, but some clearer documentation on the differences between global and project ccxml files would be helpful!

    Thanks

  • Thanks for the update. Glad to hear you got it all worked out.

    Clive Jarman said:
    It tuns out that I was using a global ccxml file, and when you use one of these, it doesn't automatically load the program after connecting.

    Yes, if launching a debug session by directly using a ccxml file, it would not load the program since there is no project/program association with it.

    Clive Jarman said:
    Problem was really user error, but some clearer documentation on the differences between global and project ccxml files would be helpful!

    It is covered in the CCSv5 Getting Started Guide:

    http://processors.wiki.ti.com/index.php/GSG:Debugging_projects_v5#Launching_the_debugger

    And differences between a project and project-less debug session is covered in slides 11&12 of the Target Configurations training module:

    http://processors.wiki.ti.com/index.php/CCS_Modules_Library#Target_Configurations

    Thanks

    ki