TI C2000: Memory-Map and and Linker Command File

Work in Process

Stay updated with the TI C2000 Real-time Microcontroller blogs
TI C2000 Real-Time Microcontroller: Control, Sensing, and Communication

TMS320F28x7x Memory Map

The F28x7x MCU utilizes a memory map where the unified memory blocks can be accessed in either program space, data space, or both spaces. This type of memory map lends itself well for supporting high-level programming languages. The memory structure consisting of dedicated RAM blocks, shared local RAM blocks, shared global RAM blocks, message RAM blocks, Flash, and one-time programmable (OTP) memory. The Boot is factory programmed with boot software routines and standard tables used in math related algorithms.

The C28x CPU core contains no memory, but can access on-chip and off-chip memory. The C28x uses 32-bit data addresses and 22-bit program addresses. This allows for a total address reach of 4G words (1 word = 16-bits) in data memory and 4M words in program memory.

There are four dedicated RAM block (M0, M1, D0, and D1) which are tightly coupled with the CPU, and only the CPU has access to them. The PIE Vectors are a special memory area containing the vectors for the peripheral interrupts. The six local shared memory blocks, LS0 through LS5, are accessible by its CPU and CLA. Global shared memory blocks GS0 through GS15 on the F2837x and through GS7 on the F2807x are accessible by CPU and DMA.

There are two types of message RAM blocks: CPU message RAM blocks and CLA message RAM blocks. The CPU message RAM blocks are used to share data between CPU1 subsystem and CPU2 subsystem in a dual-core device via inter-processor communications. The CLA message RAM blocks are used to share date between the CPU and CLA.

The user OTP is a one-time, programmable, memory block which contains device specific calibration data for the ADC, internal oscillators, and buffered DACs, in addition to settings used by the flash state machine for erase and program operations. Additionally, it contains locations for programming security settings, such as passwords for selectively securing memory blocks, configuring the standalone boot process, as well as selecting the boot-mode pins in case the factory-default pins cannot be used. This information is programmed into the dual code security module (DCSM). The flash memory is primarily used to store program code, but can also be used to store static data. Notice that the external memory interface is assigned a region within the memory map. The boot ROM and boot ROM vectors are located at the bottom of the memory map.

TMS320F2837xD Memory Map

MEMORYSIZESTART ADDRESSEND ADDRESS
M0 RAM1K × 160x0000 00000x0000 03FF
M1 RAM1K × 160x0000 04000x0000 07FF
PieVectTable512 × 160x0000 0D000x0000 0EFF
CPUx.CLA1 to CPUx128 × 160x0000 14800x0000 14FF
CPUx to CPUx.CLA1128 × 160x0000 15000x0000 157F
UPP TX MSG RAM512 × 160x0000 6C000x0000 6DFF
UPP RX MSG RAM512 × 160x0000 6E000x0000 6FFF
LS0 RAM2K × 160x0000 80000x0000 87FF
LS1 RAM2K × 160x0000 88000x0000 8FFF
LS2 RAM2K × 160x0000 90000x0000 97FF
LS3 RAM2K × 160x0000 98000x0000 9FFF
LS4 RAM2K × 160x0000 A0000x0000 A7FF
LS5 RAM2K × 160x0000 A8000x0000 AFFF
D0 RAM2K × 160x0000 B0000x0000 B7FF
D1 RAM2K × 160x0000 B8000x0000 BFFF
GS0 RAM4K × 160x0000 C0000x0000 CFFF
GS1 RAM4K × 160x0000 D0000x0000 DFFF
GS2 RAM4K × 160x0000 E0000x0000 EFFF
GS3 RAM4K × 160x0000 F0000x0000 FFFF
GS4 RAM4K × 160x0001 00000x0001 0FFF
GS5 RAM4K × 160x0001 10000x0001 1FFF
GS6 RAM4K × 160x0001 20000x0001 2FFF
GS7 RAM4K × 160x0001 30000x0001 3FFF
GS8 RAM4K × 160x0001 40000x0001 4FFF
GS9 RAM4K × 160x0001 50000x0001 5FFF
GS10 RAM4K × 160x0001 60000x0001 6FFF
GS11 RAM4K × 160x0001 70000x0001 7FFF
GS12 RAM4K × 160x0001 80000x0001 8FFF
GS13 RAM4K × 160x0001 90000x0001 9FFF
GS14 RAM4K × 160x0001 A0000x0001 AFFF
GS15 RAM4K × 160x0001 B0000x0001 BFFF
CPU2 to CPU1 RAM1K × 160x0003 F8000x0003 FBFF
CPU1 to CPU2 RAM1K × 160x0003 FC000x0003 FFFF
CAN A MSGRAM2K × 160x0004 90000x0004 97FF
CAN B MSGRAM2K × 160x0004 B0000x0004 B7FF
Flash256K × 160x0008 00000x000B FFFF
Secure ROM32K × 160x003F 00000x003F 7FFF
Boot ROM32K × 160x003F 80000x003F FFBF
Vectors64 × 160x003F FFC00x003F FFFF
TMS320C28x C/C++ COFF and EABI Data Types

Even though pointers are 32-bits, the compiler assumes that the addresses of global variables and functions are within 22-bits.

  • COFF: Common Object File Format
  • EABI: Embedded Application Binary Interface
COFF (Legacy)EABI (Modern)
char16 bits16 bits
enum16 bits16 bits
int16 bits16 bits
long32 bits32 bits
float32 bits32 bits
pointers32 bits32 bits
double32 bits64 bits
wchar_t16 bits (int)32 bits (long)
TMS320F28x7x Linker Command File

Numerous modules are joined to form a complete program by using the linker. The linker efficiently allocates the resources available on the device to each module in the system. The linker uses a command (.CMD) file to identify the memory resources and placement of where the various sections within each module are to go. Outputs of the linking process includes the linked object file (.OUT), which runs on the device, and can include a .MAP file which identifies where each linked section is located.

There are many linker options but these four handle all of the basic needs
  • -o specifies the output (executable) filename
  • -m creates a map file. This file reports the linker’s results
  • -c tells the compiler to auto initialize your global and static variables
  • -x tells the compiler to exhaustively read the libraries. Without this option libraries are searched only once, and therefore backwards references may not be resolved
To help make sense of the many compiler options, TI provides two default sets of options (configurations) in each new project you create. The Release (optimized) configuration invokes the optimizer with –o3 and disables source-level, symbolic debugging by omitting –g (which disables some optimizations to enable debug).





Back to top of the page
This entry was posted in Embedded System. Bookmark the permalink.