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.

RTOS/PROCESSOR-SDK-OMAPL138: Using make to Build IPC Examples

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Im trying to follow the steps to build the provided IPC examples

Im not having any luck at all as the Makefile does not contain the required target...

I am running an OMAP-L138-lcdk board, the wiki page mentions the out-of-the-box demos are only loaded for keystone2-evm. Im assuming I can build and manually load even the simple MessageQ demo into my OMAP-L138-lcdk board?

If Im following the instructions correctly:

  1. Install Linux Processor SDK - Done, into $HOME/ti/ti-processor-sdk-linux....
  2. Add cross compile toolchain - Done, as per kernel build procedure
  3. From the Linux Processor SDK folder, start the build is make - Unable to as no rule to make target exists

Snippets of steps...

juan@marlin ~/ti/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04 $ echo $PATH
/home/juan/ti/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04/linux-devkit/sysroots/x86_64-arago-linux/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0
juan@marlin ~/ti/ti-processor-sdk-linux-omapl138-lcdk-04.00.00.04 $ make ti-ipc-linux
make: *** No rule to make target 'ti-ipc-linux'.  Stop.

Current Makefile targets...

# Kernel build targets
linux:
linux_install:
linux_clean:

# Make Rules for matrix-gui project
matrix-gui:
matrix-gui_clean:
matrix-gui_install:

# arm-benchmarks build targets
arm-benchmarks:
arm-benchmarks_clean:
arm-benchmarks_install:
arm-benchmarks_install_debug:

# am-sysinfo build targets
am-sysinfo:
am-sysinfo_clean:
am-sysinfo_install:
am-sysinfo_install_debug:

# oprofile-example build targets
oprofile-example:
oprofile-example_clean:
oprofile-example_install:

# matrix-gui-browser build targets
matrix-gui-browser:
matrix-gui-browser_clean:
matrix-gui-browser_install:
matrix-gui-browser_install_debug:

# refresh-screen build targets
refresh-screen:
refresh-screen_clean:
refresh-screen_install:
refresh-screen_install_debug:

# pru build targets
pru: linux
pru_clean:
pru_install:

# u-boot build targets
u-boot-legacy: u-boot
u-boot-legacy_clean: u-boot_clean
u-boot-legacy_install: u-boot_install

u-boot:
u-boot_clean:
u-boot_install:

