7.9.8.44. GEL_MapAddStr()

Adds to the memory map.

Syntax

GEL_MapAddStr(address, page, length, "attribute", waitstate );

Parameters

address Starting address of a range in memory. This Parameters can be an absolute address, any C expression, the name of a C function, or an assembly language label.
page Identifies the type of memory to fill: 0 (Program memory), 1 (Data memory) or 2 (I/O space) For processors which do not have more than one type of memory, use 0 for this Parameters. For simulated targets, the I/O Space option is not supported.
length Defines the length of the range. This Parameters can be any C expression
attribute

Defines one or more attributes for the specified memory range. The attributes must be enclosed in quotation marks. See Predefined Attribute Strings. Additional attributes may be supported for your device driver.

More than one attribute can be specified. Use the vertical bar "|" character to separate multiple attributes. For example, "R|W|P" is equivalent to "IOPORT".

Access size can be specified using "ASn", where n is the access size in bytes. For example, "R|AS4" specifies 32 bits ROM.

The attribute "SHnC" can be used to define a block of shared memory.

waitstate Defines the number of waitstates. When reading from or writing to slower external memory, the CPU waits one extra clock cycle for every waitstate. The waitstate Parameters accepts any non-negative integer value (for example: 0, 1, 2, 3).

Description

This function adds one or more attributes for a range of target memory to the memory map. If the range overlaps an existing entry, the attributes of the new range take precedence in the memory map.

Synchronous

Synchronous from GEL: Yes

Completely synchronous: Yes

Predefined Attribute Strings

String

R

W

P

EX

EM

PR

ER

DA

ASn

SHnC

CACHE

TX

MN

SA

FL

MR

NULL

Description

Read

Write

Port

External

Emulator

Programmable

Erasable

Dual access

Access size

Shared †

Cache †

Text

Monitor

Single access

Flash

Memory mapped

NULL

String

NONE

RAM

ROM

WOM

INPORT

OUTPORT

IOPORT

SARAM

DARAM

FLASH

EXRAM

EXROM

EPROM

MONITOR

PRAM

PROM

NULL

Description

No memory/protecte d

Read and write †

Read only †

Write only

Port read only

Port write only

Port read and write

Single access RAM

Dual access RAM

Flash ROM

External RAM

External ROM

Erasable write-able EPROM

Monitor ROM

Program RAM

Program ROM

NULL


Defining Shared Memory describes how to use these attributes to add a range of shared memory to the memory map.

Example

GEL_MapAddStr(0x1000, 0, 0x300, "RAM", 0);
GEL_MapAddStr(0x1000, 0, 0x300, "R|W|P", 0);
GEL_MapAddStr(0x1000, 0, 0x300, "R|W|AS1", 0);// 8 bits RAM
GEL_MapAddStr(0x1000, 0, 0x300, "R|AS4", 0); // 32 bits ROM

Related Topics

GEL_MapAdd

GEL_MapDelete

GEL_MapOn

GEL_MapOff

GEL_MapReset