MityDSP Documentation Index

Adding The core Library To Your Project

There are two ways to incorporate the MityDSP Core into your application, link with the release and/or debug builds of the library, or include the sources in your application project.

Include Path

Either of the two approaches requires you to add the MityDSP MDK include directory to your project's compiler preprocessor include search path. You should add this path as an absolute path pointing to where you installed the MityDSP MDK (i.e. C:\MityDSP\1.3\software\inc).

There are three methods which you may use to add the MityDSP include files to your project. You may us the -i compiler option or add a C_DIR setting to your PC environment variable, or add Code Composer macros pointing to your MityDSP MDK install directories. This last approach is required to build Critical Link supplied demos and application programs without modification.

Include Path: -i Compiler Option

You can make the include path changes using the Code Composer Studio GUI, or by editing your *.pjt file manually and adding the -i compiler option (as shown below).

["Compiler" Settings: "Debug"]
Options=-g -q -al -fr".\Debug" -i"C:\MityDSP\1.0\software\inc" -d"_DEBUG" -ml2 -ms3 -mv6710

["Compiler" Settings: "Release"]
Optons=-q -o3 -fr".\Release" -i"C:\MityDSP\1.0\software\inc" -ml2 -mv6710

Include Path: C_DIR Environment Variable

Add the following line to your PC environment variables:

C_DIR=z:\MityDSP\x.x\software\inc

or if using C_DIR for the library path (see below):

C_DIR=z:\MityDSP\x.x\software\inc;z:\MityDSP\x.x\software\lib

Where: "z" is the installation drive, and "x.x" is the MityDSP major.minor version.

Include Path: Code Composer Macros

The most portable approach is to use Code Composer macros. To use this method create a file named "Macro.ini" in the directory where Code Composer is run from (usually C:\CCStudio\cc\bin). Add the following lines to Macro.ini (Note that the macro names are case sensitive):

Cgtools_dir=$(Install_dir)\c6000\cgtools\bin
MityDSP_base=X:\MityDSP
MityDSP_1_3=$(MityDSP_base)\1.3\software
MityDSP_1_4=$(MityDSP_base)\1.4\software
MityDSP_1_5=$(MityDSP_base)\1.5\software
MityDSP_2_0=$(MityDSP_base)\2.0\software
... and so on for future MDK releases

The only thing that needs to be changed on a user-by-user basis is the location of MityDSP_base (usually C: instead of X:). Now in the project build options, instead of specifying an absolute path to the include directories, instead use "$(MityDSP_1_5)\inc" (for MDK 1.5).

Using Libraries

To link with the libraries, you can add the libraries to your project using either the Code Composer Studio GUI or your PC environment variables. You should avoid just adding the libraries to your project using the "Add Files to Project..." menu. That approach will prevent you from specifying the debug and the release libraries for debug and release builds independantly. Instead you should use the "Project / Build Options..." menu. For the debug build you need to add the library DspCoreD.lib. For the release build you need to add the library DspCore.lib. Note: You must order the libraries so that the linker sees the DspCore library before any other MityDSP libraries.

For both debug and release you want to specify a linker library search path which points to your MityDSP MDK library directory (i.e. C:\MityDSP\1.3\software\lib for the MityDSP and MityDSP-XM, or C:\MityDSP\2.0\software\lib.pro for the MityDSP-Pro).

Using Libraries: -i Compiler Option

You can also make the library path changes by editing your *.pjt file manually and adding the -i & -l linker options (as shown below). Note: the link options must all be on one line in the project file, not split onto two lines as shown.

["Linker" Settings: "Debug"]
Options=-q -c -heap0x1000 -o".\Debug\CP_App.out" -stack0x1000 -x 
        -i"C:\MityDSP\1.0\software\lib" -l"DspCoreD.lib" 

["Linker" Settings: "Release"]
Options=-q -c -heap0x1000 -o".\Release\CP_App.out" -stack0x1000 -x 
        -i"C:\MityDSP\1.0\software\lib" -l"DspCore.lib" 

Again, use lib.pro instead of lib for the MityDSP-Pro.

Using Libraries: C_DIR Environment Variable

Add the following line to your PC environment variables:

C_DIR=z:\MityDSP\x.x\software\lib

or if using C_DIR for the include path (see above):

C_DIR=z:\MityDSP\x.x\software\inc;z:\MityDSP\x.x\software\lib

Where: "z" is the installation drive, and "x.x" is the MityDSP major.minor version.

Again, use lib.pro instead of lib for the MityDSP-Pro.

Using Libraries: Code Composer Macros

The most portable approach is to use Code Composer macros. This method uses the same Macro.ini file as used for the include files. In the project build options, instead of specifying an absolute path to the library directories, instead use "$(MityDSP_1_5)\lib" (for MDK 1.5 and a MityDSP or MityDSP-XM), or "$(MityDSP_2_0)\lib.pro" (for MDK 2.0 and a MityDSP-Pro).

See also:
Include Path: Code Composer Macros

Using Sources

To build with the sources, you can add the core sources to your project using the Code Composer Studio GUI. The best way to determine which sources to add is to take a look at the library project that came with your source code distribution. This file will have the most up to date list of sources for the core package. The library project is located in the lib\core directory of your MityDSP MDK installation. Note: If you use the sources directly in your project, you should only use the class files that you need to minimize the size of your executable.


  
Generated on Wed Mar 28 15:13:43 2012 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.