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.

How to build dra7-dsp1-fw.xe66.dspdce-fw executable in processor SDK 02.00.00

Hi,

I want to use DSPDCE in processor SDK 02.00.00. My target platform is AM572x. I want to modify and build DSPDCE. Can anybody point me to the DSPDCE source and the instructions to build the same?

Regards,

Apoorva

  • Hi,

    Which processor SDK - Linux or RTOS?
  • Hi,

    I am using processor SDK on Linux

    Regards,
    Apoorva
  • Hi Apoorva,

    Check the release manifest in doc folder of ti-processor-sdk-linux-am57xx-evm-02.00.00.00.
    The sources for dsp_dce can be found here: git.ti.com/.../dspdce . You should check the Makefile to get an idea how to build the dra7-dsp1-fw.xe66.dce binary.

    Best Regards,
    Yordan
  • Hi Yordan,

    I have done the same things that you have suggested. I am encountering unresolved symbols error during the build.

    Here are the steps I have followed:

    1. git clone git://git.ti.com/glsdk/dspdce.git dspdce
    2. export TOOLCHAIN=<toolchain path>
    3. export IPCSRC=<path/ipc_3_40_01_08>
    4. export BIOSTOOLSROOT=<path>
    5. export XDCVERSION=xdctools_3_31_02_38_core
    6. export BIOSVERSION=bios_6_42_02_29
    7. export IPCVERSION=ipc_3_40_01_08
    8. export CEVERSION=codec_engine_3_24_00_08
    9. export FCVERSION=framework_components_3_40_01_04
    10. export XDAISVERSION=xdais_7_24_00_04
    11. export C66XCGTOOLSPATH=<path/cgt6x_7_4_2/>
    12. make vayu_config
    13. make

    These are some of the symbols that it not able to find while linking: IpcPower_canHibernate, IpcPower_suspend, MmServiceMgr_exit, MmServiceMgr_init, MmServiceMgr_register, RcmServer_Params_init, ti_trace_SysMin_abort__E, ti_trace_SysMin_exit__E, ti_trace_SysMin_putch__E, ti_trace_SysMin_ready__E

    Can you help me resolve these errors?

    Regards,
    Apoorva
  • Hi,

    First run:

    export ARCH=arm

    export PATH=$PATH:$HOME/ti-processor-sdk-linux-am57xx-evm-02.00.00.00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/

    export CROSS_COMPILE=arm-linux-gnueabihf-

    Since the DSP_DCE component is part of the glsdk, I would point you to the makefile & rules.make of that linux sdk.

    There is a make dspdce command, which executes the following:

    #==============================================================================

    # Build dspdce. Also, an explicit cleanup target is defined.

    #==============================================================================

    dspdce:ipc_dsp

    $(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS) $(DEFAULT_DSPDCE_CONFIG)

    $(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS)

    dspdce_clean:

    $(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS) clean

    dspdce_install:

    install -d $(EXEC_DIR)/lib/firmware

    install  $(DSPDCE_INSTALL_DIR)/$(DSP_FW_GEN) $(EXEC_DIR)/lib/firmware/$(DSP_FW)

    From Rules.make, you have the follwoing for the above variables:

    # DSPDCE build variables

    DSPDCE_BUILD_VARS = BIOSTOOLSROOT=$(BIOSTOOLSROOT_INSTALL_DIR) \

       IPCSRC=$(IPC_INSTALL_DIR) \

       IPCVERSION=ipc_$(IPC_VERSION) \

       BIOSVERSION=bios_$(BIOS_VERSION) \

       XDCVERSION=$(XDC_VERSION) \

       FCVERSION=$(FC_VERSION) \

       C66XCGTOOLSPATH=$(CODEGEN_INSTALL_DIR) \

       PLATFORM=$(REVISION)

    *_INSTALL_DIR  variables above point to the location of the component sources.

    DSPDCE_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/dspdce_$(DSPDCE_VERSION) /* in your case path/to/dsp-dce/sources*/

    DEFAULT_DSPDCE_CONFIG=vayu_config

    The variables used in DSPDCE_BUILD_VARS are:

    # Define target platform.

    PLATFORM=dra7xx

    REVISION=ES10

    DEFAULT_LINUXKERNEL_CONFIG=omap2plus_defconfig      

    DEFAULT_UBOOT_CONFIG=dra7xx_evm_config

    DEFAULT_IPUMM_CONFIG=vayu_smp_config

    DEFAULT_DSPDCE_CONFIG=vayu_config

    BIOS_VERSION=6_41_04_54

    IPC_VERSION=3_36_01_11

    IPUMM_VERSION=3_00_08_02

    DSPDCE_VERSION=1_00_00_05

    DUCATI_FW_GEN=dra7xx-m4-ipu2.xem4

    DUCATI_FW=dra7-ipu2-fw.xem4

    DSP_FW_GEN=dra7xx-c66x-dsp.xe66

    DSP_FW=dra7-dsp1-fw.xe66

    XDC_VERSION=xdctools_3_30_06_67

    FC_VERSION=framework_components_3_40_01_04

    PLATFORM_IPC=DRA7XX

    LINUXUTILS_VERSION=4_10_01_02

    I am also attaching the referred makefile & rules.make files: 

    Makefile.txt
    include Rules.make
    
    .PHONY:	components components_clean components_linux all clean help linux linux_clean linux_install install u-boot u-boot_clean u-boot_install
    
    #==============================================================================
    # Build everything rebuildable.
    #==============================================================================
    all: components apps
    
    #==============================================================================
    # Build components to enable all other build targets.
    #==============================================================================
    components: components_linux components_ipu components_dsp
    components_linux: linux
    components_ipu: ipumm
    components_dsp: dspdce
    #==============================================================================
    # Install components
    #==============================================================================
    components_install: linux_install ipumm_install dspdce_install
    
    #==============================================================================
    # Clean up the targets built by 'make all'.
    #==============================================================================
    components_clean: linux_clean ipc_clean ipumm_clean dspdce_clean
    
    #==============================================================================
    # Build all Demos, Examples and Applications
    #==============================================================================
    apps: u-boot
    
    #==============================================================================
    # Install everything
    #==============================================================================
    apps_install: u-boot_install
    
    #==============================================================================
    # Clean all Demos, Examples and Applications
    #==============================================================================
    apps_clean: u-boot_clean
    
    #==============================================================================
    # Install everything
    #==============================================================================
    install: components_install apps_install
    #==============================================================================
    # Clean up all targets.
    #==============================================================================
    clean: components_clean apps_clean
    
    #==============================================================================
    # A help message target.
    #==============================================================================
    help:
    	@echo
    	@echo "Available build targets are  :"
    	@echo
    	@echo "    components_linux               : Build the Linux components"
    	@echo "    components_ipu                 : Build the IPU components"
    	@echo "    components_dsp                 : Build the DSP components"
    	@echo "    components                     : Build the components for which a rebuild is necessary to enable all other build targets listed below. You must do this at least once upon installation prior to attempting the other targets."
    	@echo "    components_clean               : Remove files generated by the 'components' target"
    	@echo
    	@echo "    apps                           : Build all Examples, Demos and Applications"
    	@echo "    apps_clean                     : Remove all files generated by 'apps' target"
    	@echo "    apps_install                   : Install all Examples, Demos and Applications the targets in $(EXEC_DIR)"
    	@echo
    	@echo
    	@echo "    linux                          : Build Linux kernel uImage and module"
    	@echo "    linux_clean                    : Remove generated Linux kernel files"
    	@echo "    linux_install                  : Install kernel binary and  modules"
    	@echo
    	@echo "    ipc_ipu                        : Build ipc for IPU"
    	@echo "    ipc_dsp                        : Build ipc for DSP"
    	@echo "    ipc_clean                      : Remove generated ipc files"
    	@echo
    	@echo "    u-boot                         : Build the u-boot boot loader"
    	@echo "    u-boot_clean                   : Remove generated u-boot files"
    	@echo "    u-boot_install                 : Install the u-boot image"
    	@echo
    	@echo "    ipumm                          : Build the ipumm firmware"
    	@echo "    ipumm_clean                    : Remove generated ipumm files"
    	@echo "    ipumm_install                  : Install the ipumm firmware"
    	@echo
    	@echo
    	@echo "    dspdce                          : Build the dspdce firmware"
    	@echo "    dspdce_clean                    : Remove generated dspdce files"
    	@echo "    dspdce_install                  : Install the dspdce firmware"
    	@echo
    	@echo
    	@echo "    all                            : Rebuild everything"
    	@echo "    clean                          : Remove all generated files"
    	@echo
    	@echo "    install                        : Install all the targets in "
    	@echo "                            $(EXEC_DIR)"
    	@echo
    
    #==============================================================================
    # Build the Linux kernel. Also, an explicit cleanup target is defined.
    #==============================================================================
    linux:
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) ARCH=arm $(DEFAULT_LINUXKERNEL_CONFIG)
    	cd $(LINUXKERNEL_INSTALL_DIR); pwd ; ./scripts/kconfig/merge_config.sh -m .config ti_config_fragments/audio_display.cfg ti_config_fragments/baseport.cfg ti_config_fragments/connectivity.cfg ti_config_fragments/ipc.cfg ti_config_fragments/power.cfg ti_config_fragments/wlan.cfg ti_config_fragments/system_test.cfg ti_config_fragments/auto.cfg ti_config_fragments/radio.cfg 
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) olddefconfig ARCH=arm
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) zImage
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) dtbs
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) modules
    	$(MAKE) -C $(SGX_KERNEL_MODULE_PATH) $(LINUXKERNEL_BUILD_VARS) KERNELDIR=$(LINUXKERNEL_INSTALL_DIR) DISCIMAGE=$(EXEC_DIR)
    
    linux_clean:
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) mrproper
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) clean
    
    linux_install:
    	install -d $(EXEC_DIR)/boot
    	install  $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/zImage $(EXEC_DIR)/boot
    	install  $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/dts/*.dtb $(EXEC_DIR)/boot
    	install  $(LINUXKERNEL_INSTALL_DIR)/vmlinux $(EXEC_DIR)/boot
    	install  $(LINUXKERNEL_INSTALL_DIR)/System.map $(EXEC_DIR)/boot
    	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) INSTALL_MOD_PATH=$(EXEC_DIR)/ modules_install
    	$(MAKE) -C $(SGX_KERNEL_MODULE_PATH) $(LINUXKERNEL_BUILD_VARS) KERNELDIR=$(LINUXKERNEL_INSTALL_DIR) DISCIMAGE=$(EXEC_DIR) kbuild_install
    
    #==============================================================================
    # Build u-boot. Also, an explicit cleanup target is defined.
    #==============================================================================
    u-boot:
    	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS) $(DEFAULT_UBOOT_CONFIG)
    	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS)
    
    u-boot_clean:
    	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS) distclean
    
    u-boot_install:
    	install -d $(EXEC_DIR)/boot
    	install $(UBOOT_INSTALL_DIR)/MLO $(EXEC_DIR)/boot
    	install $(UBOOT_INSTALL_DIR)/u-boot.img $(EXEC_DIR)/boot
    	install $(UBOOT_INSTALL_DIR)/u-boot.map $(EXEC_DIR)/boot
    
    #==============================================================================
    # Build ipc for ipu. Also, an explicit cleanup target is defined.
    #==============================================================================
    ipc_ipu:
    	$(MAKE) -C $(IPC_INSTALL_DIR) PLATFORM=${PLATFORM_IPC} ti.targets.arm.elf.M4=${TMS470CGTOOLPATH_INSTALL_DIR} XDC_INSTALL_DIR=${XDC_INSTALL_DIR} BIOS_INSTALL_DIR=${BIOS_INSTALL_DIR} -ef ipc-bios.mak all
    
    #==============================================================================
    # Build ipc for dsp. Also, an explicit cleanup target is defined.
    #==============================================================================
    ipc_dsp:
    	$(MAKE) -C $(IPC_INSTALL_DIR) PLATFORM=${PLATFORM_IPC} ti.targets.elf.C66=${CODEGEN_INSTALL_DIR} XDC_INSTALL_DIR=${XDC_INSTALL_DIR} BIOS_INSTALL_DIR=${BIOS_INSTALL_DIR} -f ipc-bios.mak all
    
    ipc_mpu: linux_utils
    	$(MAKE) -e -C $(IPC_INSTALL_DIR) PLATFORM=${PLATFORM_IPC} \
    		CMEM_INSTALL_DIR=${LINUXUTILS_INSTALL_DIR} \
    		TOOLCHAIN_LONGNAME=arm-linux-gnueabihf \
    		TOOLCHAIN_PREFIX=${CROSS_COMPILE_PREFIX} \
    		KERNEL_INSTALL_DIR=${KERNEL_INSTALL_DIR} \
    		-f ipc-linux.mak config
    	$(MAKE) -C $(IPC_INSTALL_DIR)
    
    ipc_clean:
    	$(MAKE) -C $(IPC_INSTALL_DIR) $(IPC_BUILD_VARS) -f ipc-bios.mak clean
    
    
    #==============================================================================
    # Build ipumm. Also, an explicit cleanup target is defined.
    #==============================================================================
    ipumm:ipc_ipu
    	$(MAKE) -C $(IPUMM_INSTALL_DIR) $(IPUMM_BUILD_VARS) $(DEFAULT_IPUMM_CONFIG)
    	$(MAKE) -C $(IPUMM_INSTALL_DIR) $(IPUMM_BUILD_VARS)
    
    ipumm_clean:
    	$(MAKE) -C $(IPUMM_INSTALL_DIR) $(IPUMM_BUILD_VARS) clean
    
    ipumm_install:
    	install -d $(EXEC_DIR)/lib/firmware
    	install  $(IPUMM_INSTALL_DIR)/$(DUCATI_FW_GEN) $(EXEC_DIR)/lib/firmware/$(DUCATI_FW)
    
    #==============================================================================
    # Build dspdce. Also, an explicit cleanup target is defined.
    #==============================================================================
    dspdce:ipc_dsp
    	$(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS) $(DEFAULT_DSPDCE_CONFIG)
    	$(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS)
    
    dspdce_clean:
    	$(MAKE) -C $(DSPDCE_INSTALL_DIR) $(DSPDCE_BUILD_VARS) clean
    
    dspdce_install:
    	install -d $(EXEC_DIR)/lib/firmware
    	install  $(DSPDCE_INSTALL_DIR)/$(DSP_FW_GEN) $(EXEC_DIR)/lib/firmware/$(DSP_FW)
    
    #==============================================================================
    # Build Linux Utils. This is required for using CMEM allocator in user space
    #==============================================================================
    linux_utils:
    	cd $(LINUXUTILS_INSTALL_DIR);./configure --prefix=${LINUXUTILS_INSTALL_DIR}/out \
    	   $(CMEM_CONFIG_VARS)
    	make -C $(LINUXUTILS_INSTALL_DIR)
    	make -C $(LINUXUTILS_INSTALL_DIR) install
    	make -e -C $(LINUXUTILS_INSTALL_DIR)/src/cmem/module \
    	   $(CMEM_KO_BUILD_VARS)
    

    Rulesmake.txt
    # Define target platform.
    PLATFORM=dra7xx
    REVISION=ES10
    DEFAULT_LINUXKERNEL_CONFIG=omap2plus_defconfig
    DEFAULT_UBOOT_CONFIG=dra7xx_evm_config
    DEFAULT_IPUMM_CONFIG=vayu_smp_config
    DEFAULT_DSPDCE_CONFIG=vayu_config
    BIOS_VERSION=6_41_04_54
    IPC_VERSION=3_36_01_11
    IPUMM_VERSION=3_00_08_02
    DSPDCE_VERSION=1_00_00_05
    DUCATI_FW_GEN=dra7xx-m4-ipu2.xem4
    DUCATI_FW=dra7-ipu2-fw.xem4
    DSP_FW_GEN=dra7xx-c66x-dsp.xe66
    DSP_FW=dra7-dsp1-fw.xe66
    XDC_VERSION=xdctools_3_30_06_67
    FC_VERSION=framework_components_3_40_01_04
    PLATFORM_IPC=DRA7XX
    LINUXUTILS_VERSION=4_10_01_02
    
    # Cross compiler used for building linux and u-boot
    TOOLCHAIN_INSTALL_DIR=$(HOME)/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux
    CROSS_COMPILE_PREFIX=$(TOOLCHAIN_INSTALL_DIR)/bin/arm-linux-gnueabihf-
    
    # The installation directory of the SDK.
    GLSDK_INSTALL_DIR=$(shell pwd)
    
    # The directory that points to your kernel source directory.
    LINUXKERNEL_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/board-support/linux
    KERNEL_INSTALL_DIR=$(LINUXKERNEL_INSTALL_DIR)
    
    # The directory that points to the SGX kernel module sources.
    SGX_KERNEL_MODULE_PATH=$(GLSDK_INSTALL_DIR)/board-support/external-linux-kernel-modules/omap5-sgx-ddk-linux/eurasia_km/eurasiacon/build/linux2/omap5430_linux
    
    # The directory that points to your u-boot source directory.
    UBOOT_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/board-support/u-boot
    
    # The directory that points to your ARM Code Gen tools directory
    TMS470CGTOOLPATH_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/ti-devkit/ti-cgt-arm_5.2.4
    
    # The directory where the Code Gen is installed.
    CODEGEN_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/ti-devkit/cgt6x_7_4_13
    
    # The directory that points to the bios tools directory.
    BIOSTOOLSROOT_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources
    
    # The directory that points to your bios source directory.
    BIOS_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/bios_$(BIOS_VERSION)
    
    # The directory that points to your bios source directory.
    XDC_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/$(XDC_VERSION)
    
    # The directory that points to your ipc source directory.
    IPC_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/ipc_$(IPC_VERSION)
    
    # The directory that points to your ipumm source directory.
    IPUMM_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/ipumm_$(IPUMM_VERSION)
    
    # The directory that points to your dsp source directory.
    DSPDCE_INSTALL_DIR=$(GLSDK_INSTALL_DIR)/component-sources/dspdce_$(DSPDCE_VERSION)
    
    # Directory where linux utils is installed
    LINUXUTILS_INSTALL_DIR=${GLSDK_INSTALL_DIR}/component-sources/linuxutils_${LINUXUTILS_VERSION}
    
    # Kernel/U-Boot build variables
    LINUXKERNEL_BUILD_VARS = ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PREFIX)
    UBOOT_BUILD_VARS = CROSS_COMPILE=$(CROSS_COMPILE_PREFIX)
    
    # Where to copy the resulting executables
    EXEC_DIR=$(HOME)/install/$(PLATFORM)
    
    # IPC variables
    IPC_BUILD_VARS = TMS470CGTOOLPATH=$(TMS470CGTOOLPATH_INSTALL_DIR) \
    	BIOSTOOLSROOT=$(BIOSTOOLSROOT_INSTALL_DIR) \
        C66XCGTOOLSPATH=$(CODEGEN_INSTALL_DIR) \
    	XDCVERSION=$(XDC_VERSION) \
    	XDC_INSTALL_DIR=$(BIOSTOOLSROOT_INSTALL_DIR)/$(XDC_VERSION) \
    	BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR)
    
    # IPUMM build variables
    IPUMM_BUILD_VARS = BIOSTOOLSROOT=$(BIOSTOOLSROOT_INSTALL_DIR) \
    	IPCSRC=$(IPC_INSTALL_DIR) \
    	TMS470CGTOOLPATH=$(TMS470CGTOOLPATH_INSTALL_DIR) \
    	BIOSVERSION=bios_$(BIOS_VERSION) \
    	XDCVERSION=$(XDC_VERSION) \
    	XDC_INSTALL_DIR=$(BIOSTOOLSROOT_INSTALL_DIR)/$(XDC_VERSION) \
    	FCVERSION=$(FC_VERSION) \
    	TRACELEVEL=1 \
    	HWVERSION=$(REVISION)
    
    # DSPDCE build variables
    DSPDCE_BUILD_VARS = BIOSTOOLSROOT=$(BIOSTOOLSROOT_INSTALL_DIR) \
        IPCSRC=$(IPC_INSTALL_DIR) \
        IPCVERSION=ipc_$(IPC_VERSION) \
        BIOSVERSION=bios_$(BIOS_VERSION) \
        XDCVERSION=$(XDC_VERSION) \
        FCVERSION=$(FC_VERSION) \
        C66XCGTOOLSPATH=$(CODEGEN_INSTALL_DIR) \
        PLATFORM=$(REVISION)
    
    # CMEM build variables
    # Arguments for building the kernel module
    CMEM_KO_BUILD_VARS = ARCH=arm TOOLCHAIN_PREFIX=$(CROSS_COMPILE_PREFIX) \
    					 KERNEL_INSTALL_DIR=${KERNEL_INSTALL_DIR}
    CMEM_CONFIG_VARS = ARCH=arm TOOLCHAIN_PREFIX=$(CROSS_COMPILE_PREFIX) \
    	CC=$(CROSS_COMPILE_PREFIX)gcc --host=arm-linux-gnueabihf
    

    Hope this helps.

    Best Regards,

    Yordan