1.2.1 Building with the DSP Library
Building an application which utilizes the DSP Library requires only two files: dsp.h and libdsp-elf.a. dsp.h is a header file which provides all the function prototypes, #defines and typedefs used by the library. libdsp-elf.a is the archived library file which contains all the individual object files for each library function. (See the “MPLAB® XC32 Libraries Reference Manual for PIC32A MCU”, DS50003838, for more on ELF-specific libraries.)
When compiling an application, dsp.h must be referenced (using #include) by all source files which call a function in the DSP Library or use its symbols or typedefs. When linking an application, libdsp-elf.a must be provided as an input to the linker (using the --library dsp or -ldsp linker switch), so the functions used by the application be linked to the project.
The linker will place the functions of the DSP library into a special text section named .libdsp. This can be seen in the map file generated by the linker.