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.

idkAM572x using IPC ex2_messageq and pdk packages

Other Parts Discussed in Thread: SYSBIOS


Can you please tell me how to reference or link to pdk csl package using IPC ex2_messageq?
I am trying to use pdk driver packages with messageq example under DRA7XX_linux_elf
How can I set the PATH to the dsp1 server app to locate the package 'ti.csl' ?

Please detail the steps to modify Dsp1.cfg and /ex02_messageq/shared/config.bld, include header or makefile


Little background, I am running the latest AM57 Linux RT image on idkAM572x generated using Yocto and SDK 3.

I have separately built and tested the following : IPC ex2_messageq and PDK gpio example (using SDK RTOS).

I am trying to demo using both examples together, the ARM running host_app and the DSP1 running the server_dsp1.xe66 (using IPC messageQ and toggle gpio)
/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq


Here is what I get when I add the following to DSP1.cfg:

/*use CSL package*/
var socType = "am572x";
var Csl = xdc.loadPackage('ti.csl');
Csl.Settings.deviceType = socType;

/* Load the gpio package */
var GPIO = xdc.loadPackage('ti.drv.gpio');
GPIO.Settings.socType = socType;

I get the following make output:


make all
#
# Making dsp1 ...
make -C dsp1 PROCLIST="dsp1 host"
make[1]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
make PROFILE=debug PROCLIST="dsp1 host" server_dsp1.x
make[2]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
#
# Making bin/debug/configuro/.config ...
/home/eng/ti/xdctools_3_32_01_22_core/xs --xdcpath="/home/eng/ti/bios_6_45_01_29/packages;/home/eng/ti/ipc_3_43_01_03/packages;/home/eng/ti/xdctools_3_32_01_22_core/packages" \
xdc.tools.configuro -o bin/debug/configuro \
-t ti.targets.elf.C66 \
-c /home/eng/ti/ccsv6//tools/compiler/ti-cgt-c6000_8.1.1 \
-p ti.platforms.evmDRA7XX:dsp1 \
-b ../shared/config.bld -r debug \
Dsp1.cfg
configuring Dsp1.xe66 from package/cfg/Dsp1_pe66.cfg ...
js: "/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/Dsp1.cfg", line 197: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: can't locate the package 'ti.csl' along the path: '/home/eng/ti/bios_6_45_01_29/packages;/home/eng/ti/ipc_3_43_01_03/packages;/home/eng/ti/xdctools_3_32_01_22_core/packages;/home/eng/ti/xdctools_3_32_01_22_core/packages;..;'. Ensure that the package path is set correctly.
"./package/cfg/Dsp1_pe66.cfg", line 254
gmake: *** [package/cfg/Dsp1_pe66.xdl] Error 1
makefile:74: recipe for target 'bin/debug/configuro/.config' failed
make[2]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
gmake: *** [package/cfg/Dsp1_pe66.xdl] Deleting file `package/cfg/Dsp1_pe66.h'
gmake: *** [package/cfg/Dsp1_pe66.xdl] Deleting file `package/cfg/Dsp1_pe66.c'
js: "/home/eng/ti/xdctools_3_32_01_22_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
make[2]: *** [bin/debug/configuro/.config] Error 1
makefile:55: recipe for target 'debug' failed
make[1]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
makefile:50: recipe for target 'dsp1' failed
make[1]: *** [debug] Error 2
make: *** [dsp1] Error 2

  • For XDC configuro tool to be able to locate the PDK package, you will need to add the PDK packages path to XDCPATH so that the XDC paths appear as follows:

    xdcpath="/home/eng/ti/bios_6_45_01_29/packages;/home/eng/ti/ipc_3_43_01_03/packages;/home/eng/ti/xdctools_3_32_01_22_core/packages; /home/eng/ti/pdk_am57xx_1_0_3/packages"

    You can add packages to the XDC path using PKGPATH variable in the makefile under dsp1 folder as shown below:

    PKGPATH := $(BIOS_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(IPC_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(XDC_INSTALL_DIR)/packages
    PKGPATH := $(PKGPATH)+$(PDK_INSTALL_DIR)/packages

    Hope this helps

    Regards,

    Rahul

  • Thanks a lot Rahul!

    I was starting to figure out.

    It would be nice to include the info on wiki for building IPC examples under DRA7XX_linux_elf,
    along with a sample products.mak

    Here is my products.mak for user eng

    DEPOT = /home/eng/ti

    #### Linux toolchain ####

    TOOLCHAIN_LONGNAME = arm-linux-gnueabihf
    TOOLCHAIN_INSTALL_DIR = /home/eng/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf
    TOOLCHAIN_PREFIX = $(TOOLCHAIN_INSTALL_DIR)/bin/$(TOOLCHAIN_LONGNAME)-

    CMEM_INSTALL_DIR = /home/eng/ti/ludev/generate

    #### BIOS-side dependencies ####

    BIOS_INSTALL_DIR = $(DEPOT)/bios_6_45_01_29
    IPC_INSTALL_DIR = $(DEPOT)/ipc_3_43_01_03
    XDC_INSTALL_DIR = $(DEPOT)/xdctools_3_32_01_22_core
    PDK_INSTALL_DIR = $(DEPOT)/pdk_am57xx_1_0_3
    CSL_INSTALL_DIR = $(PDK_INSTALL_DIR)/packages/ti/csl

    #### BIOS-side toolchains ####

    CCS = $(DEPOT)/ccsv6/tools/compiler

    ti.targets.elf.C66 = $(CCS)/ti-cgt-c6000_8.1.1
    ti.targets.arm.elf.M4 = $(CCS)/arm_15.12.3.LTS
    gnu.targets.arm.A15F = $(CCS)/gcc-arm-none-eabi-4_9-2015q3
  • How to link to the pdk drivers ?

    below is the linker output after I added GPIO calls


    make all
    #
    # Making dsp1 ...
    make -C dsp1 PROCLIST="dsp1 host"
    make[1]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    make PROFILE=debug PROCLIST="dsp1 host" server_dsp1.x
    make[2]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    #
    # Making bin/debug/server_dsp1.xe66 ...
    /home/eng/ti/ccsv6//tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -z -w -q -u _c_int00 -c -m bin/debug/obj/server_dsp1.xe66.map -o bin/debug/server_dsp1.xe66 bin/debug/obj/MainDsp1.oe66 bin/debug/obj/Server.oe66 bin/debug/obj/GPIO_idkAM572x_board.oe66 bin/debug/obj/gpio_led_ctrl.oe66 \
    bin/debug/configuro/linker.cmd -l /home/eng/ti/ccsv6//tools/compiler/ti-cgt-c6000_8.1.1/lib/libc.a
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    UART_config /home/eng/ti/pdk_am57xx_1_0_3/packages/ti/drv/uart/lib/c66/release/ti.drv.uart.ae66<UART_drv.oe66>

    error: unresolved symbols remain
    error: errors encountered during linking; "bin/debug/server_dsp1.xe66" not
    built

    >> Compilation failure
    make[2]: *** [bin/debug/server_dsp1.xe66] Error 1
    makefile:88: recipe for target 'bin/debug/server_dsp1.xe66' failed
    make[1]: *** [debug] Error 2
    make[2]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    make: *** [dsp1] Error 2
    makefile:81: recipe for target 'debug' failed
    make[1]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    makefile:50: recipe for target 'dsp1' failed

  • I added the PATHs to the library in the makefile ..

    BOARD = am572x
    ARCH_C66 = c66
    LIB_C66 = ae66

    PDK_DIR = $(PDK_INSTALL_DIR)/packages/ti

    # Libraries
    BOARD_LIB = "$(PDK_DIAG_DIR)/lib/$(BOARD)/$(ARCH_C66)/release/ti.board.$(LIB_C66)"
    UART_LIB = "$(PDK_DIR)/drv/uart/lib/$(ARCH_C66)/release/ti.drv.uart.$(LIB_C66)"
    GPIO_LIB = "$(PDK_DIR)/drv/gpio/lib/$(ARCH_C66)/release/ti.drv.gpio.$(LIB_C66)"
    I2C_LIB = "$(PDK_DIR)/drv/i2c/lib/$(ARCH_C66)/release/ti.drv.i2c.$(LIB_C66)"
    CSL_LIB = "$(PDK_DIR)/csl/lib/$(BOARD)/$(ARCH_C66)/release/ti.csl.$(LIB_C66)"
    PERIPHERAL_LIB = -l$(UART_LIB) -l$(GPIO_LIB) -l$(I2C_LIB) -l$(CSL_LIB)


    I still got linking error below:

    I found somehow related post here : e2e.ti.com/.../1983200


    23:46:06 **** Build of configuration Default for project ex02_messageq ****
    make all
    #
    # Making dsp1 ...
    make -C dsp1 PROCLIST="dsp1 host"
    make[1]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    make PROFILE=debug PROCLIST="dsp1 host" server_dsp1.x
    make[2]: Entering directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    #
    # Making bin/debug/configuro/.config ...
    /home/eng/ti/xdctools_3_32_01_22_core/xs --xdcpath="/home/eng/ti/bios_6_45_01_29/packages;/home/eng/ti/ipc_3_43_01_03/packages;/home/eng/ti/xdctools_3_32_01_22_core/packages;/home/eng/ti/pdk_am57xx_1_0_3/packages" \
    xdc.tools.configuro -o bin/debug/configuro \
    -t ti.targets.elf.C66 \
    -c /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1 \
    -p ti.platforms.evmDRA7XX:dsp1 \
    -b ../shared/config.bld -r debug \
    Dsp1.cfg
    making package.mak (because of package.bld) ...
    generating interfaces for package configuro (because package/package.xdc.inc is older than package.xdc) ...
    configuring Dsp1.xe66 from package/cfg/Dsp1_pe66.cfg ...
    generating custom ti.sdo.utils library makefile ...
    generating custom ti.sysbios library makefile ...
    generating custom ti.sdo.ipc library makefile ...
    Linking with library ti.board:./lib/idkAM572x/c66/release/ti.board.ae66
    Linking with library ti.drv.spi:./lib/c66/release/ti.drv.spi.ae66
    Linking with library ti.drv.i2c:./lib/c66/release/ti.drv.i2c.ae66
    Linking with library ti.drv.uart:./lib/c66/release/ti.drv.uart.ae66
    Linking with library ti.drv.gpio:./lib/am572x/c66/release/ti.drv.gpio.ae66
    Linking with library ti.csl:./lib/am572x/c66/release/ti.csl.ae66
    Linking with library ti.osal:./lib/tirtos/c66/release/ti.osal.ae66
    Starting build of library sources ...
    making /home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/ipc.ae66 ...
    gmake[1]: Entering directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/ipc'
    cle66 /home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/utils/NameServer.c ...
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/GateMP.c", line 662: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/GateMP.c", line 693: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/GateMP.c", line 728: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/GateMP.c", line 1565: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/Ipc.c", line 323: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/Ipc.c", line 502: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/ipc/remoteproc/Resource.c", line 119: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 239: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c", line 327: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/ipc/gates/GateHWSpinlock.c", line 77: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/ipc_3_43_01_03/packages/ti/ipc/family/vayu/VirtQueue.c", line 268: remark #2142-D: comparison between signed and unsigned operands
    are66 Ipc.obj ...
    gmake[1]: Leaving directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/ipc'
    making /home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/sysbios'
    cle66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/BIOS.c ...
    "/home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/knl/Semaphore.c", line 234: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/timers/dmtimer/Timer.c", line 691: remark #2142-D: comparison between signed and unsigned operands
    "/home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/timers/dmtimer/Timer.c", line 706: remark #2142-D: comparison between signed and unsigned operands
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/timers/dmtimer/Timer_asm.s64P ...
    asme66 /home/eng/ti/bios_6_45_01_29/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj dmtimer_Timer_asm.obj c62_TaskSupport_asm.obj ...
    gmake[1]: Leaving directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/sysbios'
    making /home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/utils.ae66 ...
    gmake[1]: Entering directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/utils'
    cle66 /home/eng/ti/ipc_3_43_01_03/packages/ti/sdo/utils/UTILS.c ...
    are66 UTILS.obj ...
    gmake[1]: Leaving directory `/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1/bin/debug/configuro/package/cfg/Dsp1_pe66.src/utils'
    Build of libraries done.
    cle66 package/cfg/Dsp1_pe66.c ...
    #
    # Making bin/debug/obj/MainDsp1.oe66 ...
    /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -c -qq -pdsw225 -ppd=bin/debug/obj/MainDsp1.oe66.dep -ppa -D_DEBUG_=1 --symdebug:dwarf -@bin/debug/configuro/compiler.opt -I. --output_file=bin/debug/obj/MainDsp1.oe66 -fc MainDsp1.c
    "MainDsp1.c", line 179: warning: argument of type "void (*)(int)" is incompatible with parameter of type "ti_sysbios_hal_Timer_FuncPtr"
    "MainDsp1.c", line 71: warning: variable "fdata" was set but never used
    "MainDsp1.c", line 79: warning: variable "h_counter" was declared but never referenced
    "MainDsp1.c", line 80: warning: variable "t_counter" was declared but never referenced
    #
    # Making bin/debug/obj/Server.oe66 ...
    /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -c -qq -pdsw225 -ppd=bin/debug/obj/Server.oe66.dep -ppa -D_DEBUG_=1 --symdebug:dwarf -@bin/debug/configuro/compiler.opt -I. --output_file=bin/debug/obj/Server.oe66 -fc Server.c
    #
    # Making bin/debug/obj/GPIO_idkAM572x.oe66 ...
    /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -c -qq -pdsw225 -ppd=bin/debug/obj/GPIO_idkAM572x.oe66.dep -ppa -D_DEBUG_=1 --symdebug:dwarf -@bin/debug/configuro/compiler.opt -I. --output_file=bin/debug/obj/GPIO_idkAM572x.oe66 -fc GPIO_idkAM572x.c
    #
    # Making bin/debug/obj/gpio_led_ctrl.oe66 ...
    /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -c -qq -pdsw225 -ppd=bin/debug/obj/gpio_led_ctrl.oe66.dep -ppa -D_DEBUG_=1 --symdebug:dwarf -@bin/debug/configuro/compiler.opt -I. --output_file=bin/debug/obj/gpio_led_ctrl.oe66 -fc gpio_led_ctrl.c
    #
    # Making bin/debug/server_dsp1.xe66 ...
    /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/bin/cl6x -z -w -q -u _c_int00 -c -m bin/debug/obj/server_dsp1.xe66.map -o bin/debug/server_dsp1.xe66 bin/debug/obj/MainDsp1.oe66 bin/debug/obj/Server.oe66 bin/debug/obj/GPIO_idkAM572x.oe66 bin/debug/obj/gpio_led_ctrl.oe66 \
    bin/debug/configuro/linker.cmd -l /home/eng/ti/ccsv6/tools/compiler/ti-cgt-c6000_8.1.1/lib/libc.a -l"/home/eng/ti/pdk_am57xx_1_0_3/packages/ti/drv/uart/lib/c66/release/ti.drv.uart.ae66" -l"/home/eng/ti/pdk_am57xx_1_0_3/packages/ti/drv/gpio/lib/c66/release/ti.drv.gpio.ae66" -l"/home/eng/ti/pdk_am57xx_1_0_3/packages/ti/drv/i2c/lib/c66/release/ti.drv.i2c.ae66" -l"/home/eng/ti/pdk_am57xx_1_0_3/packages/ti/csl/lib/am572x/c66/release/ti.csl.ae66"
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    UART_config /home/eng/ti/pdk_am57xx_1_0_3/packages/ti/drv/uart/lib/c66/release/ti.drv.uart.ae66<UART_drv.oe66>

    error: unresolved symbols remain
    error: errors encountered during linking; "bin/debug/server_dsp1.xe66" not
    built

    >> Compilation failure
    make[2]: *** [bin/debug/server_dsp1.xe66] Error 1
    makefile:109: recipe for target 'bin/debug/server_dsp1.xe66' failed
    make[2]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    make[1]: *** [debug] Error 2
    makefile:102: recipe for target 'debug' failed
    make: *** [dsp1] Error 2
    make[1]: Leaving directory '/home/eng/ti/ipc_3_43_01_03/examples/DRA7XX_linux_elf/ex02_messageq/dsp1'
    makefile:50: recipe for target 'dsp1' failed

    23:47:28 Build Finished (took 1m:22s.418ms)
  • Chadi,

    UART_config is the SOC specific UART driver configuration that you are missing in the build. you can either add UART_soc.c file for AM57xx found here:

    pdk_am57xx_1_0_3\packages\ti\drv\uart\soc\am572x

    Or Link to the SOC specific UART driver library 

    C:\ti\PROCSDK_304\pdk_am57xx_1_0_3\packages\ti\drv\uart\lib\am572x\c66\release

    Note that each driver has a generic UART driver library and a SOC specific library. The SOC specific library builds the default configuration as part of the library while the independent library allows users to include a UART_soc.c file in their build and provide custom configuration.

    The concept of SOC specific library for UART has been explained here:

    You can directly link to SOC specific UART driver by adding this to your .cfg file:

    var uartSettings = xdc.useModule ('ti.drv.uart.Settings');
    uartSettings.socType = "am572x";

    Please give this a try and let me know if this resolves your issue.

    Regards,

    Rahul

  • I added the uartSettings to .cfg and it's Compiling and Linking OK now :)

    Thanks Rahul!