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.

about tci6638 remoteproc driver

Dear FAQ, Hello:

I use ipc_3_36_02_13 to test the Linux remoteproc drvers on TCI6638 board.

I run command live that:

#./run_lad.sh 0
+ lad_tci6638 -l log.txt -b 0

Opened log file: log.txt

Set LAD's base cluster id to 0

numProcessors = 9 id = 0 baseId = 0

Spawned daemon: lad_tci6638
# ./run_dsp.sh
+ prog=compute_dspN_patched.xe66
+ mpmcl load dsp0 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp1 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp2 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp3 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp4 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp5 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp6 compute_dspN_patched.xe66
load succeeded
+ mpmcl load dsp7 compute_dspN_patched.xe66
load succeeded
+ mpmcl run dsp0
run succeeded
+ mpmcl run dsp1
run succeeded
+ mpmcl run dsp2
run succeeded
+ mpmcl run dsp3
run succeeded
+ mpmcl run dsp4
run succeeded
+ mpmcl run dsp5
run succeeded
+ mpmcl run dsp6
run succeeded
+ mpmcl run dsp7
run succeeded
#./app_host
ResMgr_threadFxn: -->
ResMgr_setup: -->
App_threadFxn: -->
App_setup: -->
App_setup: initalizing IPC
App_setup: IPC ready, status=0
ResMgr_setup: initalizing IPC
ResMgr_setup: IPC ready, status=1
App_setup: cluster baseId=0, cluster members:
App_setup: 0 HOST
App_setup: 1 CORE0
App_setup: 2 CORE1
App_setup: 3 CORE2
App_setup: 4 CORE3
App_setup: 5 CORE4
App_setup: 6 CORE5
App_setup: 7 CORE6
App_setup: 8 CORE7
App_setup: MessageQ_open(PEB_Proc1)
Error: message queue create failed
ResMgr_setup: <-- status=-2
ResMgr_destroy: -->
Segmentation fault

And I found that: the DSP fireware didn't run on DSP core(the DSP fireware will light My LED, and it run's well in CCS).

when the remoteproc driver is be insmod,it printk's:

c-user 2620044.dsp1: registered misc device dsp1
remoteproc2: 2620048.dsp2 is available
remoteproc2: Note: remoteproc is still under development and considered experim ental.
remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.

I want to know the TCI6638's Linux remoteproc driver can be use?

