This step is optional, but recommended if you plan to modify the samples in any way. It will ensure you have a backup copy of the original examples, as provided by the Codec Engine product.
Imp
- <CE_EXAMPLES_INSTALL_DIR> - absolute path of the examples directory or the copy you made, e.g. /usr/work/examples
- <CE_INSTALL_DIR> - root directory of your Codec Engine installation. The original examples are in <CE_INSTALL_DIR>/examples.
- <BIOS_INSTALL_DIR> - root directory of your DSP/BIOS installation.
- <XDC_INSTALL_DIR> - root directory of your xdctools installation.
- directory/file - position of the file relative to the examples directory; for examples, ti/sdo/ce/examples/codecs/makefile refers to <CE_EXAMPLES_INSTALL_DIR>ti/sdo/ce/examples/codecs/makefile.
At the root of the Examples directory are two build-related files that all Codec Engine examples include. We edit both of these files to specify where various software components needed by Codec Engine are on our system, and to narrow the list of hardware targets we want to build for (thereby reducing the build time and possibly the scope of external components needed).
2.1 Edit XDC user build configuration file, user.bldFile user.bld at the root of the Examples directory informs the XDC tools (tooling which the Codec Engine uses to build itself, codecs, servers, etc) where to find compilers and other tools on the user's system, and also what platforms to build for. Open this file in a text editor.
Locate in the file a build table that lists whether to build the examples for the ARM, for the DSP, and for native Linux. Each of those three has a list of supported "targets", i.e. runtime environments, for example the TI C64+ compiler for the DSP, the Montavista Arm9 and the ucLinux ARM 9 for the ARM. Those "targets" support several platforms, for example the Montavista ARM 9 target supports "evmDM6446", "evmDM355", and other platforms.
Following the simple instructions in the file's comments, disable builds that you are not interested in, in order to save time. For example, you may not be interested in building anything for the DSP; or, for the ARM, you may be interested in building on
For the targets that you do want to build for, you will specify the base directories of their respective tool chains, as explained and exemplified in the comments in the file.
2.2 Edit xdcpaths.mak to define the necessary variables
就是根据你的文件目录所在修改这几个环境变量。
The xdcpaths.mak file, also located at the root of the examples/ directory, defines where the Codec Engine is installed, where BIOS is, where the XDC tools are, and where individual Codec Engine packages are. Open this file in a text editor.
Follow the instructions in the file to specify the following:
- (Optional) List of hardware devices you want to build for (DM6446, DM355, etc.). This list is specified in the DEVICES variable. You will likely be interested in on
ly on e or two devices, so reduce this list to your minimum to shorten the build time and to avoid being asked for the location of components you don't need. - (Mandatory) Installation directories for the Codec Engine itself, for the XDC tools, and for the DSP/BIOS (if you build for the DSP). Those you specify in CE_INSTALL_DIR, XDC_INSTALL_DIR, and BIOS_INSTALL_DIR variables, as explained in details in the comments in the file you are editing.
- (Mandatory, depending on your Codec Engine distribution) Installation directories for the "minor" components needed by the Codec Engine, such as XDAIS, Framework Components, DSP/BIOS Link, and CMEM memory manager. If you have a "full" Codec Engine distribution that has a cetools/ directory at its top, all these components will automatically be included. If you don't have this distribution, and instead XDAIS, DSP/BIOS Link and others are installed in other directories, you will have to specify their location.
- (Mandatory) Location of the compiler tools for architectures you'll be building examples for, specifically Montavista Arm9 and TI C64x
Each directory contains a GNU makefile which enables you to build the sample in the current directory. Top-level directories also contain a makefile which steps into subdirectories and builds all the examples under the parent directory.
FYI, the xdcpaths.mak file is included by the individual makefiles for all the example codecs, servers, and applications.
Please keep in mind that MOST BUILD TROUBLES OCCUR WHEN ON
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/viddec_copy), and type
gmake clean
gmake
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
gmake clean
gmake
Note that this is on
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/video_copy), and type
gmake clean
gmake
Note: when developing your own codecs and applications, you will likely take on
- *.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. (server配置文件)
- *.tcf: TConf file for the app. It is set to allow for a generous heap of 122MB and for 4MB of static co
de and da ta. Be very careful with changing the memory map. (DSP/BIOS的配置文件) - main.c: generic main()
- link.cmd: application specific linker command file.
Change directory to ti/sdo/ce/examples/apps (where the makefile is) and type
gmake clean
gmake
For a given application you want to run, you need to copy that application's executable on the target, and if your application requires a DSP server, you need to copy that DSP server on the target as well. (You can see which DSP server -- a DSP binary with .x64P extension -- is required by the application if you look at the application's .cfg file.) In addition, you should copy the input da
Also, you must make sure that all the required kernel modules (.ko's) for your target are loaded (tyically via the loadmodules.sh shell script.)
Example 1: Running the audio_copy example on evmDM6446:
The ARM-side of the audio_copy example for evmDM6446 is in directory examples/ti/sdo/ce/examples/apps/audio_copy/dualcpu/evmDM6446. Copy the app.out file to the target, along with in.dat -- which is in the same directory, so on the target both files should be in the same directory, as well.
The ceapp.cfg file in that directory lists "all.x64P" as its DSP server image, so you must copy the all.x64P DSP executable for evmDM6446 from examples/ti/sdo/ce/examples/servers (more precisely from examples/ti/sdo/ce/examples/servers/all_codecs/bin/evmDM6446/) to the target, in the same directory where the ARM-side executable is.
Example 2: Running the video1_copy example on evmDM355:
The evmDM355 on
4.最后其实还有最重要的Memory map
由于以上的默认配置都是TI的EVM配置,256MDDR,不一样就需要对内存地址进行下分配,请参照:
http://processors.wiki.ti.com/index.phptitle=Changing_the_DVEVM_memory_map
5.从实例中了解下配置文件
其中的local.cfg是arm端的配置文件
remote.cfg是dsp端的配置文件