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.

EVMK2H: Problems with building IPC for Linux-RT

Part Number: EVMK2H

What I want to do: Use Linux-RT on ARM side of EVMK2H and be able to send and receive data from DSP cores.

What I did in the past is using Syslink shared region example, but that was for a older board. This newer board now has Processor-SDK, so I have the latest Processor SDK Linux-RT and RTOS versions. And I found the IPC example on the Matrix 2.0 demo, therefore I looked into IPC examples. I started to follow this guide: processors.wiki.ti.com/.../File:Guide_Keystone_II_IPC_examples_.zip

I setup my products.mak file like so:

#
#   Copyright (c) 2012-2015 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/usman/ti

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

# 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 = $(DEPOT)/ipc_3_44_01_01/IPC_install


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

# Set up required cross compiler path for IPC Linux configuration and build
#
TOOLCHAIN_LONGNAME = arm-none-eabi
TOOLCHAIN_INSTALL_DIR = $(DEPOT)/gcc-arm-none-eabi-4_9-2015q3
TOOLCHAIN_PREFIX = $(TOOLCHAIN_INSTALL_DIR)/bin/$(TOOLCHAIN_LONGNAME)-

# Path to Linux Kernel - needed to build the IPC user libraries
#
KERNEL_INSTALL_DIR = $(DEPOT)/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/board-support/linux-rt-4.4.41+gitAUTOINC+968d071ce9-g968d071ce9/

# 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 =

# 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_32_01_22_core
BIOS_INSTALL_DIR = $(DEPOT)/bios_6_46_04_53

# 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.C64P_big_endian =
ti.targets.elf.C64T =
ti.targets.elf.C66 = $(DEPOT)/ti-cgt-c6000_8.1.3
ti.targets.elf.C66_big_endian =
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.arp32.elf.ARP32 =
ti.targets.arp32.elf.ARP32_far =

gnu.targets.arm.A8F =
gnu.targets.arm.A15F =

When I run "make -f ipc-linux.mak config", I get the following error:

usman@usman-VirtualBox:~/ti/ipc_3_44_01_01$ make -f ipc-linux.mak config
Configuring Linux Ipc ...
./configure --host=arm-none-eabi \
            --prefix=/home/usman/ti/ipc_3_44_01_01/IPC_install \
            CC=/home/usman/ti/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc \
            PLATFORM=TCI6636 \
            CMEM_INSTALL_DIR= \
            KERNEL_INSTALL_DIR=/home/usman/ti/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/board-support/linux-rt-4.4.41+gitAUTOINC+968d071ce9-g968d071ce9/ \
            DRM_PREFIX= \
            AF_RPMSG=
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/usman/ti/ipc_3_44_01_01/linux/build-aux/missing: Unknown `--is-lightweight' option
Try `/home/usman/ti/ipc_3_44_01_01/linux/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
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-unknown-linux
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/usman/ti/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/usman/ti/ipc_3_44_01_01':
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

I already installed all of the 32bit libs listed on this page: processors.wiki.ti.com/.../Sitara_Linux_SDK_64_Bit_Ubuntu_Support