thank you very much!

  • Hi user4603712,

    Try running the lad daemon like this.

    #./lad_tci6638 -r 8 -n 9 -b 0 -l log.txt

    I would recommend you to do the same on the latest IPC version : 3_42_00_02

    The below is the procedure which I followed to run the ex44_compute example with the latest version of IPC. Please follow it and revert on how it goes for you.

    1. IPC_build:

    ===========

    1. ipc build path directory

    /opt/ti/ipc_3_42_00_02

    2. Install directory for IPC libraries :

    /opt/ti/ipc_3_42_00_02/IPC_install

    Modify the products.mak file accordingly or refer the products.mak enclosed in this directory.

    3. cd /opt/ti/ipc_3_35_01_07_shankari_BaseID0

    4. make distclean

    5. make -f ipc-linux.mak config

    6. make

    7. make install --- > This will install the IPC libraries in the folder given in the products.mak ( For example, IPC_install)

    2. ex44_compute build:

    =======================

    #cd /opt/ti/ipc_3_42_00_02

    ( Go to the examples of ex44_compute )

    #cd ex44_compute

    Modify ex44_compute/products.mak

       TOOLCHAIN_INSTALL_DIR = <...>/_your_linux_gcc_toolchain_install_

       BIOS_INSTALL_DIR = <...>/bios_m_mm_pp_bb

       IPC_INSTALL_DIR = <...>/ipc_m_mm_pp_bb

       XDC_INSTALL_DIR = <...>/xdctools_m_mm_pp_bb

       ti.targets.elf.C66 = <...>/c6000_m_m_p

       Your DESTDIR must point to your IPC "install" location. In other words,

       the location you specified when you ran 'make install' within the IPC

       product.

       DESTDIR = <...>

    #make clean

    #make

    Copy the HOST executable, the DSP executable, and the supporting

       scripts to your target file system.

       ex44_compute/host/bin/debug/app_host

       ex44_compute/dsp/bin/debug/compute_dspN.xe66

       ex44_compute/scripts/patchExec.pl

       ex44_compute/scripts/run_dsp.sh

       ex44_compute/scripts/run_host.sh

       ex44_compute/scripts/run_lad.sh

       ex44_compute/scripts/run_patch.sh

       ex44_compute/scripts/stop_dsp.sh

    3. LAD build according to the device ID:

    =========================================

    Configure and build LAD. In order to specify the cluster baseId

       on the command line, you must build LAD using the following

       configuration. This examples builds for the TCI6638 device. Use

       the appropriate config file for your device.

       cd <IPC Install>/linux/src/daemon/cfg

       edit MultiProcCfg_tci6638.c

       Add the following header file:

           #include <ti/ipc/MultiProc.h>

       Make the following changes:

           .numProcessors = 9,

           .id = 0,

           .baseIdOfCluster = 0

       You must also configure LAD to set aside reserved message queues.

       This example uses 8 reserved message queues. Edit the following

       file to reserve message queues in LAD.

       cd <IPC Install>/linux/src/daemon/cfg

       edit MessageQCfg.c

       Make the following changes:

           .numReservedEntries = 8

       Rebuild your LAD executable. Copy the LAD executable to your

       target file system.

       <IPC Install>/linux/src/daemon/lad_tci6638

    4. Generate the compute binary according to the device ID:

    ========================================================

    perl patchExec.pl 0 compute_dspN.xe66 compute_dspN_patched.xe66

       You can also use the helper script provided with the example.

       run_patch.sh 0

       This will generate a new patched DSP executable.

       compute_dspN_patched.xe66

    Copy compute_dspN_patched.xe66 to your filesystem.

    Power on K2H and boot Linux before running the ex44 compute example:

    ======================================================================

    1. Flash the SPI uboot image on K2hk

    ========================================

    setenv ipaddr 10.20.162.238

    setenv serverip 10.20.162.42

    tftpboot 0x88000000 u-boot-spi-k2hk-evm.gph

    sf probe

    (Offset is depends on u-boot image size )

    sf erase 0 0x100000

    sf write 0x88000000 0 0x100000

    2. Set the BOOT switch settings as 0010 and boot the U-boot

    ============================================================

    3. Flash UBIFS into NAND

    ========================

    Copy the ubifs image into the RAM address, 0x82000000

    #tftpboot 0x82000000 tisdk-server-rootfs-image-k2hk-evm.ubi

    #nand erase.part ubifs

    # pri burn_ubi

    ( check all the params are right )

    #run burn_ubi

    #env default -a

    #setenv boot ubi

    #saveenv

    #boot

    (Check the output with the attached screenshot.)

    Linux with ubifs filesystem will get booted.

    4. Stop the default LAD running on the machine.

    #cd /etc/init.d/

    #mv tiipclad-daemon.sh tiipclad-daemon_bkup.sh

    (Restart the machine)

    copy the following into the filesystem

    ======================================

    1. ex44_compute folder

    2. lad_tci6638

    3. patched compute_dspN_patched.xe66

    4. IPC_INSTALL_DIR folder

    Run ex44_compute on target

    ===========================

    1. go to IPC_install/bin

    #cd IPC_install/bin

    #./lad_tci6638 -r 8 -n 9 -b 0 -l log.txt

    2. Goto /usr/bin/scripts/

    #run run_dsp.sh

    3. Goto host folder

    #./app_host

    Output messages: -

    ===================

    oot@k2hk-evm:/home/ex44_compute/host/bin/debug# ./app_host

    ResMgr_threadFxn: -->

    ResMgr_setup: -->

    App_threadFxn: -->

    App_setup: -->

    ResMgr_setup: initalizing IPC

    App_setup: initalizing IPC

    ResMgr_setup: IPC ready, status=0

    App_setup: IPC ready, status=1

    ResMgr_setup: <-- status=0

    ResMgr_exec: -->

    ResMgr_exec: waiting for message

    App_setup: cluster baseId=0, cluster members:

    App_setup:  0 HOST

    App_setup:  1 CORE0

    App_setup:  2 CORE1

    App_setup:  3 CORE2

    App_setup:  4 CORE3

    App_setup:  5 CORE4

    App_setup:  6 CORE5

    App_setup:  7 CORE6

    App_setup:  8 CORE7

    App_setup: MessageQ_open(PEB_Proc1)

    App_setup: PEB queue: proc=CORE0, qid=0x00010089

    App_setup: MessageQ_open(Control_Proc1)

    App_setup: Control queue: proc=CORE0, qid=0x00010088

    App_setup: MessageQ_open(PEB_Proc2)

    App_setup: PEB queue: proc=CORE1, qid=0x00020089

    App_setup: MessageQ_open(Control_Proc2)

    App_setup: Control queue: proc=CORE1, qid=0x00020088

    App_setup: MessageQ_open(PEB_Proc3)

    App_setup: PEB queue: proc=CORE2, qid=0x00030089

    App_setup: MessageQ_open(Control_Proc3)

    App_setup: Control queue: proc=CORE2, qid=0x00030088

    App_setup: MessageQ_open(PEB_Proc4)

    App_setup: PEB queue: proc=CORE3, qid=0x00040089

    App_setup: MessageQ_open(Control_Proc4)

    App_setup: Control queue: proc=CORE3, qid=0x00040088

    App_setup: MessageQ_open(PEB_Proc5)

    App_setup: PEB queue: proc=CORE4, qid=0x00050089

    App_setup: MessageQ_open(Control_Proc5)

    App_setup: Control queue: proc=CORE4, qid=0x00050088

    App_setup: MessageQ_open(PEB_Proc6)

    App_setup: PEB queue: proc=CORE5, qid=0x00060089

    App_setup: MessageQ_open(Control_Proc6)

    App_setup: Control queue: proc=CORE5, qid=0x00060088

    App_setup: MessageQ_open(PEB_Proc7)

    App_setup: PEB queue: proc=CORE6, qid=0x00070089

    App_setup: MessageQ_open(Control_Proc7)

    App_setup: Control queue: proc=CORE6, qid=0x00070088

    App_setup: MessageQ_open(PEB_Proc8)

    App_setup: PEB queue: proc=CORE7, qid=0x00080089

    App_setup: MessageQ_open(Control_Proc8)

    App_setup: Control queue: proc=CORE7, qid=0x00080088

    App_setup: start message sent: procId=1 qid=0x00010088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=1

    ResMgr_exec: message sent: qid=0x00010088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=2 qid=0x00020088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=2

    ResMgr_exec: message sent: qid=0x00020088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=3 qid=0x00030088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=3

    ResMgr_exec: message sent: qid=0x00030088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=4 qid=0x00040088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=4

    ResMgr_exec: message sent: qid=0x00040088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=5 qid=0x00050088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=5

    ResMgr_exec: message sent: qid=0x00050088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=6 qid=0x00060088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=6

    ResMgr_exec: message sent: qid=0x00060088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=7 qid=0x00070088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=7

    ResMgr_exec: message sent: qid=0x00070088

    ResMgr_exec: waiting for message

    App_setup: start message sent: procId=8 qid=0x00080088

    ResMgr_exec: message received, cmd=1

    ResMgr_exec: cmd=REQUEST, sender=8

    ResMgr_exec: message sent: qid=0x00080088

    ResMgr_exec: waiting for message

    App_setup: TransportQMSS instance created

    App_setup: <-- status=0

    App_exec: -->

    App_exec: message sent to PEB queue: qid=0x00010089

    App_exec: message sent to PEB queue: qid=0x00020089

    App_exec: message sent to PEB queue: qid=0x00030089

    App_exec: message sent to PEB queue: qid=0x00040089

    App_exec: message sent to PEB queue: qid=0x00050089

    App_exec: message sent to PEB queue: qid=0x00060089

    App_exec: message sent to PEB queue: qid=0x00070089

    App_exec: message sent to PEB queue: qid=0x00080089

    App_exec: message sent to Compute queue: qid=0x00010082

    App_exec: message sent to Compute queue: qid=0x00020082

    App_exec: message sent to Compute queue: qid=0x00030082

    App_exec: message sent to Compute queue: qid=0x00040082

    App_exec: message sent to Compute queue: qid=0x00050082

    App_exec: message sent to Compute queue: qid=0x00060082

    App_exec: message sent to Compute queue: qid=0x00070082

    App_exec: message sent to Compute queue: qid=0x00080082

    App_exec: <-- status=0

    App_destroy: -->

    App_destroy: <--

    App_threadFxn: <-- status=0

    main: application thread as terminated

    ResMgr_exec: <-- status=0

    ResMgr_destroy: -->

    ResMgr_destroy: <--

    ResMgr_threadFxn: <-- status=0

    main: appStatus=0

    main: rmStatus=0

    main: <-- status=0

    ===========================================================================

  • Thank you very much! I will try to do it.

  • I am sorry. I didn't found where I can download ipc_3_42_00_02. Is mcsdk? or git? I hard try.
  • Hello:

    I have downloaded ti-processor-sdk-linux-k2hk-evm-02.00.02.11-Linux-x86-Install.bin,but I didn't found any ipc inside.

    And I have donwload k2hk-evm-linux-sdk-arago-src-02.00.02.11.tar.gz. I found ipcdev,and I did:

    git reset --hard 3.42.01.3

    But I didn't found ex44_compute.

    I am sorry.

  • Hello:

        Now I want to confirm the remoteproc driver whether run's well. So I want to debug mpm_2_00_01_10. But when I build the mpm_2_00_01_10, errors shows:

      mpminit.c:47:30 fatal error: libdaemon/daemon.h

       It looks like some head file is missing. But I can't found out those head files in kernel(K2_LINUX_03.10.72_15.08) or mcsdk(ti-processor-sdk-linux-k2hk-evm-02.00.02.11).

       So I want to know when I can found the head files, or is other packet I have to donwload and install?

     Thank you very much.

  • Hi user4603712,


    I have downloaded ti-processor-sdk-linux-k2hk-evm-02.00.02.11-Linux-x86-Install.bin,but I didn't found any ipc inside.
    And I have donwload k2hk-evm-linux-sdk-arago-src-02.00.02.11.tar.gz. I found ipcdev,and I did:
    git reset --hard 3.42.01.3
    But I didn't found ex44_compute.

     You have to install "ti-processor-sdk-rtos-k2hk-evm-02.00.02.11-Linux-x86-Install.bin" to get  "ipc_3_42_00_02" package.

  • Thank you very much . I will download and test it now.
  • Hellow

          I have done, this.But it didn't work. 

         I debug compute_dspN_patched.xe66 in CCS5.5, and I found that: the program crashed in "IpcMgr_ipcStartup()" function.

  • Hi user4603712,

     

    With reference to the steps in my previous posts given, Please let us know in which step you failed if you run without debugging.

  • Hellow FAQ:

    Now I use K2_LINUX_03.10.72_15.08 kernel,is it work well with IPC?