Lab 2: Linker Command File
C2000 Microcontroller Workshop - Programming Development Environment 2 - 21
down list immediately to the right, choose the “Experimenter’s Kit – F28069
Piccolo”.
Leave the “Connection” box blank. We have already set up the target configuration.
7. The next section section selects the project settings. In the Project name field type Lab2.
Uncheck the “Use default location” box. Click the Browse… button and navigate to:
C:\C28x\Labs\Lab2\Project
Click OK.
8. Next, open the “Advanced setting” section and set the “Linker command file” to
“<none>”. We will be using our own linker command file rather than the one supplied
by CCS. Leave the “Runtime Support Library” set to “<automatic>”. This will
automatically select the “rts2800_fpu32.lib” runtime support library for floating-point
devices.
9. Then, open the “Project templates and examples” section and select the “Empty
Project” template. Click Finish.
10. A new project has now been created. Notice the Project Explorer window
contains Lab2. The project is set Active and the output files will be located in the
Debug folder. At this point, the project does not include any source files. The next step
is to add the source files to the project.
11. To add the source files to the project, right-click on Lab2 in the Project Explorer
window and select:
Add Files…
or click: Project Add Files…
and make sure you’re looking in C:\C28x\Labs\Lab2\Files. With the “files of
type” set to view all files (*.*) select Lab2.c and Lab2.cmd then click OPEN. A “File
Operation” window will open, choose “Copy files” and click OK. This will add the
files to the project.
12. In the Project Explorer window, click the plus sign (+) to the left of Lab2 and
notice that the files are listed.
Project Build Options
13. There are numerous build options in the project. Most default option settings are
sufficient for getting started. We will inspect a couple of the default options at this time.
Right-click on Lab2 in the Project Explorer window and select Properties or
click:
Project Properties
14. A “Properties” window will open and in the section on the left under “Build” be sure that
the “C2000 Compiler” and “C2000 Linker” options are visible. Next, under “C2000
Linker” select the “Basic Options”. Notice that .out and .map files are being
specified. The .out file is the executable code that will be loaded into the MCU. The
.map file will contain a linker report showing memory usage and section addresses in
memory. Also notice the stack size is set to 0x300.