Lab 2a: Linker Command File
The window on the left is the project window and the large right hand window is your
workspace.
2. A project is all the files you will need to develop an executable output file (.out) which
can be run on the DSP hardware. Let’s create a new project for this lab. On the menu bar
click:
Project New
type Lab2 in the project name field and make sure the save in location is:
C:\C28x\LABS\LAB2. This will create a .pjt file which will invoke all the necessary
tools (compiler, assembler, linker) to build your project. It will also create a debug
folder that will hold immediate output files.
3. Add the C file to the new project. Click:
Project Add Files to Project…
and make sure you’re looking in C:\C28x\LABS\LAB2. Change the “files of type” to
view C source files (*.c) and select Lab2.c and click OPEN. This will add the file
Lab2.c to your newly created project.
4. Add Lab2a.cmd to the project using the same procedure. This file will be edited
during the lab exercise.
5. Next, add the compiler run-time support library to the project
(C:\ti\c2000\cgtools\lib\rts2800_ml.lib).
6. In the project window on the left click the plus sign (+) to the left of Project. Now,
click on the plus sign next to Lab2.pjt. Notice that the Lab2a.cmd file is listed.
Click on Source to see the current source file list (i.e. Lab2.c).
Project Build Options
7. There are numerous build options in the project. The default option settings are sufficient
for getting started. We will inspect a couple of the default linker options at this time.
Click: Project Build Options…
8. Select the Linker tab. Notice that .out and .map files are being created. The .out file is
the executable code that will be loaded into the DSP. The .map file will contain a linker
report showing memory useage and section addresses in memory.
9. Set the Stack Size to 0x200. Select OK and then close the Build Options window.
Edit the Linker Command File - Lab2a.cmd
10. To open and edit Lab2a.cmd, double click on the filename in the project window.
11. Edit the Memory{} declaration by describing the system memory shown on the “Lab2a:
Linker Command File” slide.
2 - 18 C28x - Programming Development Environment