User`s guide

Compiling and Linking Programs
2-16
Note:
Code Composer Studio software allows only one linker command file per
project. When both programcfg.cmd and app.cmd are required by the
application, the project should use app.cmd (rather than programcfg.cmd)
as the project's linker command file. To include programcfg.cmd in the
linking process, you must add the following line to the beginning of
app.cmd:
-lprogramcfg.cmd
(This line begins with a dash character and then a lower-case L character.
It is not the numeric one character. ) It is important that this line appear at
the beginning, so that programcfg.cmd is the first linker command file used
by the linker, and program is the name of the executable program being
linked as well as the name of the associated configuration file.
2.4.2 Makefiles
As an alternative to building your program as a Code Composer Studio
project, you can use a makefile.
In the following example, the C source code file is volume.c, additional
assembly source is in load.asm, and the configuration file is volume.cdb. This
makefile is for use with gmake, which is included with the Code Composer
Studio software. You can find documentation for gmake on the product CD in
PDF format. Adobe Acrobat Reader is included. This makefile and the source
and configuration files mentioned are located in the volume2 subdirectory of
the tutorial directory of Code Composer Studio distribution CD.
A typical makefile for compiling and linking a DSP/BIOS program is shown in
Example 2-3. You can copy an example makefile to your program folder and
modify the makefile as necessary.
Unlike the Code Composer Studio project, makefiles allow for multiple linker
command files. If the application requires additional linker command files you
can easily add them to the CMDS variable in the example makefile shown in
Example 2-3. However, they must always appear after the programcfg.cmd
linker command file generated by the Configuration Tool.