National Instruments 320571-01 用户手册

下载
页码 157
Getting Started with the NI-DSP Interface Utilities
Chapter 2
Part 4:  NI-DSP Interface Utilities
2-8
NI-DSP SRM for LabVIEW for Windows
6.  Compile, Assemble, and Link Your Custom Library
The last step in building a custom DSP Library is to compile, assemble, and link your custom library using the WE
DSP32C tools.  You must have installed those tools as described in the WE DSP32C Support Software Library User
Manual
.  You must copy the file 
LIBLVDSP
.
a
 from the 
LIB
 directory in the stand-alone root directory to the 
LIB
directory of the WE DSP32C tools as set by the environment variable recommended in the WE DSP32C Support
Software Library User Manual
.  Table 2-1 lists the files you need to build the custom NI-DSP example.
Table 2-1.  Files Required to Build the Custom DSP Library Example
File
Description
makelib.bat
Batch file to build the custom library
gmaxmin.c
C source file
dspfncs.h
C include file generated by 
Dispatch
dispatch.s
Assembly file generated by 
Dispatch
NIDSPLNK
Modified linker command file
LIBLVDSP.a*
Archived library of object modules for the DSP Library functions
for LabVIEW
libc32c.a*
libap32c.a*
libm32c.a*
AT&T C library
AT&T Application library
AT&T Math library found in the 
LIB
 directory in the path set by
the environment variable
*  
All these archives must be in the 
LIB
 directory in your WE DSP32C tools directory.
Copy the file 
makelib.bat
 from the 
LIB
 directory.  This is a batch file that rebuilds the DSP Library file to
reflect the customization and changes needed.  You must enter in the memory map file names to this 
.bat
 file to
use in linking the DSP Library file, as well as the name of the output file for the DSP Library file.  The two memory
map files used for linking the DSP Library files that come with NI-DSP, 
dsp64.map
 and 
dsp.map
, are located in
the 
LIB
 directory.  Copy the memory map file that you will use to your current directory.  The memory map files
are used when linking the DSP Library files 
LV2200S.out
 and 
LV2200.out
, respectively.  You can rename
these files and move them to other directories.  If you want the driver to load this new DSP Library file, make sure
you run 
WDAQCONF
 as described in the section titled Board Configuration in Part 1, Getting Started with NI-DSP.
You should use one of the memory map files, 
dsp64.map
 or 
dsp.map
, as input to 
makelib.bat
.  If the size of
your library cannot be linked using the section sizes specified in these memory map files, you must edit these files
accordingly.  Refer to the WE DSP32C Support Software Library User Manual for more information.
To begin rebuilding the customized DSP Library, type the following command:
makelib 
memmap libfile
where
memmap 
is the name of the memory map file used
libfile
is the name of the desired DSP Library file name
For example,
makelib dsp64 LV2200S
Do not use the extension names 
.map
 and 
.out
 for the fields 
memmap
 and 
libfile
.