
F2806x C-Code Header Files
3 - 12
C2000 Microcontroller Workshop - Peripheral Registers Header Files
Mapping Structures to Memory
The data structures describe the register set in detail. And, each instance of the data type (i.e.,
register set) is unique. Each structure is associated with an address in memory. This is done by
(1) creating a new section name via a DATA_SECTION pragma, and (2) linking the new section
name to a specific memory in the linker command file.
Linker Command Files for the Structures
F2806x_nonBIOS.cmd and F2806x_BIOS.cmd
Links each structure to
the address of the
peripheral using the
structures named
section
non-BIOS and BIOS
versions of the .cmd file
Add one of these files to
your CCS project:
F2806x_nonBIOS.cmd
or
F2806x_BIOS.cmd
MEMORY
{
PAGE1:
...
ADC: origin=0x007100, length=0x000080
...
}
SECTIONS
{
...
AdcRegsFile: > ADC PAGE = 1
...
}
F2806x_Headers_nonBIOS.cmd
#include "F2806x_Device.h"
…
#pragma DATA_SECTION(AdcRegs,"AdcRegsFile");
volatile struct ADC_REGS AdcRegs;
…
F2806x_GlobalVariableDefs.c
The header file package has two linker command file versions; one for non-BIOS projects and
one for BIOS projects. This linker command file is used to link each structure to the address of
the peripheral using the structures named section. The third and final step for using the header
files is to add the appropriate linker command file to your project.
Linker Command File
When using the header files, the user adds the MEMORY regions that correspond to the
CODE_SECTION and DATA_SECTION pragmas found in the .h and global-definitons.c file.
The user can modify their own linker command file, or use a pre-configured linker command file
such as F28069.cmd. This file has the peripheral memory regions defined and tied to the
individual peripheral.
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 ...