var boardARP32 = {
CPU: {
clockRate: 200.0,
catalogName: "ti.catalog.arp32",
deviceName: "Arctic",
},
externalMemoryMap: [
["ARP32VECS", {
comment: "External memory for ARP32 interrupt vectors",
name: "ARP32VECS",
base: 0x80000000,
len: 0x00000100,
page: 0,
space: "code/data"
}],
["ARP32", {
comment: "External memory for ARP32 use",
name: "ARP32",
base: 0x80000100,
len: 0x0fffff00,
page: 1,
space: "code/data"
}]
],
codeMemory: "ARP32",
dataMemory: "DMEM",
stackMemory: "DMEM",
};
struct Platform.Board |
|
Board-level description
var obj = new Platform.Board;
obj.id = String ...
// unique id within the platform
obj.boardName = String ...
// name of the board
obj.boardFamily = String ...
// optional family name
obj.boardRevision = String ...
// optional revision string
struct Platform.Memory |
|
A named contiguous range of addresses
var obj = new Platform.Memory;
obj.comment = String ...
// description of this block
obj.name = String ...
// name of memory segment
obj.space = String ...
// "code", "data", "code/data", etc...
obj.page = UInt ...
// page of memory segment
obj.base = UInt ...
// base address of memory segment
obj.len = UInt ...
// length of memory segment
obj.access = String ...
// attributes of memory: "RWX"
obj.cacheable = Bool ...
// Is this block cacheable?
obj.cacheAttrs = Any ...
// Device specific MMU attributes
DETAILS
Memory structures are used in the description of the memory available
from CPUs and platforms.
config Platform.BOARD // module-wide |
|
Instance Config Parameters |
|
var params = new Platform.Params;
// Instance config-params object
// CPU Attributes necessary to create an execution context
id: "0",
clockRate: 1.0,
catalogName: "ti.catalog.arp32",
deviceName: "",
revision: ""
};
params.codeMemory = String null;
// The default segment for code sections
// A custom mapping of memory names to memory objects
params.dataMemory = String null;
// The default segment for data sections
// A mapping of memory names to memory objects for external memory
params.memoryExclude = Bool false;
// Section to exclude from linker command file generation
params.renameMap = String[string] undefined;
// A map for renaming memory objects
params.sectionMap = Any[string] undefined;
// A section name to SectionSpec mapping
params.sectionsExclude = String null;
// Section to exclude from linker command file generation
params.sectionsTemplate = String null;
// Replace the sections portion of the generated linker command file
params.stackMemory = String null;
// The default segment for stack
config Platform.Params.CPU // instance |
|
CPU Attributes necessary to create an execution context
var params = new Platform.Params;
...
id: "0",
clockRate: 1.0,
catalogName: "ti.catalog.arp32",
deviceName: "",
revision: ""
};
DETAILS
The platform requires these attributes to get the device internal
memory map.
SEE
config Platform.Params.codeMemory // instance |
|
The default segment for code sections
var params = new Platform.Params;
...
params.codeMemory = String null;
DETAILS
Each target has a section map with keys equal to the names of all
sections that compiler and assembler for that target generate. The
value for each key is either "code" or "data" or "stack". A linker
template reads that map and puts all "code" sections in the segment
defined by this configuration parameter.
SEE
config Platform.Params.customMemoryMap // instance |
|
A custom mapping of memory names to memory objects
var params = new Platform.Params;
...
DETAILS
This parameter allows platform instances to completely overwrite a
default memory map based on the internal memory map coming from CPU's
memory map and externalMemoryMap.
Custom memory map must fit within the default memory map, unless the
verification of the fit is disabled (see
xdc.platform).
config Platform.Params.dataMemory // instance |
|
The default segment for data sections
var params = new Platform.Params;
...
params.dataMemory = String null;
DETAILS
Each target has a section map with keys equal to the names of all
sections that compiler and assembler for that target generate. The
value for each key is either "code" or "data" or "stack". A linker
template reads that map and puts all "data" sections in the segment
defined by this configuration parameter.
SEE
config Platform.Params.externalMemoryMap // instance |
|
A mapping of memory names to memory objects for external memory
var params = new Platform.Params;
...
DETAILS
This parameter defines the external portion of the platform's memory
map.
config Platform.Params.memoryExclude // instance |
|
Section to exclude from linker command file generation
var params = new Platform.Params;
...
params.memoryExclude = Bool false;
SEE
config Platform.Params.renameMap // instance |
|
A map for renaming memory objects
var params = new Platform.Params;
...
params.renameMap = String[string] undefined;
DETAILS
This map renames memory objects. If you do not want to change
addresses in the default memory map, but you only want to rename the
existing memory objects, you should use this parameter.
This map and customMemoryMap should not be used together because this
map renames the default memory, but then customMemoryMap replaces the
default memory objects. The parameters codeMemory, dataMemory and
stackMemory are not automatically reassigned to new names. It is the
user's responsibility to set those parameters accordingly to
renameMap.
config Platform.Params.sectionMap // instance |
|
A section name to SectionSpec mapping
var params = new Platform.Params;
...
params.sectionMap = Any[string] undefined;
SEE
config Platform.Params.sectionsExclude // instance |
|
Section to exclude from linker command file generation
var params = new Platform.Params;
...
params.sectionsExclude = String null;
SEE
config Platform.Params.sectionsTemplate // instance |
|
Replace the sections portion of the generated linker command file
var params = new Platform.Params;
...
params.sectionsTemplate = String null;
SEE
config Platform.Params.stackMemory // instance |
|
The default segment for stack
var params = new Platform.Params;
...
params.stackMemory = String null;
DETAILS
Each target has a section map with keys equal to the names of all
sections that compiler and assembler for that target generate. The
value for each key is either "code" or "data" or "stack". A linker
template reads that map and puts all "stack" sections in the segment
defined by this configuration parameter.
SEE
Static Instance Creation |
|
var params =
new Platform.
Params;
// Allocate instance config-params
params.config = ...
// Assign individual configs
var inst = Platform.create(String name, params);
// Create an instance-object
ARGUMENTS
name
the name of the platform instance being created
This name is the suffix of the platform
specification supplied in the build script after
the platform name (and optional ':') prefix has
been removed. So the platform instance name
"joes.platform.foo:bar" results in the name "bar"
and the name "joes.platform.foo" result in the name
"".