Lab 2a: Linker Command File
12. In the
Sections{}
area, notice that a section called .reset has already been allocated.
The .reset section is part of the rts2800_ml.lib, and is not needed. By putting the TYPE =
DSECT modifier after its allocation, the linker will ignor this section and not allocate it.
13. Place the sections defined on the slide into the appropriate memories via the
Sections{}
area. Save your work.
Build and Load the Project
14. The top four buttons on the horizontal toolbar control code generation. Hover your
mouse over each button as you read the following descriptions:
Button
Name
Description
1
Compile File
Compile, assemble the current open file
2
Incremental Build
Compile, assemble only changed files, then link
3
Rebuild All
Compile, assemble all files, then link
4
Stop Build
Stop code generation
15. Code Composer Studio can automatically load the output file after a successful build. On
the menu bar click:
Option Customize…
and select the
“Program Load
Options”
tab, check
“Load Program After Build”
, then click
OK
.
16. Click the
“Build”
button and watch the tools run in the build window. Check for
errors (we have deliberately put an error in
Lab2.c
). When you get an error, scroll the
build window at the bottom of the Code Composer Studio screen until you see the error
message (in red), and simply double-click the error message. The editor will
automatically open the source file containing the error, and position the mouse cursor at
the correct code line.
17. Fix the error by adding a semicolon at the end of the
"z = x + y"
statement. For
future knowlege, realize that a single code error can sometimes generate multiple error
messages at build time. This was not the case here.
18. Rebuild the project (there should be no errors this time). The output file should
automatically load. The Program Counter should be pointing to
_c_int00
in the
Disassembly Window.
19. Under
Debug
on the menu bar click
“Go Main”
. This will run through the C-
environment initialization routine in the
rts2800_ml.lib
and stop at
main()
in
Lab2.c
.
Debug Enviroment Windows
It is standard debug practice to watch local and global variables while debugging code. There
are various methods for doing this in Code Composer Studio. We will examine two of them
here: memory windows, and watch windows.
20. Open a
memory window
to view the global variable
“z”
.
Click:
View Memory
on the menu bar.
C28x - Programming Development Environment
2 - 19
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...