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.

Linux/BEAGLEBOARD-X15: IPC start AM5728

Part Number: BEAGLEBOARD-X15
Other Parts Discussed in Thread: AM5728

Tool/software: Linux

Hello,
 
I'm currently working on a BeagleBoard X15 with an embedded TI AM5728.
Linux runs on Cortex-A15 and I am looking to start an RTOS instance on Cortex-M4 from Linux.
 
I compiled the examples provided by TI (ex02_messageq), copied the IPU 1 and 2 firmware in /lib/firmware, started the Cortex-M4 by doing an unbind and bind on the .ipu and launched the LAD daemon.
 
When I run the "./app_host IPU1", the program hangs at "App_create" step. The "./app_host HOST" execution (A15 itself) works, messages are well exchanged.
 
I was looking at lad log file and I realized that I have exactly the same problem as this person:
 
e2e.ti.com/.../534430
NameServer_attach : socket failed : Domain 44, Error no 97, Error string : Address family not supported by protocol   He solved his problem by starting the rpmsg_proto module, which wasn't loaded. In my case, this module is already loaded, I have no more ideas to understand this problem.
Do you have an answer to help me? Is this error common? Thank you very much,

Sincerely,

Mathias Hanna
  • Hi, Mathias,

    Which SDK release are you using? After copying the M4 images to the file system, did you soft link dra7-ipuX-fw.xem4 to your binaries? Did you launch the LAD before running M4 binaries?

    There are prebuilt ex02_messageq images in the filesystem. Could you try the prebuilt server_ipuX.xem4 and app_host to see if that works for you?

    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq/debug# ls
    app_host server_dsp2.xe66 server_ipu2.xem4
    server_dsp1.xe66 server_ipu1.xem4

    Rex
  • Hi Rex,

    I'm using 5_01_00_11 release.
    Yes, I created a soft link using ln : ln -s server_ipuX.xem4 /lib/firmware
    I also launched the LAD daemon before running M4 binaries and dmesg indicate that M4 is well started : ./lad_dra7xx lad.txt
    On my file system, there aren't ipc directory under /usr/bin, I don't know why.

    Mathias
  • Mathias,

    Did you build the example using high level build from Linux SDK or from RTOS SDK?
    Let me check 5.1 release to see what's there.

    Rex
  • Rex,

    I build examples from Linux SDK.
    I executed a "make ti-ipc-linux" and "make ti-ipc-linux-example" from the Linux SDK install directory.

    Mathias
  • Hi, Mathias,

    I checked the filesystem in ProcSDK 5.1. it does have /usr/bin/ipc/examples. How did you create your sd card, by running "sudo ./create-sdcard.sh"? I created one yesterday and that's what I use to check and run the example. Please see my console logs in the attached. I am using a AM5728 GP EVM. The only difference it may have with your BB is the dtb file. Filesystem and kernel are the same ones. You may want to find out why the ipc/examples are not in the filesystem. Is it the something overlooked during the sd creation process?

    Rex

    uname -a
    Linux am57xx-evm 4.14.67-gd315a9bb00 #1 SMP PREEMPT Sat Oct 6 02:39:21 UTC 2018 armv7l GNU/Linux
    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq# pwd
    /usr/bin/ipc/examples/ex02_messageq
    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq# ls
    debug    release
    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq# ls debug/
    app_host          server_dsp2.xe66  server_ipu2.xem4  
    server_dsp1.xe66  server_ipu1.xem4  
    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq# ls debug/*
    debug/app_host          debug/server_dsp2.xe66  debug/server_ipu2.xem4
    debug/server_dsp1.xe66  debug/server_ipu1.xem4
    root@am57xx-evm:/usr/bin/ipc/examples/ex02_messageq# cd /lib/firmware
    root@am57xx-evm:/lib/firmware# ps -ef | grep -i lad
    root       772     1  0 02:02 ?        00:00:00 /usr/bin/lad_dra7xx -g -l lad.txt
    root      1259  1156  0 02:11 ttyS2    00:00:00 grep -i lad
    root@am57xx-evm:/lib/firmware# ls -l dra7-dsp?-fw.xe66
    lrwxrwxrwx    1 root     root            46 Oct  6  2018 dra7-dsp1-fw.xe66 -> /lib/firmware/dra7-dsp1-fw.xe66.opencl-monitor
    lrwxrwxrwx    1 root     root            46 Oct  6  2018 dra7-dsp2-fw.xe66 -> /lib/firmware/dra7-dsp2-fw.xe66.opencl-monitor
    root@am57xx-evm:/lib/firmware# ln -sd f /usr/bin/ipc/examples/ex02_messageq/debug/ server_d ipu          root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug/ root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug
    root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug                                                ls -l dra7-dsp?-fw.xe66 i p u
    ls: dra7-ipu?-fw.xe66: No such file or directory
    root@am57xx-evm:/lib/firmware# ls -l dra7-ipu?-fw.xe66    xem4
    lrwxrwxrwx    1 root     root            46 Oct  6  2018 dra7-ipu1-fw.xem4 -> /lib/firmware/dra7-ipu1-fw.xem4.opencl-monitor
    lrwxrwxrwx    1 root     root            40 Oct  6  2018 dra7-ipu2-fw.xem4 -> /lib/firmware/dra7-ipu2-fw.xem4.ipumm-fw
    root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug/ server_ipu1.xem4 dra7-ipu1-fw.xem4
    root@am57xx-evm:/lib/firmware# ln -sf /usr/bin/ipc/examples/ex02_messageq/debug/ server_ipu2.xem4 dra7-ipu2-fw.xem4
    root@am57xx-evm:/lib/firmware# 
    root@am57xx-evm:/lib/firmware# 
    root@am57xx-evm:/lib/firmware# cd /sys/bus/platform/drivers/m omap-rproc/
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# ls
    40800000.dsp  55020000.ipu  bind          uevent
    41000000.dsp  58820000.ipu  module        unbind
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 0 >     55020000.ipu > unbind root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > unbind
    [  909.371081] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [  909.399326] remoteproc remoteproc1: stopped remote processor 55020000.ipu
    [  909.409276] remoteproc remoteproc1: releasing 55020000.ipu
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > unbind root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > unbind
    [  918.661095] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [  918.669326] remoteproc remoteproc0: failed to unmap 16777216/0
    [  918.676953] remoteproc remoteproc0: failed to unmap 16777216/0
    [  918.683016] remoteproc remoteproc0: failed to unmap 16777216/0
    [  918.690941] remoteproc remoteproc0: stopped remote processor 58820000.ipu
    [  918.698610] remoteproc remoteproc0: releasing 58820000.ipu
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# 
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# 
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 58820000.ipu > unbind root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 550
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > unbin
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > u
    [  927.641299] omap-rproc 55020000.ipu: assigned reserved memory node ipu2-memory@95800000
    [  927.649442] remoteproc remoteproc0: 55020000.ipu is available
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [  927.767114] remoteproc remoteproc0: powering up 55020000.ipu
    [  927.772846] remoteproc remoteproc0: Booting fw image dra7-ipu2-fw.xem4, size 4461672
    [  927.780691] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [  927.805946] alloc_contig_range: [95840, 95880) PFNs busy
    [  927.811724] virtio_rpmsg_bus virtio0: rpmsg host is online
    [  927.817286] remoteproc remoteproc0: registered virtio0 (type 7)
    [  927.823270] remoteproc remoteproc0: remote processor 55020000.ipu is now up
    [  927.830687] virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    echo 55020000.ipu > bind8820000.ipu > unbind root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > 
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# echo 55020000.ipu > bindecho 58820000.ipu > bind
    [  944.331350] omap-rproc 58820000.ipu: assigned reserved memory node ipu1-memory@9d000000
    [  944.339497] remoteproc remoteproc1: 58820000.ipu is available
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# [  944.457304] remoteproc remoteproc1: powering up 58820000.ipu
    [  944.463053] remoteproc remoteproc1: Booting fw image dra7-ipu1-fw.xem4, size 4461672
    [  944.471015] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [  944.486138] alloc_contig_range: [9d040, 9d080) PFNs busy
    [  944.492228] virtio_rpmsg_bus virtio2: rpmsg host is online
    [  944.497958] remoteproc remoteproc1: registered virtio2 (type 7)
    [  944.503945] remoteproc remoteproc1: remote processor 58820000.ipu is now up
    [  944.514023] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
    
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# 
    root@am57xx-evm:/sys/bus/platform/drivers/omap-rproc# cd /
    root@am57xx-evm:/# 
    root@am57xx-evm:/# 
    root@am57xx-evm:/# cd /sys/kernel/d debug/
    48890000.usb/ dma_buf/      mmc1/         pm_debug/     ubifs/
    488d0000.usb/ dri/          mmc2/         pm_qos/       usb/
    asoc/         extfrag/      mtd/          ras/          virtio-ports/
    bdi/          hid/          omap_iommu/   regmap/       
    block/        iio/          omapdss/      regulator/    
    cec/          memblock/     opp/          remoteproc/   
    clk/          mmc0/         pinctrl/      ubi/          
    root@am57xx-evm:/# cd /sys/kernel/debug/remoteproc/remoteproc0/
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc0# ls
    carveout_memories  recovery           trace0
    name               resource_table
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc0# cat name
    55020000.ipu
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc0# cat trace0
    [0][      0.000] Watchdog disabled: TimerBase = 0x6803e000 ClkCtrl = 0x6a009750
    [0][      0.000] Watchdog disabled: TimerBase = 0x68036000 ClkCtrl = 0x6a009748
    [0][      0.000] 18 Resource entries at 0x3000
    [0][      0.000] [t=0x000ef419] xdc.runtime.Main: --> main:
    [0][      0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [0][      0.000] [t=0x00194e11] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [0][      0.000] Watchdog disabled: TimerBase = 0x6803e000 ClkCtrl = 0x6a009750
    [0][      0.000] Watchdog disabled: TimerBase = 0x68036000 ClkCtrl = 0x6a009748
    [0][      0.000] [t=0x001dd5c7] xdc.runtime.Main: --> smain:
    [0][      0.000] [t=0x0020dea7] Server: Server_create: server is ready
    [0][      0.000] [t=0x0021c409] Server: <-- Server_create: 0
    [0][      0.000] [t=0x00227ff7] Server: --> Server_exec:
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc0# cd ../remoteproc1
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc1# cat trace0 
    [0][      0.000] Watchdog disabled: TimerBase = 0x68824000 ClkCtrl = 0x6a005568
    [0][      0.000] Watchdog disabled: TimerBase = 0x68826000 ClkCtrl = 0x6a005570
    [0][      0.000] 18 Resource entries at 0x3000
    [0][      0.000] [t=0x000f080d] xdc.runtime.Main: --> main:
    [0][      0.000] registering rpmsg-proto:rpmsg-proto service on 61 with HOST
    [0][      0.000] [t=0x0019834f] xdc.runtime.Main: NameMap_sendMessage: HOST 53, port=61
    [0][      0.000] Watchdog disabled: TimerBase = 0x68824000 ClkCtrl = 0x6a005568
    [0][      0.000] Watchdog disabled: TimerBase = 0x68826000 ClkCtrl = 0x6a005570
    [0][      0.000] [t=0x001e19b7] xdc.runtime.Main: --> smain:
    [0][      0.000] [t=0x00214f79] Server: Server_create: server is ready
    [0][      0.000] [t=0x00223fad] Server: <-- Server_create: 0
    [0][      0.000] [t=0x0022fff1] Server: --> Server_exec:
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc1# ./  which app_host
    which: no app_host in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin)
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc1# /usr/bin/ipc/examples/ ex02_messageq/debug/app_host IPU1
    --> main:
    [ 1053.566994] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [ 1053.572891] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    [ 1053.579039] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    [ 1053.593747] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [ 1053.599634] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [ 1053.605662] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received, sending message 4
    App_exec: message received, sending message 5
    App_exec: message received, sending message 6
    App_exec: message received, sending message 7
    App_exec: message received, sending message 8
    App_exec: message received, sending message 9
    App_exec: message received, sending message 10
    App_exec: message received, sending message 11
    App_exec: message received, sending message 12
    App_exec: message received, sending message 13
    App_exec: message received, sending message 14
    App_exec: message received, sending message 15
    App_exec: message received
    App_exec: message received
    App_exec: message received
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:
    <-- main:
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc1# /usr/bin/ipc/examples/eex02_messageq/debug/app_host IPU1 2
    --> main:
    --> Main_main:
    --> App_create:
    App_create: Host is ready
    <-- App_create:
    --> App_exec:
    App_exec: sending message 1
    App_exec: sending message 2
    App_exec: sending message 3
    App_exec: message received, sending message 4
    App_exec: message received, sending message 5
    App_exec: message received, sending message 6
    App_exec: message received, sending message 7
    App_exec: message received, sending message 8
    App_exec: message received, sending message 9
    App_exec: message received, sending message 10
    App_exec: message received, sending message 11
    App_exec: message received, sending message 12
    App_exec: message received, sending message 13
    App_exec: message received, sending message 14
    App_exec: message received, sending message 15
    App_exec: message received
    App_exec: message received
    App_exec: message received
    <-- App_exec: 0
    --> App_delete:
    <-- App_delete:
    <-- Main_main:
    <-- main:
    root@am57xx-evm:/sys/kernel/debug/remoteproc/remoteproc1# 
    

  • Hi Rex,

    Thank you very much for your help and your advises.
    In effect, I didn't create the SD card running create-sdcard.sh, I used another method.
    It works now !

    Mathias