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.

CCS/AM3359: Debug issues on ICEv2 board

Part Number: AM3359
Other Parts Discussed in Thread: CCSTUDIO, , TMDSICE3359

Tool/software: Code Composer Studio

I have installed CCS9.0.1 on Ubuntu 18.0.4. 

I launch CCS from command line using ~/ti/ccs901/ccs/eclipse/ccstudio and it launches without error. 

I use TMDSICE_V2 as hardware (AM3359 with industrial communication engine). The NOR Flash on the board has been successfully deleted before using a connection to CCS on a different Windows 10 based computer.

I create the suitable configuration file for TMDS_ICE_V2 from the drop down menu in CCS and launch the configuration successfully. When it comes to connecting to the ARM processor in debug mode, I get the following error message:

Error connecting to the target:
(Error -151 @ 0x0)
One of the FTDI driver functions used during the connect
returned bad status or an error. The cause may be one or
more of: no XDS100 is plugged in, invalid XDS100 serial number,
blank XDS100 EEPROM, missing FTDI drivers, faulty USB cable.
Use the xds100serial command-line utility in the 'common/uscif'
folder to verify the XDS100 can be located.
(Emulation package 8.1.0.00007)

I have used the utility from xds100serial.exe in 'common/uscif'  to test for XDS100 and I get the following exact message:

No XDS100 emulators were found on the system.

I know that the USB Cable and TMDSICE_V2 hardware is working because I was able to use the protocol to delete the NOR flash on the board using the Windows based computer as indicated above.

My USB mouse and keyboards are working on the Linux machine. I see a debugger utility in 'common/uscif directory, but I don't have any documentation about how to use it to make sure that JTAG hardware is working between the Linux and TMDSICE_V2 hardware. Finally, if that is working, then I need to resolve the problem of adding XDS100 emulator capability to CCS on Linux.

I have seen another case on E2E but usage of the JTAG debug tool, namely common/uscif/dbgjtag.exe is for a Windows based system. The commands are not going to be the same, I assume.

