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.

Compiler/EVMK2GX: IPC Build issue ipc-linux.mak config

Part Number: EVMK2GX
Other Parts Discussed in Thread: OMAPL138

Tool/software: TI C/C++ Compiler



k2gUser@poppy:~/ti/ipcdev-3.50.04.08B$ make -f ipc-linux.mak config
Configuring Linux Ipc ...
./configure --host=arm-none-eabi \
            --prefix=/home/k2gUser/ti/ipcdev-3.50.04.08B/IPC_install \
            CC=/home/k2gUser/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc \
            PLATFORM=66AK2G \
            CMEM_INSTALL_DIR= \
            KERNEL_INSTALL_DIR= \
            DRM_PREFIX= \
            AF_RPMSG=45
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-none-eabi
checking how to print strings... printf
checking for style of include used by make... GNU
checking for arm-none-eabi-gcc... /home/k2gUser/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/k2gUser/ti/ipcdev-3.50.04.08B':
configure: error: C compiler cannot create executables
See `config.log' for more details
ipc-linux.mak:56: recipe for target 'config' failed
make: *** [config] Error 77



k2gUser@poppy:~/ti/ipcdev-3.50.04.08B$ cat products.mak
#
#   Copyright (c) 2012-2018 Texas Instruments Incorporated - http://www.ti.com
#
#   Redistribution and use in source and binary forms, with or without
#   modification, are permitted provided that the following conditions
#   are met:
#
#   *  Redistributions of source code must retain the above copyright
#      notice, this list of conditions and the following disclaimer.
#
#   *  Redistributions in binary form must reproduce the above copyright
#      notice, this list of conditions and the following disclaimer in the
#      documentation and/or other materials provided with the distribution.
#
#   *  Neither the name of Texas Instruments Incorporated nor the names of
#      its contributors may be used to endorse or promote products derived
#      from this software without specific prior written permission.
#
#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#  ======== products.mak ========
#

# Note that these variables can be explicitly set here or on the command line.
# If you want to use variables in the environment, see the GNU make manual's
# -e option:  www.gnu.org/.../make.html

# Optional: recommended to install all dependent components in one folder.
#
DEPOT = /home/k2gUser/ti

# Platform to build for
#   Supported platforms (choose one):
#       OMAPL138, OMAP54XX, DRA7XX, 66AK2G, 66AK2E, TCI6630, TCI6636, TCI6638,
#       TDA3XX, AM65XX
#
# Note, this is used for Linux, QNX and BIOS builds
#
PLATFORM = 66AK2G

# Destination when installing the built binaries
#
# Note, this is used for Linux (if you use ipc-linux.mak to run the
# configure command), QNX and BIOS.
#
DESTDIR = /home/k2gUser/ti/ipcdev-3.50.04.08B/IPC_install


#################### IPC Linux ####################

# Set up required cross compiler path for IPC Linux configuration and build
#
#TOOLCHAIN_LONGNAME = arm-none-linux-gnueabi
TOOLCHAIN_LONGNAME = arm-none-eabi
TOOLCHAIN_INSTALL_DIR = $(DEPOT)/gcc-arm-none-eabi-7-2018-q2-update
TOOLCHAIN_PREFIX = $(TOOLCHAIN_INSTALL_DIR)/bin/$(TOOLCHAIN_LONGNAME)-

# Path to Linux Kernel - needed to build the IPC user libraries
#
KERNEL_INSTALL_DIR =

# Optional: Specify the Address Family for RPMSG. This value is specified
# either from the Linux kernel specified by KERNEL_INSTALL_DIR above, or
# the make variable AF_RPMSG below. Do not use both.
#
AF_RPMSG = 45

# Optional: Path to DRM Library
#
DRM_PREFIX =

# Optional: Path to TI Linux Utils product
#
CMEM_INSTALL_DIR =


#################### IPC QNX ####################

# Path to QNX tools installation
#
QNX_INSTALL_DIR =

# Optional: Any additional compile options
#
QNX_CFLAGS =

#################### IPC Bios ####################

# Path to required dependencies for IPC BIOS builds
#
XDC_INSTALL_DIR = $(DEPOT)/xdctools_3_55_02_22_core
BIOS_INSTALL_DIR = $(DEPOT)/bios_6_76_02_02
PDK_INSTALL_DIR = $(DEPOT)/pdk_k2g_1_0_15

# Do you want to build SMP-enabled libraries (if supported for your target)?
# Set to either 0 (disabled) or 1 (enabled)
#
BIOS_SMPENABLED=1

# Path to various cgtools
#
ti.targets.elf.C64P =
ti.targets.elf.C64T =
ti.targets.elf.C66 = /home/k2gUser/ti/ccs1000/ccs/tools/compiler/ti-cgt-c6000_8.3.6
ti.targets.elf.C674 =

ti.targets.arm.elf.Arm9 =
ti.targets.arm.elf.A8F =
ti.targets.arm.elf.A8Fnv =
ti.targets.arm.elf.M3 =
ti.targets.arm.elf.M4 =
ti.targets.arm.elf.M4F =
ti.targets.arm.elf.R5F =

ti.targets.arp32.elf.ARP32 =
ti.targets.arp32.elf.ARP32_far =

gnu.targets.arm.A8F =
gnu.targets.arm.A15F = /home/k2gUser/ti/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux
gnu.targets.arm.A53F =
k2gUser@poppy:~/ti/ipcdev-3.50.04.08B$

Build machine:
Ubuntu 18.04 SMP  x86_64

Note using the tools provided with CCS-10 produced the same message. Version ipc_3_50_04_07 also failed.

  • Hi, Phillip,

    Are you running Linux on ARM core? If it is Linux/ARM, please use the high level build in Linux SDK as described in IPC Quick Start Guide,

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components_IPC.html#ipc-quick-start-guide

    Rex

  • Hello Rex

    Yes ARM is running Linux.

    The app_host application produced a coredump.

    DSP core started first then the host application.

    root@k2g-evm:/opt/phil# /opt/phil/ex02_messageq/host/bin/release/app_host DSP1
    Segmentation fault (core dumped)
    root@k2g-evm:/opt/phil# 2020 Apr 24 01:30:07 k2g-evm Process 1235 (app_host) of user 0 dumped core.

    But I could not find a core file. I guessed the core file would live in '/var/lib/systemd/coredump'. I also perform a find for a file 'core.app_host*' but it was not successful.

    Best regards,

    Phil

  • Hi, Phil,

    Are the binaries from Linux SDK high level build?  Is the DSP binary loaded and run on DSP?

    There are prebuilt ex02_messageq example binaries in linux filesystem under /usr/bin/ipc/examples/ex02_messageq folder. You can try with them.

    Rex

  • Are the binaries from Linux SDK high level build?

    Not sure what you are asking.

    From the procedure in "3.7.2. IPC Quick Start Guide" the binary files are in "IPC" folders not the Linux SDK.

    Run IPC Linux examples

    1. The executable examples are in RTOS Proc SDK under the ipc_xx_xx_xx_xx/examples directory.
    <device>_<OS>_elf/ex<xx_yyyy>/host/bin/debug/app_host
    <device>_<OS>_elf/ex<xx_yyyyyy/<processor_or_component>/bin/debug/<ServerCore_or_component.xe66 for DSP
    <device>_<OS>_elf/ex<xx_yyyyyy/<processor_or_component>/bin/debug/<sServerCore_or_component.xem4 for IPU


    I need more information and clarification:
      Linux SDK high level could be /home/k2gUser/ti/ti-processor-sdk-linux-k2g-evm-06.01.00.08/targetNFS/usr/bin/ipc/examples which seems to be a copy from /home/k2gUser/ti/ipc_3_50_04_07/examples/66AK2G_linux_elf/ex02_messageq

                 export PATH=/home/k2gUser/ti/ti-processor-sdk-linux-k2g-evm-06.01.00.08/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
                 export TI_RTOS_PATH=/home/k2gUser/ti
                 export IPC_INSTALL_PATH=/home/k2gUser/ti/ipc_3_50_04_07


    Is the DSP binary loaded and run on DSP?

    DSP core started before host_app

    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq# mpmcl reset dsp0
    reset succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq# mpmcl status dsp0
    dsp0 is in reset state
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq# mpmcl load dsp0 /opt/phil/ex02_messageq/core0/bin/release/server_core0.xe66
    load succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq# mpmcl run dsp0
    run succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq# mpmcl status dsp0
    dsp0 is in running state



    There are prebuilt ex02_messageq example binaries in linux filesystem under /usr/bin/ipc/examples/ex02_messageq folder. You can try with them.

    root@k2g-evm:/# /usr/bin/ipc/examples/ex02_messageq/release/app_host DSP1
    Aborted (core dumped)
    2020 Apr 24 14:25:54 k2g-evm Process 1052 (app_host) of user 0 dumped core.

    A core file was created.






  • Hi, Phil,

    For K2G, use CORE0 instead of DSP1. Here are the logs using prebuilt example binaries from PLSDK 6.1 release

    k2g-evm login: root
    root@k2g-evm:~#

    root@k2g-evm:~# cd /usr/bin/ipc/examples/ex02_messageq/release/
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# ls
    app_host server_core0.xe66
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# mpmcl reset dsp0
    [ 156.582472] remoteproc remoteproc0: stopped remote processor 10800000.dsp
    reset succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# mpmcl load dsp0 server_core0.xe66
    load succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# mpmcl run dsp0
    [ 180.448170] remoteproc remoteproc0: powering up 10800000.dsp
    [ 180.456075] remoteproc remoteproc0: Booting unspecified pre-loaded fw image
    [ 180.467475] alloc_contig_range: [81f804, 81f807) PFNs busy
    [ 180.478289] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 180.478441] virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
    [ 180.510663] remoteproc remoteproc0: registered virtio0 (type 7)
    [ 180.516732] remoteproc remoteproc0: remote processor 10800000.dsp is now up
    run succeeded
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# ./app_host CORE0
    --> 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@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release# uname -a
    Linux k2g-evm 4.19.59-rt24-g4203cb8c96 #2 SMP PREEMPT RT Thu Apr 2 09:07:05 EDT 2020 armv7l GNU/Linux
    root@k2g-evm:/usr/bin/ipc/examples/ex02_messageq/release#

    Rex

  • Hello Rex

    /usr/bin/ipc/examples/ex02_messageq/release/app_host CORE0

    This worked.

    /opt/phil/ex02_messageq/host/bin/release/app_host CORE0

    The one I built is not working.

    It seems that there is still an issue with my interpretation of the "3.7.2. IPC Quick Start Guide".

    I have found some additional information on the forums maybe it will help clarify it.

    Thank you,

    Phil

  • Hi, Phil,

    The Linux IPC example doesn't support building from RTOS SDK. You will need to install Linux SDK and build in Linux SDK following instructions described in Quick Start Guide. Once you have cross-compiler toolchain path set up and a couple exports, you can issue "make ti-ipc-linux; make ti-ipc-linux-examples". IPC linux library is not included in the release package so "make ti-ipc-linux" is required before building the examples. You may not need to build IPC on the RTOS side for its library using "make ipc-bios" in RTOS SDK, but I never try to miss that step. 

    The Quick Start Guide specifies what exports need to set and provides step by step instruction. It should be helpful in re-build the examples.

    Rex

  • Hello Rex

    I reloaded the TI tools into a clean ti folder using version 06.01.00.08, as well as verifying the Rule.make file per recommendation in a forum post.
    This was successful.
    I also verified using the latest version 06.03.00.106

    Thank you,
    Phil