Build/Run Codec Engine Examples

这几个交叉编译工具的安装位置

# (Mandatory) Specify where various components are installed.
# What you need depends on what device(s) you're building for, what type(s) of
# programs you are building for, and whether your Codec Engine distribution
# includes a "cetools" directory. The legend:
# CE      - Codec Engine (needed for ARM and for DSP)
# XDC     - XDC tools (ARM and DSP)
# BIOS    - DSP/BIOS (DSP only)
# XDAIS   - XDAIS header files (ARM and DSP)
# FC      - Framework Components, various resource managers (ARM and DSP)
# CMEM    - Contiguous memory manager (ARM only)
# DSPLINK - Arm<->DSP communication software (ARM + DSP)
#
# you can omit directory specifications for the components you think you don't
# need (will be warned if you do, based on your DEVICES + PROGRAMS selection
# above).
#CE_INSTALL_DIR     := _your_CE_installation_directory_/codec_engine_2_23_01
#XDC_INSTALL_DIR      := _your_XDCTOOLS_installation_directory/xdctools_3_10_03
#BIOS_INSTALL_DIR     := _your_SABIOS_installation_directory/bios_5_33_03


CE_INSTALL_DIR      := /home/hugh/dvsdk_2_00_00_22/codec_engine_2_23_01
XDC_INSTALL_DIR       := /home/hugh/dvsdk_2_00_00_22/xdctools_3_16_01_27
BIOS_INSTALL_DIR      := /home/hugh/dvsdk_2_00_00_22/bios_5_41_02_14



# no need to specify the installation directories below if your CE installation
# has cetools/ directory on top
USE_CETOOLS_IF_EXISTS := 1
#XDAIS_INSTALL_DIR     := _your_xDAIS_installation_directory/xdais_6_23
#DSPLINK_INSTALL_DIR   := _your_DSPLink_installation_directory/dsplink-1_61_01-prebuilt
#CMEM_INSTALL_DIR      := _your_CMEM_installation_directory/linuxutils_2_23_01
#FC_INSTALL_DIR        := _your_FC_installation_directory/framework_components_2_23_01
#BIOSUTILS_INSTALL_DIR := _your_BIOSUTILS_installation_directory/biosutils
#EDMA3_LLD_INSTALL_DIR := _your_EDMA3_LLD_installation_directory/edma3_lld_1_06_00_01
#LPM_INSTALL_DIR       := _your_LPM_installation_directory/local_power_manager_1_23_01


XDAIS_INSTALL_DIR            := /home/hugh/dvsdk_2_00_00_22/xdais_6_23
DSPLINK_INSTALL_DIR       := /home/hugh/dvsdk_2_00_00_22/dsplink-1_61_03-prebuilt
CMEM_INSTALL_DIR           := /home/hugh/dvsdk_2_00_00_22/linuxutils_2_23_01
FC_INSTALL_DIR                 := /home/hugh/dvsdk_2_00_00_22/framework_components_2_23_01
BIOSUTILS_INSTALL_DIR   := /home/hugh/dvsdk_2_00_00_22/biosutils_1_01_00
EDMA3_LLD_INSTALL_DIR := /home/hugh/dvsdk_2_00_00_22/edma3_lld_1_05_00
LPM_INSTALL_DIR              := /home/hugh/dvsdk_2_00_00_22/local_power_manager_linux_1_24_03_11


# (Mandatory) specify correct compiler paths and names for the architectures
# you'll be building for:


# compiler path and name for Montavista Arm 9 toolchain. NOTE: make sure the
# directory you specify has a "bin" subdirectory
#CGTOOLS_V5T = /db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3
#CC_V5T = bin/arm-none-linux-gnueabi-gcc
#CGTARGET = gnu.targets.arm.GCArmv5T


#CGTOOLS_V5T =/opt/system/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/
CGTOOLS_V5T =/opt/mv_pro_5.0.0/montavista/pro/devkit/arm/v5t_le/
#CC_V5T = bin/arm_v5t_le-gcc
CC_V5T = bin/arm_v5t_le-g++
CGTARGET = gnu.targets.arm.GCArmv5T



# compiler path and name for TI C64x toolchain. NOTE: make sure the
# directory you specify has a "bin" subdirectory
#CGTOOLS_C64P = /db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux
#CC_C64P      = bin/cl6x
CGTOOLS_C64P = /opt/dvsdk_2_00_00_22/cg6x_6_0_21/
CC_C64P      = bin/cl6x


