EasyManuals Logo

Texas Instruments C2000 Workshop Guide And Lab Manual

Texas Instruments C2000
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #54 background imageLoading...
Page #54 background image
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.

Table of Contents

Other manuals for Texas Instruments C2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C2000 and is the answer not in the manual?

Texas Instruments C2000 Specifications

General IconGeneral
BrandTexas Instruments
ModelC2000
CategoryMicrocontrollers
LanguageEnglish

Related product manuals