最近在使用TI的TMS320DM6437处理器,安装完CCS3.3后,又安装了DVSDK.可是发现PSPdriver下的example无法编译通过,经过几天的研究,终于发现了一些环境配置上的细节,整理出来供大家分享。
1.安装CCS3.3,推荐安装默认路径“C:/CCStudio_v3.3”,安装时按照提示进行,对于"TI Emulator driver" 选项可以取消不安装,在有些XP系统上,如果不取消此项的安装,会在安装结束后会死机,原因不明。
2.完成CCS3.3的安装后,再安装DVSDK,推荐安装默路径"C:/dvsdk_1_11_00_00",安装过程为会提示安装最新的DSP/BIOS,可以选择不装,如果安装了,会在CCS3.3目录中多一个子目录bios_5_3x_xx(可能与CCS3.3自带的DSP/BIOS版本不同,x为版本号,根据具体情况有所不同)
3.以上两个软件安装完成后,要设置系统环境变量,供编译工具链使用。具体参数设置如下(如果是在默认路径上安装的话)
BIOS_INSTALL_DIR C:/CCStudio_v3.3/bios_5_31_08
BIOSDVSDK_INSTALL_DIR C:/dvsdk_1_11_00_00
BIOSUTILS_INSTALL_DIR C:/dvsdk_1_11_00_00/biosutils_1_00_02
BSL_EVMDM6437_INSTALLDIR C:/CCStudio_v3.3/boards/ICETEK-DM6437-B_V2
CE_INSTALL_DIR C:/dvsdk_1_11_00_00/codec_engine_1_20_02
DVSDK_INSTALL_DIR C:/dvsdk_1_11_00_00
NDK_INSTALL_DIR C:/dvsdk_1_11_00_00/ndk_1_92_00_22_eval
PSP_INCLUDE_SOC_PATH DM6437
PSP_INSTALL_DIR C:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages
XDC_INSTALL_DIR C:/dvsdk_1_11_00_00/xdc_2_95_02
4.设置完成后,CCS3.3/bios_1_xx_xx下的例子都有可以编译和运行了。但是C:/dvsdk_1_11_00_00/pspdrivers_1_10_00下的例子还不能编译通过。以目录C:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/system/dm6437/bios/evmDM6437/uart下的例子说明如何配置,使example能正常编译。
5.用CCS3.3找开工程文件dm6437_evm_uart_st_sample.pjt,这时如果打开dm6437_evm_uart_st_sample.tcf文件会出错,选择dm6437_evm_uart_st_sample.tcf,右键选择DSP/BIOS config->text edit,打开文本模式,找到"utils.importFile("ti/sdo/pspdrivers/system/dm6437/bios/evmDM6437/uart/dm6437_uart0.tci");
"
替换为
utils.importFile("dm6437_uart0.tci");
保存。
这样这个脚本文件就能正常运行了。但是这时编译会提示找不到一些文件。这是因为XDC工具读取的路径文件中的路径没有设置
设置方法如下:
打开C:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/common/psp_xdcpaths_common.dat
内容如下
-------------------------
// DO NOT MOVE OR DELETE THIS LINE [JavaScript xdcpaths]
// Note: Use /FORWARD/ slashes for all directories!
//Section for non-DVSDK users
//Section 1 Starts
// Root directory for the PSP Drivers installation
// User should modify this variable to point it to the ROOT directory
// of PSP installation directory.
pspRootDir = "C:/dvsdk_1_11_00_00/";
// PSP version number
// If working from clearcase, this variable should be NULL as shown below:
//pspversion = "";
pspversion = "1_10_00";
// PSP installation directory
// It is the directory where PSP is installed.
pspInstallDir ="pspdrivers_" + pspversion ;
// EDMA3 installation directory
// It is the directory where EDMA3 LLD is installed.
edma3InstallDir = "C:/dvsdk_1_11_00_00/edma3_lld_1_05_00";
xdcpaths =
// EDMA3 build directory
edma3InstallDir + "/packages;" +
// PSP Drivers build directory
pspRootDir + pspInstallDir + "/packages;" +
"";
//Section 1 Ends
//Section for DVSDK users
//Section 2 Starts
/**
* For making a release to the DVSDK, Section 1 above needs to be commented and
* the code below needs to be un-commented. This is needed in order to include
* the DVSDK dat file, so that the standalone sample apps can be built.
*/
/*
//var xdcPathsFile;
//function getWindowsEnvironmentVar( envvarName )
//{
// var temp = java.io.File.createTempFile("envVarEchoer", ".bat");
// temp.deleteOnExit();
// var out = new java.io.BufferedWriter(new java.io.FileWriter(temp));
// out.write( "@echo %" + envvarName + "%" );
// out.close();
//
// var runtime = java.lang.Runtime.getRuntime();
// var proc = runtime.exec( temp.getPath() );
// var status = proc.waitFor();
//
// var envvar = java.io.BufferedReader(new
//java.io.InputStreamReader(proc.getInputStream())).readLine();
// if (envvar == "ECHO is on.") {
// envvar = "";
// }
// return (envvar + "").replace( "//", "/", "g" );
//}
//
// xdcPathsFile = this.xdcPathsFile;
//
//this.xdcPathsFile = getWindowsEnvironmentVar("BIOSDVSDK_INSTALL_DIR");
//
//print( "xdcpaths-common.dat> using BIOSDVSDK_INSTALL_DIR=" + this.xdcPathsFile );
//
//if (xdcPathsFile == "") {
// throw "Error: Windows environment variable BIOSDVSDK_INSTALL_DIR is not set. Please run Start->Control Panel-> ..."
//}
//
//load (xdcPathsFile + "/xdcpaths_evmDM648.dat");
//Section 2 Ends */
-------------------------
以上是以我计算机上的安装路径设置的,也就是TI推荐的默认安装路径。如果 你没有使用默认安装路径,请根据实际路径设置环境变量和修改本文件。
至此,环境就算是配置好了。编译也能正常通过。
以上的步骤我并没有做,尤其是配置环境变量的,安装过程中会自动添加,针对我要使用SPI测试例子,但编译不通过,提示 throw new (err)错误
修改如下:
修改文件:dm648_evm_spi_st_sample.tcf 目录如下
C:/dvsdk_1_11_00_00/pspdrivers_1_10_00/packages/ti/sdo/pspdrivers/system/dm648/bios/evmDM648/spi/build
将:
utils.importFile("ti/sdo/pspdrivers/system/dm648/bios/evmDM648/spi/dm648_spi0.tci");
改为:
utils.importFile("dm648_spi0.tci");