Thanks

 

  • Hello,

    I assume you are using the onboard XDS100v2 of the EVM.

    Farrokh Eshragi Azar said:
    he NOR Flash on the board has been successfully deleted before using a connection to CCS on a different Windows 10 based computer.

    Just to confirm, sounds like there are no connectivity issues with the same EVM on Windows 10?

    Farrokh Eshragi Azar said:
    No XDS100 emulators were found on the system.

    If you installed with user permissions, did you run the 'install_drivers.sh' script after installation?

    Thanks

    ki

  • No connectivity issues when connecting with CCS running on Windows is correct..
    I have not run the script ‘install_drivers.sh”. Doesn’t the installation of the CCS package take care of the required USB driver automatically? Does XDS100V2 need a different driver?

    In any case, I will run the script and report back.

    Thanks
  • Farrokh Eshragi Azar said:
    I have not run the script ‘install_drivers.sh”. Doesn’t the installation of the CCS package take care of the required USB driver automatically?

    Unless the CCS installer was run as sudo, the script cannot be run successfully by the installer. You must run the script as sudo

  • Hi Ki,
    I now have the micro sd card loading Linux to the TMDSICE and working, it seems properly. I have a prompt on the LCD display saying "am335x-evm login:" . I also have 2 red LEDs at the corner of TMDSICE flashing. I think I can assume Linux is correctly loaded to the TMDSICE. THe board is connected to the Ubuntu host computer with USB connected to the emulation port.

    I have also run the JTAG test from the "test connection" on CCS user interface. It too passed the tests. I then tried to connect to the board in debug mode and got the same message as before. Therefore no improvement.

    When I run the xdsserial utility, i get

    "
    Scanning for XDS100 emulators...

    VID/PID Type Serial # Description
    0403/6010 generic XDS100 FT2E4KIM ICE-EVM_V2\XDS100V2
    "
    which shows that the driver_install has also installed the DS100V2 ! This is new and different from before.

    But still when I try to connect, I get the same error as before. Here is more details in case I am doing something wrong:

    1) I set up the configuration with ICE_AM3359 from the menu of CCS and save it.
    2) I launch this configuration
    3) I click on XDSV2 USB Debug Probe_o/CortexA8(Disconnected:Unknown)
    4) I right click while (3) is highlighted
    5) I pick the first on the drop down menu saying "Connect Target"

    The error message comes up.

    Thanks for following up.
  • Farrokh Eshragi Azar said:
    I have also run the JTAG test from the "test connection" on CCS user interface. It too passed the tests.

    This is good news. It means that low-level connection between CCS and your device via XDS100v2 is working.

    Farrokh Eshragi Azar said:
    then tried to connect to the board in debug mode and got the same message as before. Therefore no improvement.

    It sounds like you are trying to connect to a target with Linux running on the device. There are extra considerations when trying to debug such a target. The first thing is that you want to do a manual launch that using a target configuration that does NOT use any startup GEL file. Then you can try manually connecting to the target. Is that the case already?

  • Hi Ki,
    You are correct. I already have Linux running on TMDSICE335x.

    I have only been following the User Interface in CCS. It seems there is more than following the user interface only to getting the debugger to work. I had a very brief browsing of the links your forwarded. I will read up on manual launch, target configuration, and launching with out the GEL file, and I will get back to you to see if I can fix the problem. Basically, an additional info is that when I launch the debugger from the GUI for the PRU units, it seems I can get into this environment ( I get a memory dump with nothing in it because there are no programs in the PRUs, all zeros), but at the same time, I get this message in the CCS Console:

    "CortxA8: Error connecting to the target: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00007)".

    In any case, let me read some more over the weekend and I will get back to you.
    Thanks
  • I'd also recommend taking a look at the below presentation:

    http://software-dl.ti.com/ccs/esd/training/modules/linux_debug/CCSv5-LinuxDebug.pptx

    It is old but still relevant. See "lab 2", starting at slide 66. Slide 72 is also very important.

    Thanks

    ki

  • Hi Ki,

    I went through the material. The process to set up the debugger is quite complex. I could establish debug connection to the ARM processor without Linux installed on the target. It worked just find. I want to break this down to smaller pieces. First, I would like to run and application on the Linux before going into full blown debug of the kernel or dynamic debugging. I built the "Hello World" application and cross-compiled it successfully. Now, I want to run this on the target ARM processor. 

    A quick recap: I have Linux running on TMDSICE335x_V2 on the target and the target boots from SD card and has the host name am-335x-evm.

    I want to use minicom to set up a terminal to the target so I can set up various things like tftp and nfs on the target side, however, even though the FTDI chip on the TMDSICE... supports USB to serial conversion, running minicom application causes Linux on TMDSICE... to reboot. Is there some application note specifically related to TMDSICE and setting up the terminal for it that can help me to set up the terminal? 

    The material in http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_03_00_07/linux/index.html , Processor SDK Linux Software Developer's Guide doesn't cover this part and specifically, it doesn't address TMDSICE...

    Thanks 

  • Ki,

    After I wrote to you, I checked some more and it appears that the FTDI chip supports the serial port, but the TMDSICE3359 board doesn't. I guessed this by looking at the hardware lay out of the board and noticed that an EEPROM required to allow conversion from USB to serial port was missing. Can you please confirm this for me so I can drop this and move on.
  • Farrokh,
    This thread is going beyond my area of expertise. I will move this thread to the Sitara forum. The experts there can help youbest.

    Thanks
    ki
  • Hi Farrokh,

    A major difference between the ICEv2 and other AM335x EVMs is the debug UART. In AM335x Linux the default debug console is UART0. On ICEv2, which targets mostly industrial applications under TI-RTOS, the serial port connected to the FTDI and used for debug is UART3. You probably need to change the debug console to UART3 in Linux.
  • Thanks Gatchev.

    Can I still use the physical USB connection between the host Linux PC and TMDsICE3359 or should I make a separate connection to one of the extender connectors on TMDSICE? It appears the USB connection cannot be used for console . Can you provide more detail on the next steps?
    Thanks
  • Yes you can. The ICEv2 on-board FTDI chip creates both JTAG and serial interfaces on your PC.
  • Hi Biser,
    Thanks for your reply. I can now boot TMDSICEv2 using minicom and USB1 port. I can get into the root directory and see the mounting of the file structure on ICEv2 and am335x-evm. Can I boot over the network using TFTP and NFS? I have run the setup.sh from SDK, given the host IP address and a few other things required during the process. It has all run well, but unless, I connect the serial connection through USB1 and use minicom, the target does not load the evm. Any suggestions?
  • Sorry, what I wrote was not correct. I should add that I must also put in the SD card for the ICEv2 to boot. I want to boot without the SD card. So, I have taken it out and it does not boot any more.
  • There are 4 .dtb (device tree blobs) in the /tftpboot directry of my linux host system that were copied there by the setup.sh script, that seem to be related to icev2. here is a list:
    - am335x-icev2.dtb
    - am335x-icev2-prueth.dtb
    - am335x-icev2-prueth-pps.dtb
    - am335x-icev2-pru-excl-uio.dtb

    I have to find out exactly what the device tree files do, but it appears they map the file structure of the host to the evm. If so, then in using tftp, I will have to point to one of these files. Which one is the basic one that I can point to? Is it correct to assume that I should point to -am335icev2-dtb if I am not interested in the pru modules for now?
  • This is deviating much too far from the original thread subject. Please start a new thread.
  • Hi Biser,

    I agree. There is no problem in closing this thread. I will start a new one. You may also close this.