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.

Desktop Linux SDK demo Hangs

I am trying to test the Desktop Linux SDK (1.0.0.7) 

I installed it, I built it successfully, I installed the drivers successfully, I have configured my EVM6678L as recommended in the hardware setup guide, 

I can see the board with lspci. After I ran the install_grub to reserve the memory, I have restarted my machine , 

Now the device driver (cmem) is installed and running and I can run the initialization scripts ( init_evm6678_1000.sh, dnld_demo_loopback.sh) successfully, 

I created a test.file (into the directory "testfiles" as recommended)

When I run any test scripts (ex:run_dmatest.sh 1 0x400000), I can see that the driver is open successfully, memory is allocated and it creates all the Mailboxes (8) but just it hangs when opening the first Mailbox (So close to make it work)

Need Help to understand and troubleshoot this problem.

 

  • Hello Claude,

    Few questions that can help us narrow down the problem.

    a) Do you have JTAG connected to the board?

    b) Can you send me the log from the following command?

    lspci -v  > lspci.txt

    c) Also can you send us the console log?

    with regards,

    Sam

  • I don't have a JTAG connected but It can be done if needed.

    Here is the partial result of "lspci -v" that includes the Texas instrument part: 

    03:00.0 Multimedia controller: Texas Instruments Device b005 (rev 01)
    Flags: bus master, fast devsel, latency 0, IRQ 11
    Memory at fe400000 (32-bit, non-prefetchable) [size=1M]
    Memory at d1400000 (32-bit, prefetchable) [size=512K]
    Memory at d1000000 (32-bit, prefetchable) [size=4M]
    Memory at d0000000 (32-bit, prefetchable) [size=16M]
    Memory at d1490000 (32-bit, prefetchable) [size=4K]
    Memory at d1480000 (32-bit, prefetchable) [size=64K]
    Capabilities: [40] Power Management version 3
    Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting

    ----------------------

    Finally here is the console log of all commands than were executed (init, dnld, test)

    eng@ccr-iptdb-dev:~/ti/desktop-linux-sdk_01_00_00_07/demos/scripts$ ./init_evmc6678l_1000.sh

    boot config file ./demos/scripts/initcfg.txt
    DSP boot config addr 0x86ff00
    DSP boot config size in bytes 8
    Boot config words: 0xbabeface,
    Boot config words: 0x14,
    Overriding image entry point with input 860000 Download image success !
    -------------------------
    eng@ccr-iptdb-dev:~/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/scripts$./dnld_demo_loopback.sh 1

    boot config file ./bootcfg/bootcfg_0.txt
    DSP boot config addr 0x800000
    DSP boot config size in bytes 16
    Boot config words: 0xbabeface,
    Boot config words: 0x0,
    Boot config words: 0x12345678,
    Boot config words: 0x90abcdef, Download image success !
    --------------------------
    eng@ccr-iptdb-dev:~/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/scripts$ sudo ./run_dmatest.sh 1 0x400000
    dspBits = FFFFFFFF
    dspBits = FFFFFFFF
    Driver opened!

    Contiguous memory allocation complete : Num Buffers 64
    Creating Mailbox (80000000 --> 0)
    Created Mailbox Tx id: 0x 0 Handle 0x93045c0
    Creating Mailbox (0 --> 80000000)
    Created Mailbox Rx id: 0x 0, Handle 0x92ff390
    Creating Mailbox (80000000 --> 1)
    Created Mailbox Tx id: 0x 1 Handle 0x92ff3c0
    Creating Mailbox (1 --> 80000000)
    Created Mailbox Rx id: 0x 1, Handle 0x92ff3f0
    Creating Mailbox (80000000 --> 2)
    Created Mailbox Tx id: 0x 2 Handle 0x92ff420
    Creating Mailbox (2 --> 80000000)
    Created Mailbox Rx id: 0x 2, Handle 0x92ff450
    Creating Mailbox (80000000 --> 3)
    Created Mailbox Tx id: 0x 3 Handle 0x92ff480
    Creating Mailbox (3 --> 80000000)
    Created Mailbox Rx id: 0x 3, Handle 0x92ff4b0
    Creating Mailbox (80000000 --> 4)
    Created Mailbox Tx id: 0x 4 Handle 0x92ff4e0
    Creating Mailbox (4 --> 80000000)
    Created Mailbox Rx id: 0x 4, Handle 0x92ff510
    Creating Mailbox (80000000 --> 5)
    Created Mailbox Tx id: 0x 5 Handle 0x92ff540
    Creating Mailbox (5 --> 80000000)
    Created Mailbox Rx id: 0x 5, Handle 0x92ff9a8
    Creating Mailbox (80000000 --> 6)
    Created Mailbox Tx id: 0x 6 Handle 0x92ff9d8
    Creating Mailbox (6 --> 80000000)
    Created Mailbox Rx id: 0x 6, Handle 0x92ffa08
    Creating Mailbox (80000000 --> 7)
    Created Mailbox Tx id: 0x 7 Handle 0x92ffa38
    Creating Mailbox (7 --> 80000000)
    Created Mailbox Rx id: 0x 7, Handle 0x92ffa68
    nodeBits 1 decision1
    Opening Mailbox(80000000 --> 0)

    ** This is where it hangs

    I hope this helps

  • Thanks for the information.

    One problem I see is that the some  BAR window sizes are less than <  1 MB.

    There was a bug in desktop linux sdk in handling < 1 MB bar windows.

    Memory at d1400000 (32-bit, prefetchable) [size=512K]
    Memory at d1490000 (32-bit, prefetchable) [size=4K]

    Here  is a fix for that issue.

    Can you replace the following file at  desktop-linux-sdk_01_00_00_07/sdk/pciedrv/src/pciedrv.c and recompile?0172.pciedrv.c

    Please let me know if this helps.

    With regards,

    sam

  • It fixed it. Thank you very much.

    Now, Some tricky questions !

    Do you think that it would be hard (or even possible) to modify the Desktop SDK to make it work with the 6657 EVM ? 

    If it is possible then could you tell me what part of it would need to be modified ? (DSP Code, driver, PCI MAp, ... ???)

    The reason is that I am trying to setup an development environment to will be as close as possible to our final board which is a CPU + DSP(6657) connected through PCIe.

    Also, Do you foresee any problem building the SDK for an ARM CPU ?

    Regards, 

    Claude

  • I think it should be easy to port to 6657.

    The main changes will be in c6678 register changes if any, mainly in pciedrv and dnldmgr.

    Look for files specifically named with 6678.

    Regarding the ARM CPU, as long as the standard linux packages are supported, should port easily.  I would assume the CMEM module may need some tuning depending on the architecture.

    with regards,

    Sam

  • Hi,

    Continuing my work on setting up the 6657-EVM to work with Desktop-Linux-SDK, I have the following problem.

    ** I cannot get my 6657 listed with "lspci".

    Is there something I must do special to get it  ?

    My dip switches are as follow: 

    Sw9 (1,2)  :  (OFF,ON)

    Sw5 (1,2,3,4,5,6,7,8)  :  (ON,ON,ON,OFF,ON,ON,ON,ON)

    Sw3 (1,2,3,4,5,6,7,8)  :  (OFF,ON,ON,OFF,ON,ON,ON,ON)

    Thank you

    Claude

  • Can someone please help?

  • Hello Claude,

    Given that the original problem in the thread is resolved, can you please close /verify resolution of this thread and open a new one for the 6657 pcie issue?

    Also your question on  pcie enumeration  with 6657 is a generic question and more experts in TI may be able to help you with that, if posed as a generic question.

    with regards,

    sam