====================================================================================


第一步 “1. Copy the entire "examples" tree out of the product” 可以不看直接到第二步


1. Copy the entire "examples" tree out of the product



首先确认以下文件的所在的绝对路径:

TI自带的可以练手的例子:一般在你安装的dvsdk_X_XX_XX_XX 下面,修改的时候最好将它拷贝出来练习

<CE_EXAMPLES_INSTALL_DIR> - absolute path of the examples directory or the copy you made

/home/hugh/dvsdk_2_00_00_22/codec_engine_2_23_01/examples/ti/sdo/ce/examples

-----------------------------------------------------------------------------------------------------------------------------------------


<CE_INSTALL_DIR> - root directory of your Codec Engine installation. 

/home/hugh/dvsdk_2_00_00_22/codec_engine_2_23_01

The original examples are in <CE_INSTALL_DIR>/examples.

/home/hugh/dvsdk_2_00_00_22/examples

<BIOS_INSTALL_DIR> - root directory of your DSP/BIOS installation.
/home/hugh/dvsdk_2_00_00_22/bios_5_41_02_14

<XDC_INSTALL_DIR> - root directory of your xdctools installation.
/home/hugh/dvsdk_2_00_00_22/xdctools_3_16_01_27

directory/file - position of the file relative to the examples directory; for examples,
/home/hugh/dm6446/nfs_rootfs/home/walker/codec_engine_examples/examples/ti/sdo/ce/examples/codecs/makefile
       refers to       
/home/hugh/dvsdk_2_00_00_22/codec_engine_2_23_01/examples/ti/sdo/ce/examples/codecs/makefile

      注意:以下的“framework_components_2_23_01”有的名字是“framework_component_2_23_01”就差了一个“s”一定要将其全部替换后,仔细核对一下

XDAIS_INSTALL_DIR            := /home/hugh/dvsdk_2_00_00_22/xdais_6_23
DSPLINK_INSTALL_DIR      := /home/hugh/dvsdk_2_00_00_22/dsplink-1_61_03-prebuilt
CMEM_INSTALL_DIR            := /home/hugh/dvsdk_2_00_00_22/linuxutils_2_23_01
FC_INSTALL_DIR                  := /home/hugh/dvsdk_2_00_00_22/framework_components_2_23_01
BIOSUTILS_INSTALL_DIR   := /home/hugh/dvsdk_2_00_00_22/biosutils_1_01_00
EDMA3_LLD_INSTALL_DIR := /home/hugh/dvsdk_2_00_00_22/edma3_lld_1_05_00
LPM_INSTALL_DIR                := /home/hugh/dvsdk_2_00_00_22/local_power_manager_linux_1_24_03_11


==================================================================================================================================


2. Edit top-level build files to customize the build for your software installation and your hardware


2.1 Edit XDC user build configuration file, user.bld



因为只用到 DM6446 相关的 ARM 和 DSP 所以 非 DM6446 的东东全部注释掉,这样编译的时候就会只编译与 DM6446相关的东西了

然后将
var buildTable = 中的

doBuild: ture, // build for uC Linux
ture -> false

doBuild: ture, // DSP builds (DSP servers for dual-CPU platforms or full apps for DSP-only platforms)

ture -> false

doBuild: ture,  // build for PC Linux

ture -> false



t.LONGNAME = "bin/arm-none-linux-gnueabi-gcc"更改为 t.LONGNAME = "bin/arm_v5t_le-gcc";


2.2 Edit xdcpaths.mak to define the necessary variables


查看以下选项中的提示,并将 1.步骤中找到的绝对路径统统替换这些选项中的内容


# (Optional)
因为我只用 DM6446 相关的,所以改为

DEVICES  := DM6446


# (Mandatory)Specify where various components are installed.

      注意:以下的“framework_components_2_23_01”有的名字是“framework_component_2_23_01”就差了一个“s”一定要将其全部替换后,仔细核对一下


CE_INSTALL_DIR      :=  /home/hugh/dvsdk_2_00_00_22/codec_engine_2_23_01
XDC_INSTALL_DIR       :=  /home/hugh/dvsdk_2_00_00_22/xdctools_3_16_01_27
BIOS_INSTALL_DIR      :=  /home/hugh/dvsdk_2_00_00_22/bios_5_41_02_14

