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.

@section use_core_inc_sec 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. <b>C:\\MityDSP\\1.3\\software\\inc</b>). 

There are three methods which you may use to add the MityDSP include files to your 
project. You may us the <b>-i</b> compiler option or add a <b>C_DIR</b> 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.

@section use_core_inc_sec_i 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 <b>-i</b> compiler option (as shown below).

@verbatim 

["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

@section use_core_inc_sec_e Include Path: C_DIR Environment Variable

Add the following line to your PC environment variables:
@verbatim 

C_DIR=z:.x

or if using <b>C_DIR</b> for the library path (see below):
@verbatim 

C_DIR=z:.x;z:.x

Where: &quot;z&quot; is the installation drive, and &quot;x.x&quot; is the MityDSP 
major.minor version.

@section use_core_inc_sec_m Include Path: Code Composer Macros

The most portable approach is to use Code Composer macros.  To use this method create 
a file named &quot;Macro.ini&quot; 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):
@verbatim 

Cgtools_dir= MityDSP_base=X: MityDSP_1_3=\1.3 MityDSP_1_4=\1.4 MityDSP_1_5=\1.5 MityDSP_2_0=\2.0 ... 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
&quot;\$(MityDSP_1_5)\\inc&quot; (for MDK 1.5).

@section use_core_lib_sec 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 &quot;Add Files to Project...&quot; 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 &quot;Project / Build Options...&quot;
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. <b>C:\\MityDSP\\1.3\\software\\lib</b>
for the MityDSP and MityDSP-XM, or <b>C:\\MityDSP\\2.0\\software\\lib.pro</b> for the
MityDSP-Pro).

@section use_core_lib_sec_i Using Libraries: -i Compiler Option

You can also make the library path changes by editing your *.pjt file manually 
and adding the <b>-i</b> & <b>-l</b> 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.

@verbatim 

["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 <i>lib.pro</i> instead of <i>lib</i> for the MityDSP-Pro.

@section use_core_lib_sec_e Using Libraries: C_DIR Environment Variable

Add the following line to your PC environment variables:
@verbatim 

C_DIR=z:.x

or if using <b>C_DIR</b> for the include path (see above):
@verbatim 

C_DIR=z:.x;z:.x

Where: &quot;z&quot; is the installation drive, and &quot;x.x&quot; is the MityDSP 
major.minor version.

Again, use <i>lib.pro</i> instead of <i>lib</i> for the MityDSP-Pro.

@section use_core_lib_sec_m 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 
&quot;\$(MityDSP_1_5)\\lib&quot; (for MDK 1.5 and a MityDSP or MityDSP-XM), or 
&quot;\$(MityDSP_2_0)\\lib.pro&quot; (for MDK 2.0 and a MityDSP-Pro).

@sa Include Path: Code Composer Macros

@section use_core_src_sec 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 <b>lib\\core</b> 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 Mon Apr 22 2013 11:33:02 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.