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.

[MCSDK Video][C6678] Hang in RMAN_init()

Other Parts Discussed in Thread: TMS320C6678, TMDXEVMPCI

When I try to modify the sample from h264hpvenc_01_00_00_01 on Windows, I meet issues.
I can run the binary successfully on DSP through JTAG.
When I load it into DSP directly, it will hang in func RMAN_init().

Do I need to modify some settings when I load image into DSP directly ?
Or ?

Thank you.

JA


  • Hi Ja, how are you loading the image directly? could you please explain us used steps?. On the other hand, when you run .gel file scripts (e.g for Shannon EVM it would be Global_Default_Setup script) some hardware get initialized. could you please check if you initializing correctly your board (DDR, clocks, etc)? I am assuming you are using Shannon EVM (TMS320C6678) could you please confirm?

    Thank you,

    Paula

     

  • Hi Paula,
    I am using Shannon EVM (TMS320C6678).
    The EVM board provider provides a tool to initialize the hardware and load image, and I think that it works well.
    How do I check the my board initialized well ?

    p.s. It is OK to run a simple demo about interrupt between host and DSP by this initial/loading tool.

    Thank you.
    JA


  • Hi Ja, below a link which explains how to load a program to your EVM using JTAG. In the same link it is explained from where you can get the .gel file and which script you have to run in order to correctly init your EVM

    http://processors.wiki.ti.com/index.php/BIOS_MCSDK_2.0_Getting_Started_Guide#Use_JTAG_to_Load_the_Application

    P.S: Please also check your EVM dip swithc is set correctly (no boot) below link with Dip Swithc settings: http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings

    Thank you,

    Paula

  • Hi Paula,
    It works well through JTAG on Windows, but it hangs in RMAN_init() without JTAG.
    Is it related to wrong initialization or EVM dip swithc or other reasons ?

    ps. If I run the same image without JTAG on Linux, it does not hang in RMAN_init().
    ps2. The board I use is Advantech's DSPC8681 ( http://www.advantech.com/products/DSPC-8681/mod_A9314996-0022-4927-9AA4-6B1060D4E5E8.aspx ).

    Thank you.

    JA 

  • Hi Ja, how do you run the same image on the EVM without JTAG, are you using a PCI adapter and plug it in your PC? which image are you trying to run, is it any from our MCSDK video demo? how are you configuring the EVM dip switch?

    thanks,

    Paula

  • Hi Paula,
    1. The EVB is a PCIe card, and I plug it into my PC.
    2. The image I try to run is built from h264hpvenc_01_00_00_01. 
    3. The Boot mode is I2C boot mode.

    Thanks

    JA

  • Hi Ja, please follow instructions on how to setup EVM +PCI Hardware at http://processors.wiki.ti.com/index.php/Desktop_Linux_SDK_Hardware_setup_guide section "Single C6678 EVM - TMDSEVM6678 with TMDXEVMPCI". 

    thank you,

    Paula


  • Dear Paula,
    The card I use is "QUAD C6678 BRD – ADVANTECH (LIGHTNING DSPC-8681E)" .
    I had followed the instructions to set up the Boot mode as "110 - I2C boot mode" and Endian as "0 - Little Endian".

    Thank you.

    JA

  • Dear Paula,
    1. Advantech has confirmed that the setting of board is correct.
    2. How do I get more information or memory dump to analyze this issue ?
    3. In my guess, there is a gap between running through JTAG and running on DSP. Is there any document about this ?

    Thank you.

    JA

  • Hi Ja, my bad, I misunderstood you, I though you have a TMS320C6678 EVM (http://www.advantech.com/Support/TI-EVM/6678le_of.aspx). Anyhow, if you have a quad-Shannon you can use our MSDK video

    MCSDK video download page: http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/latest/index_FDS.html 

    You can run H.264 HP encoder through TFTP (http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.1_CODEC_TEST_FW_User_Guide) -> It uses CCS but input/output files are send/receive over Ethernet (TFTP) instead of fread/fwrite over JTAG, so it is much faster.

    Or you can run H.264 HP encoder through PCI, you will need a Linux machine with ubuntu (please see below instructions links)

    Linux getting started: http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.1_Linux_Getting_Started_Guide  

    PCI demos instructions: http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.1_PCIE_Demo_Guide

    All required links for downloading components can be found here http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/latest/index_FDS.html (Bios MCSDK, SDK, etc)

    If you want to run the H.264 encoder using PCI I/O I highly recommend you first try our SDK demos (http://processors.wiki.ti.com/index.php/Desktop-linux-sdk_01.00.00_Getting_Started_Guide). Running these demos first will ensure us that PCI+Host connectivity is ok. SDK demos are loop packets send from/to host/board.

    By the way, FYI, all initialization scripts are not only in the SDK package (./init_dspc8681_1250.sh) but also in the MCSDK video PCI demos (./init_dsp.sh 1250), so the demos will guide you how to initialize and download the program (.out) to your board.

    Thank you,

    Paula

  • Hi Paula,

    The environment I work is Windows, therefore I can not take the Linux one to test...

    The modification I do in h264hpvenc_01_00_00_01 is just to remove all the file related, including file open/read/write, 
    and to add hardware interrupt to notice host about the encoding finish.
    Is there anything else in h264hpvenc_01_00_00_01 could done only through JTAG and could not done with JTAG ?
    (YES, it works well through JTAG, but it does not work with JTAG.) 

    Is it helpful to solve the issue if I attach the whole project ?

    Thank you.

    JA

  • Hi Ja,  Could you please helps us to clarify your use case scenario? how would be your Input/Output through PCI? or TFTP?

    I think Advanteck has a PCIe driver which came with a hello world example. Have you tried it?. If so and it is working you might need try to port our Desktop Linux SDK to your windows machine. Desktop linux SDK is all user-space components and it should work pretty much as-is on Windows, however, you will need to take care of CMEM (contiguous memory allocation) and libpciaccess. These two things run in kernel mode.  

    On the other hand, some information from another E2E thread might be helpful (http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/243331.aspx?pi74271=1). This particular user wants to run JPEG2K with windows using a quad-shannon and replacing fread/writes with PCIe read/writes in the codec unitest.

    Thank you,

    Paula

  • Hi Paula,

    My input/output is through PCIe.

    My scenario is as follows: 
    1. h.264 encoder initials, runs in DSP and waits for interrupt from the host
    2. the host will write YUV to memory and interrupt to DSP
    3. after DSP receives the interrupt, it reads the YUV from memory and encode.
    4. after the output is generated, DSP will write the bit stream to memory, then interrupt the host
    5. after the host receives the interrupt, it reads the bit stream from memory, then go to step 2

    The scenario works when h.264 encoder runs on DSP with JTAG,
    however it will hang in RMAN_init() when it runs without JTAG.
    Do you have any suggestion about this ?

    The hello world Adventech gives works well.

    When I try to port Desktop Linux SDK, I meet a lot of issues because of heavy dependencies on Linux.
    It is not an easy way. 

    Thank you.

    JA

  • Hi Ja, thanks a lot for the explanation of your use case. I have a couple of questions,

    - When you mention "runs on DSP with JATG" this implies the JTAG is connected to your board but no used for reading/writting. It is my understanding correct?

    - If previous statement is not true, what you read/write through JTAG? codec params? do you connect the cores using CCS? If so which procedure do you use?

    - If previous statement is true, do you have CCS opened? If so, are you connecting the cores and running anything in CCS?  If so please explain us.

    -  In our Linux SDK we have some tools and scripts in order to init the DSPs. Have you had a chance to take a look of them? I think this could be the missing step in your windows environment.

    - If you share your project and the steps of how to run it I can try to rtake a look or the code flow. Please also include steps that you use and from where could I get the PCI windows drivers.

    Thank you,

    Paula 

  • Hi Paula ,

    - When you mention "runs on DSP with JTAG" this implies the JTAG is connected to your board but no used for reading/writing. It is my understanding correct?
    -- Yes.

    - If previous statement is true, do you have CCS opened? If so, are you connecting the cores and running anything in CCS?  If so please explain us.
    -- Yes, I launch JTAG configuration on CCS, and connect the core to run image on DSP.

    -  In our Linux SDK we have some tools and scripts in order to init the DSPs. Have you had a chance to take a look of them? I think this could be the missing step in your windows environment.
    -- Without JTAG, I have to run hello world Advantech gives successfully, therefore I think that there is no missing step. 

    B.R.

    JA


  • Hi JA,

    Could you please give us more information about the RMAN_init failure, What is the error return code? could you please share with us console log?. 

    Also could you please elaborate which issues did you face when you were porting Linux desktop SDK to Windows?.

    Thank you,

    Paula

  • Dear Paula,

    For h264hpvenc_01_00_00_01, I modify a little code, and it does not hang(stop) in RMAN_init(), but it hangs(stops) in other place:
    in "pL2MemForEachCore[i] = internalDataMemory;" in line 88, alg_malloc.c when calling initMemPointers() in h264hpvenc_ti_testapp.c .

    For porting Linux desktop SDK to Windows, I can compile it successfully by Cygwin,
    however there are some issues: 
    1. How to access device on PCI ?
    -- it fails in pci_id_match_iterator_create() in find_devices() in pciedrv
    2. How to access DMA ?
    -- I can not access "/dev/cmem" on Windows

    Thank you,

    JA