Am I going in the right direction for what I want to do? Or should I be using something other than IPC

  • Hi Usman,

    I've forwarded this to the IPC experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi,

    You can check the top level makefile in ~/ti-processor-sdk-linux-k2hk-evm-03.02.00.05/.
    Execute
    make ti-ipc-linux_clean
    make ti-ipc-linux

    You should also have the TIRTOS installed in the default direction (usually ~/ti/).
    After the build is complete, you can use the generated image.

    Best Regards,
    Yordan
  • This is what I get when I run that:

    usman@usman-VirtualBox:~/ti/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04$ make ti-ipc-linux_clean
    
    Error: TI_RTOS_PATH (/home/usman/ti/processor_sdk_rtos_k2hk_3_03_00_04) does not contain
           the corresponding Processor SDK RTOS release!
    
    Please install Processor SDK RTOS 03.03.00.04 for k2hk-evm.
    Makefile:599: recipe for target 'ti-ipc-rtos-path-check' failed
    make: *** [ti-ipc-rtos-path-check] Error 1
    

    EDIT: TI_RTOS_PATH is not suppose to actually point to where the RTOS SDK is, just to the /home/user/ti folder, which is kinda a pointless variable that is required to set really, I recommend this should be changed to the default install location but leave the variable for custom install paths. It's currently building, i'll make a post if it fails, or update this if it succeeds.

  • Here is my new point of failure

    =================================
    Configuring IPC
    =================================
    SDK_INSTALL_PATH=/home/usman/ti TOOLS_INSTALL_PATH=/home/usman/ti/ccsv7/.. source /home/usman/ti/processor_sdk_rtos_k2hk_3_03_00_04/setupenv.sh > /dev/null; \
    . /home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/environment-setup; \
    cd ${IPC_INSTALL_PATH}; \
            ./configure ${CONFIGURE_FLAGS} \
    	CC=${CC} \
    	--prefix=/usr \
    	PLATFORM=${IPC_PLATFORM} \
    	KERNEL_INSTALL_DIR=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/board-support/linux-rt-4.4.41+gitAUTOINC+968d071ce9-g968d071ce9
    /bin/sh: 1: source: not found
    /bin/sh: 4: ./configure: not found
    Makefile:617: recipe for target 'ti-ipc-linux-config' failed
    make: *** [ti-ipc-linux-config] Error 127
    

    After doing: export IPC_INSTALL_PATH=/home/user/ti/ipc_3_44_01_01 it moved forward and failed here

    =================================
    Building IPC
    =================================
    SDK_INSTALL_PATH=/home/usman/ti TOOLS_INSTALL_PATH=/home/usman/ti/ccsv7/.. source /home/usman/ti/processor_sdk_rtos_k2hk_3_03_00_04/setupenv.sh > /dev/null; \
    source /home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/environment-setup; \
    make -j 1 -C ${IPC_INSTALL_PATH}
    /bin/sh: 1: source: not found
    /bin/sh: 2: source: not found
    make[1]: Entering directory '/home/usman/ti/ipc_3_44_01_01'
    Making all in linux/etc
    make[2]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    Making all in linux/src/utils
    make[2]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
    /bin/bash ../../../libtool  --tag=CC   --mode=compile arm-linux-gnueabihf-gcc -DPACKAGE_NAME=\"TI\ IPC\" -DPACKAGE_TARNAME=\"ti-ipc\" -DPACKAGE_VERSION=\"3.0.0\" -DPACKAGE_STRING=\"TI\ IPC\ 3.0.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ti-ipc\" -DVERSION=\"3.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -I.   -march=armv7-a -marm -mfpu=neon  -mfloat-abi=hard --sysroot=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -I../../../hlos_common/include -D_GNU_SOURCE -Wall   -I../../../linux/include -I../../../packages  -march=armv7-a -marm -mfpu=neon  -mfloat-abi=hard --sysroot=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -MT LAD_client.lo -MD -MP -MF .deps/LAD_client.Tpo -c -o LAD_client.lo LAD_client.c
    libtool: compile:  arm-linux-gnueabihf-gcc "-DPACKAGE_NAME=\"TI IPC\"" -DPACKAGE_TARNAME=\"ti-ipc\" -DPACKAGE_VERSION=\"3.0.0\" "-DPACKAGE_STRING=\"TI IPC 3.0.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ti-ipc\" -DVERSION=\"3.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -I. -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard --sysroot=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -I../../../hlos_common/include -D_GNU_SOURCE -Wall -I../../../linux/include -I../../../packages -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard --sysroot=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi -MT LAD_client.lo -MD -MP -MF .deps/LAD_client.Tpo -c LAD_client.c  -fPIC -DPIC -o .libs/LAD_client.o
    ../../../libtool: line 1111: arm-linux-gnueabihf-gcc: command not found
    Makefile:491: recipe for target 'LAD_client.lo' failed
    make[2]: *** [LAD_client.lo] Error 1
    make[2]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
    Makefile:502: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/usman/ti/ipc_3_44_01_01'
    Makefile:631: recipe for target 'ti-ipc-linux' failed
    make: *** [ti-ipc-linux] Error 2
    

    I'm assuming the compiler that is included in the Processor SDK is the incorrect one and I need to find this one: 

     arm-linux-gnueabihf-gcc

    Had to export PATH=/home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

    which really should be included in environment setup script

    Likewise with the original problem, the included compiler with the RTOS processor sdk package doesn't work, had to change this in products.mak:

    TOOLCHAIN_INSTALL_DIR = /home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr

  • New problem when running sudo make install after building IPC

    usman@usman-VirtualBox:~/ti/ipc_3_44_01_01$ sudo make install
    Making install in linux/etc
    make[1]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    make[2]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    make[2]: Nothing to be done for 'install-exec-am'.
    make[2]: Nothing to be done for 'install-data-am'.
    make[2]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    make[1]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/etc'
    Making install in linux/src/utils
    make[1]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
    make[2]: Entering directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
     /bin/mkdir -p '/home/usman/ti/ipc_3_44_01_01/IPC_install/lib'
     /bin/bash ../../../libtool   --mode=install /usr/bin/install -c   libtiipcutils.la libtiipcutils_lad.la '/home/usman/ti/ipc_3_44_01_01/IPC_install/lib'
    libtool: install: /usr/bin/install -c .libs/libtiipcutils.so.1.0.0 /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils.so.1.0.0
    libtool: install: (cd /home/usman/ti/ipc_3_44_01_01/IPC_install/lib && { ln -s -f libtiipcutils.so.1.0.0 libtiipcutils.so.1 || { rm -f libtiipcutils.so.1 && ln -s libtiipcutils.so.1.0.0 libtiipcutils.so.1; }; })
    libtool: install: (cd /home/usman/ti/ipc_3_44_01_01/IPC_install/lib && { ln -s -f libtiipcutils.so.1.0.0 libtiipcutils.so || { rm -f libtiipcutils.so && ln -s libtiipcutils.so.1.0.0 libtiipcutils.so; }; })
    libtool: install: /usr/bin/install -c .libs/libtiipcutils.lai /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils.la
    libtool: install: /usr/bin/install -c .libs/libtiipcutils_lad.so.1.0.0 /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils_lad.so.1.0.0
    libtool: install: (cd /home/usman/ti/ipc_3_44_01_01/IPC_install/lib && { ln -s -f libtiipcutils_lad.so.1.0.0 libtiipcutils_lad.so.1 || { rm -f libtiipcutils_lad.so.1 && ln -s libtiipcutils_lad.so.1.0.0 libtiipcutils_lad.so.1; }; })
    libtool: install: (cd /home/usman/ti/ipc_3_44_01_01/IPC_install/lib && { ln -s -f libtiipcutils_lad.so.1.0.0 libtiipcutils_lad.so || { rm -f libtiipcutils_lad.so && ln -s libtiipcutils_lad.so.1.0.0 libtiipcutils_lad.so; }; })
    libtool: install: /usr/bin/install -c .libs/libtiipcutils_lad.lai /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils_lad.la
    libtool: install: /usr/bin/install -c .libs/libtiipcutils.a /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils.a
    libtool: install: chmod 644 /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils.a
    libtool: install: arm-linux-gnueabihf-ranlib /home/usman/ti/ipc_3_44_01_01/IPC_install/lib/libtiipcutils.a
    ../../../libtool: line 1085: arm-linux-gnueabihf-ranlib: command not found
    Makefile:425: recipe for target 'install-libLTLIBRARIES' failed
    make[2]: *** [install-libLTLIBRARIES] Error 127
    make[2]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
    Makefile:668: recipe for target 'install-am' failed
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory '/home/usman/ti/ipc_3_44_01_01/linux/src/utils'
    Makefile:502: recipe for target 'install-recursive' failed
    make: *** [install-recursive] Error 1
    usman@usman-VirtualBox:~/ti/ipc_3_44_01_01$ which arm-linux-gnueabihf-ranlib
    /home/usman/ti-processor-sdk-linux-rt-k2hk-evm-03.03.00.04/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ranlib
    

    You can see on the bottom, I ran the "which" command and it can find it, but the script can't seem to find it??

  • Doing sudo "PATH=$PATH" make install made it work, don't know why but it worked.

  • Hi Usman,

    Sorry, I was OoO.
    Anyway, thanks for updating the thread with your solution.

    Best Regards,
    Yordan