Im sure I've missed something. Can you see where I have gone wrong?

  • Hi Juan,

    I've forwarded this to the TI-RTOS experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi, Juan,

    You didn't miss anything. ProcSDK started to include OMAP-L in 4.0.0.4 release. I think TI overlooked the top level build on this platform. It is a bug. I'll raise it to our bug system. You may want to follow the instructions in IPC User's Guide instead, processors.wiki.ti.com/.../IPC_Users_Guide.

    Rex
  • Thanks Rex.

    Im now able to build the IPC library after following 

    But Im not all the way there as Im still unable to build examples --

    juan@marlin ~/ti/ipc_3_46_00_02/examples $ make PLATFORM=OMAPL138 HOSTOS=linux
    # # Making all examples... make[1]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq' HOST TOOLCHAIN_PREFIX = /home/juan/ti/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- BIOS_INSTALL_DIR = /home/juan/ti/bios_6_46_05_55 IPC_INSTALL_DIR = /home/juan/ti/ipc_3_46_00_02 XDC_INSTALL_DIR = /home/juan/ti/xdctools_3_32_01_22_core ti.targets.elf.C674 = /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3 make[1]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq' make[1]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq' # # Making dsp ... make -C dsp PROCLIST="dsp host" make[2]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp' make PROFILE=debug PROCLIST="dsp host" server_dsp.x make[3]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp' # # Making bin/debug/server_dsp.xe674 ... /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/bin/cl6x -z -w -q -u _c_int00 -c -m bin/debug/obj/server_dsp.xe674.map -o bin/debug/server_dsp.xe674 bin/debug/obj/MainDsp.oe674 bin/debug/obj/Server.oe674 \ bin/debug/configuro/linker.cmd -l /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/lib/libc.a <Linking> undefined first referenced symbol in file --------- ---------------- ti_ipc_family_omapl138_VirtQueue_Instance_init__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.oe674 ti_ipc_family_omapl138_VirtQueue_addUsedBuf__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_getAvailBuf__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_kick__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_startup__F /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.oe674 error: unresolved symbols remain error: errors encountered during linking; "bin/debug/server_dsp.xe674" not built >> Compilation failure make[3]: *** [makefile:65: bin/debug/server_dsp.xe674] Error 1 make[3]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp' make[2]: *** [makefile:56: debug] Error 2 make[2]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq/dsp' make[1]: *** [makefile:51: dsp] Error 2 make[1]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex02_messageq' make[1]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping' BIOS_INSTALL_DIR = /home/juan/ti/bios_6_46_05_55 IPC_INSTALL_DIR = /home/juan/ti/ipc_3_46_00_02 XDC_INSTALL_DIR = /home/juan/ti/xdctools_3_32_01_22_core ti.targets.elf.C674 = /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3 HOST TOOLCHAIN_PREFIX = /home/juan/ti/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- make[1]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping' make[1]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping' # # Making dsp ... make -C dsp PROCLIST="dsp host" make[2]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp' make PROFILE=debug PROCLIST="dsp host" server_dsp.x make[3]: Entering directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp' # # Making bin/debug/server_dsp.xe674 ... /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/bin/cl6x -z -w -q -c -m bin/debug/obj/server_dsp.xe674.map -o bin/debug/server_dsp.xe674 bin/debug/obj/MainDsp.oe674 bin/debug/obj/SvrDsp.oe674 bin/debug/obj/AppDsp.oe674 bin/debug/configuro/linker.cmd -l /home/juan/ti/ccsv7/tools/compiler/ti-cgt-c6000_8.1.3/lib/libc.a <Linking> undefined first referenced symbol in file --------- ---------------- VirtQueue_cacheWb /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.oe674 ti_ipc_family_omapl138_VirtQueue_Instance_init__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.oe674 ti_ipc_family_omapl138_VirtQueue_addUsedBuf__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_getAvailBuf__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_kick__E /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.src/ipc/ipc.ae674<Ipc.obj> ti_ipc_family_omapl138_VirtQueue_startup__F /home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp/bin/debug/configuro/package/cfg/Dsp_pe674.oe674 error: unresolved symbols remain error: errors encountered during linking; "bin/debug/server_dsp.xe674" not built >> Compilation failure make[3]: *** [makefile:57: bin/debug/server_dsp.xe674] Error 1 make[3]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp' make[2]: *** [makefile:50: all] Error 2 make[2]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping/dsp' make[1]: *** [makefile:51: dsp] Error 2 make[1]: Leaving directory '/home/juan/ti/ipc_3_46_00_02/examples/OMAPL138_linux_elf/ex11_ping' make: *** [makefile:93: all] Error 2

    Turns out there is a MessageQApp on the prebuilt kernel/rootfs (not ideal, but will have to do). I can run the application the board, including the loading of the DSP trace0 onto the debugfs on /debug. I figure this will do for now, until the SDK is updated, as it confirms that the board is configured correctly... 

    However, when generating a CCSv7.2 project (to try and replicate MessageQApp, and you know, do some work :) ) there are missing environment variables (where XXXX is IPC/XDC/TI_PDK/BIOS);

    • XXXX_INCLUDE_PATH environment variables - all contain <none>
      I can make these go away by manually adding the required packages folders instead, annoying for now, but at least application compiles
    • XXXX_LIBRARIES and XXXX_LIBRARY_PATH environment variables  - all contain <none>
      I havent gone through all the missing symbols yet, so my application does not link yet (MessageQ_*, ti_sysbios_*, xdc_runtime_*, MultiProc_*), but Im sure it will once fixed...

    I understand the reason why application wont compile/link (missing header file and dependencies)... Question is, should CCS be filling in the above environment variables for me from the installed packages? 

    I have the correct products selected (as Im making sure I only have one version of each - installed by the RTOS SDK)
    The products were detected by CCS and 'installed' on application start
    The environment variables are telling me that they are "Contributed by product XXXX", and show "<none>" as the values. These variables are added/updated by CCS based on selected products I presume.

    How can I get the right paths and libraries to be detected/used by CCS? Is this something you can help me with, or is it best to ask in new thread/CCS forum? I dont know where/how these variables are configured and 'sent' to CCS...

  • Hi, Juan,

    Before you build the examples, did you make clean? If you did, that may removed the IPC library which is included in the SDK. From the errors of undefined symbols, I suspect that was the case. You may want to try rebuilding the IPC following the instruction in processors.wiki.ti.com/.../IPC_Install_Guide_BIOS, then build the examples.

    I'll have RTOS engineer to answer your CCS related questions.

    Rex
  • I am also very interested in the last questions contained in this post. "How can I get the right paths and libraries to be detected/used by CCS? Is this something you can help me with, or is it best to ask in new thread/CCS forum? I dont know where/how these variables are configured and 'sent' to CCS... "
    It would be really nice if these could be simply created and done CCS rather then just pure make files. Juan have you found a way to CCS?
  • Rex Chang said:

    did you make clean?

    I don't think I did... But I've tried so many different things, so who knows...

    I tried to build the BIOS side of IPC, with the following failure;

    cle9 InterruptArm.c ...
    "InterruptArm.c", line 40: fatal error: cannot open source file "ti/sysbios/family/arm/dm6446/Hwi.h"
    1 catastrophic error detected in the compilation of "InterruptArm.c".
    Compilation terminated.

    So I have re-installed IPC again (using the RTOS Processor SDK), and built Linux side only;

    make -f ipc-linux.mak config
    make
    sudo make install

    Everything succeeds as expected, with a minor (or maybe not?) warning on configuration stage;

    /home/juan/ti/ipc_3_46_00_02/linux/build-aux/missing: Unknown `--is-lightweight' option
    Try `/home/juan/ti/ipc_3_46_00_02/linux/build-aux/missing --help' for more information
    configure: WARNING: 'missing' script is too old or missing

    At that stage I tried again to build some of the examples, and I see the same undefined symbols. My only guess now is that products.mak is incorrectly configured?

    products.cfg

    As it stands now...

    I am able to build against these Linux libraries (generate valid GNU executable to run on the board), so I can continue the development process... I'm just now going through the motions of learning how to load my own DSP firmware file to the board using remoteproc... This should completely test my IPC development ecosystem...

    However, it would be nice to be able to build these libraries and examples as provided... 

  • Jorden Luke said:

    Juan have you found a way to CCS?

    Hi Jorden,

    At the moment, I generated two test projects. One for ARM using GNU, and the second for the DSP using TI/RTOS compiler.

    Im manually updating CCS include directories, libraries, and library paths for the Linux side application. This application compiles and links, and is able to run on the target board.

    The RTOS application did not require any manual configuration. The paths were correctly shown in the XDC Tools page, however they are still blank in the C6000 compiler and linker configuration pages... I haven't been able to correctly load the firmware to run on the board, so unable to confirm that this is correct or not, simply that this compiles and links with no errors.

  • How did you add the libs in CSS Include directories? I have tired adding them via the linked resources and in the build environment. The include directory still hasn't brought the right files in.
  • Jorden Luke said:
    How did you add the libs in CSS Include directories? I have tired adding them via the linked resources and in the build environment. The include directory still hasn't brought the right files in.

    Im not at my development PC at the moment, but this is what I've done...
    To compile, I added the install path to the compiler include directories;
    /usr/local/include/ti

    This will help find all your missing header files...

    To Link, I added the following paths to the linker library path;

    <ipc_install_dir>/linux/src/api/.libs
    <ipc_install_dir>/linux/src/utils/.libs
    <ipc_install_dir>/linux/src/transport/.libs

    And added the the requisite libraries;

    tiipc
    tiipcutils
    titransportrpmsg

    This will help resolve all IPC function calls...

    You could probably also just add the system wide install directory /usr/local/lib, but I've seen posts where people end up using wrong versions of libraries and things dont go as planned, so figured it was a better idea to link to a specific version, rather than a system wide copy. Now that I think about it, maybe its a better idea to do the same for the include directories...

    My GNU project was setup as a cross-compile project.

    All settings were updated in C/C++ Build --> Settings, as per step 10 and 11 in wiki.