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.

Debugging C6678<-->PC communication using Lightning DSPC-8681E card

Other Parts Discussed in Thread: TMS320C6678

Hi,

We are starting to get the hang of the desktop SDK and have already ported a custom version of it on Windows 7. We succeeded in porting all the main OS-specific features and developed a kernel driver to communicate with the card. 

Right now, everything on the host side seems to be working, but we seem to be having problems communicating with the DSPs. More specifically, when trying to run the “filetestdemo” from the Desktop SDK, we succeed in creating the mailboxes on the host, but the code hangs indefinitely trying to open DSP-side mailboxes.

  • Can you suggest a way to confirm that the DSP firmware has been properly downloaded to the DSPs and that it is indeed running? (Led flashing pattern, output trace, etc?)
  • What is the best way to access the output traces that the DSP firmware is producing? Do we need a special cable or kit (JTAG, COM port, etc) that we would connect to the card?
  • Is there special software to use on both the DSP and host sides to monitor/receive those traces?
  • Is there a way to confirm that the boot ROM has been fully and properly loaded in the DSP upon power up of the system?

It is possible that TI already provides the answers to some of those questions, but at the moment, to the best of our knowledge, we did not find it.

Thank you very much for your help

  • Hi Francois, in order to debug the DSP side you can connect a JTAG to your quad-shannon. In my case, I use USB560-M or a XDS560v2 with pins adapters. Please note that board's JTAG connection is symmetrical and you can connect the adapter in 0or 1800 but only one is correct. Also for connecting JTAG to CCS the board need to be plugged in the PC PCI slot.  We don't have a target created in CCS for Quad-Shannon, however, you can easily create one adding four times the device TMS320C6678. In CCS you can create your target in View -> Target configuration -> Advanced tab -> Add -> search for TMS320C6678, repeat the process three more times, then save it and finally launch the debugger.

    After launching debugger you can connect the core(s) that you want to test and then using "Load Symbols" load the program that you want to test. You will visualize assembled code but anycase, it could help you to see in which portion of your code the DSP is hanging and also you can check different memory adresses. 

    In our linux SDK we can reset and init the DSP running scripts. Please reset and init DSPs previously of loading and running your program

    SDK reset and init:

    <install_dir>/desktop-linux-sdk_<version>/demos/scripts/

    ./dspreset.sh

    ./init_dspc8681_1000.sh 4

    Thank you,

    Paula

  • Hi Francois, one detail that might be worthy to clarify, the program can be loaded from the host through PCIE, and the symbols can be loaded through JTAG to debug.

    Thank you,

    Paula

  • Does anyone have answer for this problem? In my case, I am able to have filetestdemo working correctly. However, when I am changing the forever loop at the end of demo_loopback.c with my own processing, the host code is stuck on the mailBox_open() of the second core. Just for a test I kept all code the same except commenting out all lines inside the forever loop and I got the same result. Debugging the code, looks like the DSP code does not write the owner_code correctly, so host never get passed mailBox_open():

    D->H: dspaddr = 8FC00000 owner_code = BABEFACE
    H->D: dspaddr = 8FC04000 owner_code = BABEFACE
    D->H: dspaddr = 8FC00800 owner_code = BABEFACE
    H->D: dspaddr = 8FC04800 owner_code = 0
    D->H: dspaddr = 8FC01000 owner_code = BABEFACE
    H->D: dspaddr = 8FC05000 owner_code = 0
    D->H: dspaddr = 8FC01800 owner_code = BABEFACE
    H->D: dspaddr = 8FC05800 owner_code = 0
    D->H: dspaddr = 8FC02000 owner_code = BABEFACE
    H->D: dspaddr = 8FC06000 owner_code = 0
    D->H: dspaddr = 8FC02800 owner_code = BABEFACE
    H->D: dspaddr = 8FC06800 owner_code = 0
    D->H: dspaddr = 8FC03000 owner_code = BABEFACE
    H->D: dspaddr = 8FC07000 owner_code = 0
    D->H: dspaddr = 8FC03800 owner_code = BABEFACE
    H->D: dspaddr = 8FC07800 owner_code = BABEFACE
    D->H: dspaddr = 8FC00000 owner_code = BABEFACE
    H->D: dspaddr = 8FC04000 owner_code = BABEFACE
    D->H: dspaddr = 8FC00800 owner_code = BABEFACE
    H->D: dspaddr = 8FC04800 owner_code = 0
    D->H: dspaddr = 8FC01000 owner_code = BABEFACE
    H->D: dspaddr = 8FC05000 owner_code = 0
    D->H: dspaddr = 8FC01800 owner_code = BABEFACE
    H->D: dspaddr = 8FC05800 owner_code = 0
    D->H: dspaddr = 8FC02000 owner_code = BABEFACE
    H->D: dspaddr = 8FC06000 owner_code = 0
    D->H: dspaddr = 8FC02800 owner_code = BABEFACE
    H->D: dspaddr = 8FC06800 owner_code = 0
    D->H: dspaddr = 8FC03000 owner_code = BABEFACE
    H->D: dspaddr = 8FC07000 owner_code = 0
    D->H: dspaddr = 8FC03800 owner_code = BABEFACE
    H->D: dspaddr = 8FC07800 owner_code = BABEFACE
    D->H: dspaddr = 8FC00000 owner_code = BABEFACE
    H->D: dspaddr = 8FC04000 owner_code = BABEFACE
    D->H: dspaddr = 8FC00800 owner_code = BABEFACE
    H->D: dspaddr = 8FC04800 owner_code = 0
    D->H: dspaddr = 8FC01000 owner_code = BABEFACE
    H->D: dspaddr = 8FC05000 owner_code = 0
    D->H: dspaddr = 8FC01800 owner_code = BABEFACE
    H->D: dspaddr = 8FC05800 owner_code = 0
    D->H: dspaddr = 8FC02000 owner_code = BABEFACE
    H->D: dspaddr = 8FC06000 owner_code = 0
    D->H: dspaddr = 8FC02800 owner_code = BABEFACE
    H->D: dspaddr = 8FC06800 owner_code = 0
    D->H: dspaddr = 8FC03000 owner_code = BABEFACE
    H->D: dspaddr = 8FC07000 owner_code = 0
    D->H: dspaddr = 8FC03800 owner_code = BABEFACE
    H->D: dspaddr = 8FC07800 owner_code = BABEFACE
    D->H: dspaddr = 8FC00000 owner_code = BABEFACE
    H->D: dspaddr = 8FC04000 owner_code = BABEFACE
    D->H: dspaddr = 8FC00800 owner_code = BABEFACE
    H->D: dspaddr = 8FC04800 owner_code = 0
    D->H: dspaddr = 8FC01000 owner_code = BABEFACE
    H->D: dspaddr = 8FC05000 owner_code = 0
    D->H: dspaddr = 8FC01800 owner_code = BABEFACE
    H->D: dspaddr = 8FC05800 owner_code = 0
    D->H: dspaddr = 8FC02000 owner_code = BABEFACE
    H->D: dspaddr = 8FC06000 owner_code = 0
    D->H: dspaddr = 8FC02800 owner_code = BABEFACE
    H->D: dspaddr = 8FC06800 owner_code = 0
    D->H: dspaddr = 8FC03000 owner_code = BABEFACE
    H->D: dspaddr = 8FC07000 owner_code = 0
    D->H: dspaddr = 8FC03800 owner_code = BABEFACE
    H->D: dspaddr = 8FC07800 owner_code = BABEFACE

  • Hi Leim please open a new e2e thread with your SDK version information, also are you using linux or you are trying to port filetest to Windows?

    thank you,

    Paula

  • Thanks Paula. I posted the question in a new thread. I am running on Linux.

  • Paula Carrillo said:

    Hi Francois, one detail that might be worthy to clarify, the program can be loaded from the host through PCIE, and the symbols can be loaded through JTAG to debug.

    Thank you,

    Paula

    Paula,

    You mention loading the program via PCIe and symbols via JTAG.  I am trying to set-up my 8681 board, but I am slightly confused (ignorant?) about your post.

    To get things started, I simply want to run a hello-world program on one of the 6678 cores on the Advantech 8681 Lightning.  I have already created the unique Target Configuration file for the 8681.

    Can you please help me understand how I would go about following your advice in this e2e thread for a simple program to test my overall set-up?  I appreciate your help!

  • Hi Chris, for a simple hello-word program you can load your program (.out) directly to a 6678 core using CCS+ a JTAG connected to your board. Your 8681 board has to be pluged/powered in a PCI slot in your host. My previous comments were for debugging our desktop SDK which was being ported from Linux to Windows.

    Thank you,

    Paula