Linking Boot code from RTS2800.lib
Linking Boot code from RTS2800.lib
Boot.ASM
Boot.ASM
-
-
Invoked With
Invoked With
“
“
-
-
C
C
”
”
Reset : PC <
Reset : PC <
-
-
*0x3F FFC0
*0x3F FFC0
_main ...
_main ...
1. Allocate stack
1. Allocate stack
2. Init SP to top of stack
2. Init SP to top of stack
3. Initialize status bits
3. Initialize status bits
4. Copy .
4. Copy .
cinit
cinit
to .bss (skip if “
to .bss (skip if “
-
-
cr”)
cr”)
5. Call “_main”
5. Call “_main”
_c_int00
_c_int00
.ref
.ref
_c_int00
_c_int00
Reset:
Reset:
.long
.long
_c_int00
_c_int00
vectors.
vectors.
asm
asm
The boot routine is used to establish the environment for C before launching main. The boot
routine begins with the label _c_int00 and the reset vector should contain a ".long" to this address
to make boot.asm the reset routine. The contents of the boot routine have been extracted and
copied on the following page so they may be inspected. Note the various functions performed by
the boot routine, including the allocation and setup of the stack, setting of various C-requisite
statuses, the initialization of global and static variables, and the call to main. Note that if the link
was performed using the "–cr" option instead of the "–c" option that the global/static variable
initialization is
not
performed. This is useful on RAM-based C28x systems that were initialized
during reset by some external host processor, making transfer of initialization values unnecessary.
Later on in this chapter, there is an example on how to do the vectors in C code rather than
assembly.
C28x – C Programming
D - 3
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 ...