XDAIS_INSTALL_DIR     := /home/hugh/dvsdk_2_00_00_22/xdais_6_23
DSPLINK_INSTALL_DIR   := /home/hugh/dvsdk_2_00_00_22/dsplink-1_61_03-prebuilt
CMEM_INSTALL_DIR      := /home/hugh/dvsdk_2_00_00_22/linuxutils_2_23_01
FC_INSTALL_DIR        := /home/hugh/dvsdk_2_00_00_22/framework_components_2_23_01
BIOSUTILS_INSTALL_DIR := /home/hugh/dvsdk_2_00_00_22/biosutils_1_01_00
EDMA3_LLD_INSTALL_DIR := /home/hugh/dvsdk_2_00_00_22/edma3_lld_1_05_00

LPM_INSTALL_DIR       := /home/hugh/dvsdk_2_00_00_22/local_power_manager_linux_1_24_03_11   

       可能你会发现 “LPM_INSTALL_DIR := /home/hugh/dvsdk_2_00_00_22/local_power_manager_linux_1_24_03_11”你没有,没事的,上网上下一个解压到你的目录中,就可以了。

    注意:如果有上述改动的话,你还需改变以下代码(作用:将电源管理包的路径添加到XDC_PATH变量中)


XDC_PATH := $(XDC_PATH);$(LPM_INSTALL_DIR)/packages


# (Mandatory) specify correct compiler paths and names for the architectures


CGTOOLS_V5T = /opt/mv_pro_5.0.0/montavista/pro/devkit/arm/v5t_le/
CC_V5T = bin/arm_v5t_le-g++

CGTOOLS_C64P = /home/hugh/dvsdk_2_00_00_22/cg6x_6_1_9/
CC_C64P      = bin/cl6x


3. Build example codecs


Change directory to ti/sdo/ce/examples/codecs and type
    gmake clean
    gmake

Alternatively, you can change into a specific codec's directory (e.g. ti/sdo/ce/examples/codecs/scale), and type

我在 “ ti/sdo/ce/examples/codecs/scale” 目录中再执行

    gmake clean

    gmake


4. Build example extensions


Change directory to ti/sdo/ce/examples/extensions and type
    gmake clean
    gmake

Alternatively, you can change into a specific example extension directory(e.g. ti/sdo/ce/examples/extensions/scale), and type

我在 “ti/sdo/ce/examples/extensions/scale” 目录中再执行

    gmake clean

    gmake


5. Build example DSP servers


Note that this is only necessary for dual processor environments, like DM6446.

Change directory to ti/sdo/ce/examples/servers and type
    gmake clean
    gmake

Alternatively, you can change into a specific server's directory(e.g. ti/sdo/ce/examples/servers/scale), and type

我在 “ti/sdo/ce/examples/servers/scale” 目录中再执行

    gmake clean
    gmake


Note: when developing your own codecs and applications, you will likely take one of the DSP server sample and modify it to suit your needs. These are the source files for this server application that you need to know about:

    * *.cfg: Configuration script that determines what codecs should be included in the server, and how some of the components (e.g. DSKT2 and DMAN3) will be configured.
    * *.tcf: TConf file for the app. It is set to allow for a generous heap of 122MB and for 4MB of static code and data. Be very careful with changing the memory map.
    * main.c: generic main()
    * link.cmd: application specific linker command file.


6. Build the GPP applications


Change directory to ti/sdo/ce/examples/apps (where the makefile is) and type
    gmake clean
    gmake


7. Copy files to the target and run

需要拷贝的部分
1. 准备可能用于的依赖模块 
   在 examples/app/system_files/DM6446 中的
    * dsplinkk.ko  //预配置,预搭建 DSP liker driver
    * cmemk.ko //用于 ARM DSP 对内存分配的管理
    * loadmodules.sh and unloadmodules.sh  //加载必要模块的sh脚本
2. 准备 app 端的应用程序
   在 examples/ti/sdo/ce/examples/apps/scale/bin/evmDM6446 中的
    * app_local.x64P   //单 DSP 核应用程序
    * app_local.xv5T   //单 ARM 核应用程序
    * app_remote.xv5T  //ARM+DSP 核 ARM 端应用程序
3. 准备 server 端的应用程序
   在 examples/ti/sdo/ce/examples/servers/all_codecs/bin/evmDM6446 中
    * all.x64P       //ARM+DSP 核 DSP 端应用程序
    * all_pm.x64P  






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值