![Texas Instruments C2000 Piccolo LaunchPad Workshop Manual And Lab Manual Download Page 34](http://html.mh-extra.com/html/texas-instruments/c2000-piccolo-launchpad/c2000-piccolo-launchpad_workshop-manual-and-lab-manual_1094583034.webp)
Creating a Linker Command File
2 - 16
C2000 Microcontroller Workshop - Programming Development Environment
MEMORY
{
M0SARAM: origin = 0x000000 , length = 0x0400
M1SARAM: origin = 0x000400 , length = 0x0400
}
Remember that the MCU has two memory maps:
Program
, and
Data
. Therefore, the MEMORY
description must describe each of these separately. The loader uses the following syntax to
delineate each of these:
Linker Page
TI Definition
Page 0
Program
Page 1
Data
Linker Command File
SECTIONS
{
.text:> FLASH PAGE = 0
.ebss:> M0SARAM PAGE = 1
.cinit:> FLASH PAGE = 0
.stack:>
M1SARAM
PAGE = 1
}
MEMORY
{
PAGE 0: /* Program Memory */
FLASH: origin = 0x3E8000, length = 0x10000
PAGE 1: /* Data Memory */
M0SARAM: origin = 0x000000, length = 0x400
M1SARAM: origin = 0x000400, length = 0x400
}
A linker command file consists of two sections, a memory section and a sections section. In the
memory section, page 0 defines the program memory space, and page 1 defines the data memory
space. Each memory block is given a unique name, along with its origin and length. In the
sections section, the section is directed to the appropriate memory block.
Section Placement
The SECTIONS section will specify how you want the sections to be distributed through
memory. The following code is used to link the sections into the memory specified in the
previous example:
Summary of Contents for C2000 Piccolo LaunchPad
Page 74: ...Interrupts 4 18 C2000 Microcontroller Workshop Reset and Interrupts ...
Page 100: ...Lab 5 System Initialization 5 26 C2000 Microcontroller Workshop System Initialization ...
Page 218: ...Lab 8 IQmath FIR Filter 8 42 C2000 Microcontroller Workshop Numerical Concepts ...
Page 334: ...F28069 controlCARD A 4 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 ...
Page 336: ...F28035 controlCARD A 6 C2000 Microcontroller Workshop Appendix A Experimenter s Kit SW2 SW3 ...