Nucleus Edge XML Description Files
The purpose of this chapter is to provide guidelines for the format of XML description files used in the EDGE. The chapter covers each of the four types of description files that can be used to fully describe a new target for use with EDGE. These types are core, target, peripheral and flash description files.
The below figure illustrates how the different types of description files relate to each other in fully describing a target; each target has one or more cores and can optionally have one or more peripheral description files associated with it.
In order for EDGE to recognize and use new description files added after installation, these files have to be placed in specific folders where EDGE is installed.
Further details on developing and organizing EDGE XML description files are presented in subchapters discussing each description file type.
· XML: eXtensible Markup Language. The file format used to store configuration information in the context of the debugger (see http://www.xml.org/, http://www.w3.org/).
· DTD: Document Type Definition. This is a document which specifies the proper formatting for a given type of XML file.
· Core: a part of a computer system which can be instructed to perform computation-related operations and manipulate data stored internally and externally, via external “instructions”.
· Register: a unit of core-resident data storage.
· Register Group: a grouping of registers with related purpose/functionality or related scope. Typically registers in this grouping are all available in a given processor mode, or are all related to a specific processor function.
· Memory: addressable units of off-core data storage.
· Memory Mapped Register: a “register” typically located on core that differs from a tradition core register in that the mechanism to refer to the register is not through a primitive in the instruction set (e.g. not “R13”) Instead these registers are accessed by normal memory reads and writes to certain specified addresses that are not actually located in RAM, but instead are located in hardware on the chip.
· Address Space: a distinct collection of addressable data (NOT just a distinct means of accessing the same data)
· Peripheral or I/O device: a device designed to extend the data-gathering and/or manipulation capabilities of one or more cores, usually to interface to the “real world”. Peripherals can be viewed as groups of Memory Mapped Registers. Examples: UART, Ethernet device, timer subsystem, etc.
Target description files are used to fully describe a target for use with Nucleus EDGE. Target description files describe information on a given target such as the core(s) available on the target, memory layout and memory mapped peripheral registers.
In order for EDGE to find and use the available target
description files, they have to reside in a designated folder as illustrated
below:
<EDGE_ROOT>
(Typically c:\mgc\embedded\edge_1.0)
\bin
\etc
\targets
(Target description files)
\cores
\peripherals
The targets subfolder contains other subfolders that by default divide the targets into groups based on family (i.e. processor family) and by manufacturer. For example an Atmel AT91R40807 target description file would be stored as
<EDGE_ROOT>\bin\etc\targets\ARM\Atmel\at91r40807.xml
The placement of target description files is also important in relation to
how EDGE will display the different targets when in the
debugger. In the example above, the target selection dialog would look like as
shown below:
Note: There is a maximum depth of 3 levels from the targets root folder in which target description files will be read. Any target description files that reside 4 levels or deeper under the targets root folder will not be shown as selectable targets in EDGE.
This section describes the target XML description files in in-depth detail and provides a reference for what XML tags are valid tags for this description file type and how these tags must be organized in the XML file in order to be successfully used in EDGE. There is also a listing of valid tags with descriptions and parameter lists in the last section of this chapter.
A target description file has two required tags, the root which is the <target> tag which in turn requires one or more <core> tags as children. Each <core> referenced in the description file can have its own set of registers, memory maps, peripherals and flash chip references. For each tag in the description file, there is a set of attributes (some being required) that you can also specify. For your reference, an example of a simple target description file, can be found in section "Example Target Description File" below.
|
Tag |
<target> |
||||
Required |
Yes (root) |
||||
Description |
The root node of the target description file |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Target name |
|
|
part |
Yes |
String |
Used in codelets |
|
|
initpart |
No |
String |
Used in initialization codelets |
|
Tag |
<core> |
||||
Required |
Yes (one or more) |
||||
Description |
A core present on the target |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
id |
Yes |
Unique id |
Unique core ID (typically a single digit) |
|
|
file |
Yes |
String |
Reference to core description xml file |
|
|
description |
No |
String |
Description of the core |
|
|
part |
No |
String |
Core name (e.g. ARM7TDMI) |
|
|
endianity |
No |
|
Core endianity (little or big) |
|
Tag |
<space> |
||||
Required |
No (zero or more) |
||||
Description |
Defines (or references) a memory space |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of memory space |
|
|
mau |
Yes |
Number |
Memory access unit size (in bits) |
|
|
size |
No |
Number |
Size of memory space (in bytes) |
|
Tag |
<group> |
||||
Required |
No (zero or more) |
||||
Description |
Creates a register group |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of register group |
|
Tag |
<register> |
|||||||||||||||
Required |
Yes (One or more, required by <group>) |
|||||||||||||||
Description |
Creates a memory mapped register reference |
|||||||||||||||
|
|
|
|
|||||||||||||
Attribute name |
Required |
Type |
Description |
|||||||||||||
id |
Yes |
String |
Identifier for register (i.e. SYSCFG) |
|||||||||||||
template |
No |
String |
Name of template to reference |
|||||||||||||
name |
No |
String |
Name of register (System Configuration) |
|||||||||||||
description |
No |
String |
Description of register |
|||||||||||||
location |
Yes[1] |
Number |
The absolute location of register in memory |
|||||||||||||
offset |
Yes1 |
Number |
The offset from the base of a memory mapped peripheral |
|||||||||||||
mask |
No |
Number |
Bit-mask used to mask certain bits from the register value |
|||||||||||||
rshift |
No |
Number |
Right-shift the read value n times before displaying in debugger |
|||||||||||||
lshift |
No |
Number |
Left-shift the read value n times before displaying in debugger |
|||||||||||||
width |
Yes |
Number |
The width (in bits) of the register |
|||||||||||||
access |
Yes |
|
Any combination of
|
|||||||||||||
(1- Offset and location are mutually
exclusive. If register is part of a memory mapped peripheral (in a peripheral
description file) use either offset or location. If register is defined in a
register group in a target description file, use offset.)
Tag |
<field> |
||||
Required |
No (zero or more) |
||||
Description |
Used to describe individual bits of a register |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of bitfield |
|
|
bits |
Yes |
Special |
Bits in field, given as high_bit..low_bit for example 31..16 |
|
|
description |
No |
String |
Description |
|
Tag |
<map> |
||||
Required |
No (zero or more) |
||||
Description |
Defines a memory map |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
space |
Yes |
String |
Name of existing memory space |
|
|
mau |
No |
Number |
Memory access unit size (in bits) |
|
|
size |
No |
Number |
Size of memory space (in bytes) |
|
Tag |
<region> |
||||||||||||||
Required |
Yes (one or more, required by <map>) |
||||||||||||||
Description |
Creates a new memory region |
||||||||||||||
|
|||||||||||||||
|
Attribute name |
Required |
Type |
Description |
|||||||||||
|
name |
Yes |
String |
Name of memory region |
|||||||||||
|
base |
Yes |
Number |
Base address of region |
|||||||||||
|
size |
Yes |
Number |
Size of region (inclusive) |
|||||||||||
|
width |
Yes |
Number |
Memory access width (in bits) |
|||||||||||
|
access |
Yes |
|
Any combination of
|
|||||||||||
Tag |
<peripheral> |
||||
Required |
No (zero or more) |
||||
Description |
Creates a reference to a peripheral description file |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
file |
Yes |
String |
Filename (with path[2]) of peripheral description file. |
|
|
base |
Yes |
Number |
Memory access unit size (in bits) |
|
(1-The path to the peripheral file referenced is
relative to the root peripheral folder which is found at
<EDGE_ROOT>\bin\etc\peripherals. For example, “MyPeripherals\uart1.xml”
which creates a references
to <EDGE_ROOT>\bin\etc\peripherals\MyPeripherals\uart1.xml )
Tag |
<flash> |
||||
Required |
No (zero or more) |
||||
Description |
Creates a flash device |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of register group |
|
|
base |
Yes |
Number |
Base address of flash device |
|
|
device |
Yes |
String |
Device name |
|
|
count |
Yes |
Number |
Number of bytes in flash device |
|
Tag |
<name> |
||||
Required |
No (zero or more) |
||||
Description |
Used to describe possible values of a <field> |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
value |
Yes |
Number |
A possible value for a <field> |
|
|
text |
Yes |
String |
Description for above value |
|
Core description files are used to describe characteristics and functionality that are unique to one specific core or core family. This includes core registers, co-processors, memory spaces and core-specific exceptions.
In order for EDGE to find and use the available core description files, they have to reside in a designated folder as illustrated below:
<EDGE_ROOT> (Typically c:\mgc\embedded\edge_1.0)
\bin
\etc
\targets
\cores
(Core description files)
\peripherals
This section described the core description XML files in in-depth detail and
provides a reference for what XML tags are valid tags for this description file
type and how these tags must be organized in the XML file in order to be
successfully used in EDGE. There is also a listing of valid tags with
descriptions and parameter lists in the last section of this chapter.
Core description files have two required parts, first the root tag <core>, second each core definition has to define core-specific registers and register groups. These registers are for example for ARM targets, R0 through R15, co-processor registers and so forth.
For each tag in the description file, there is a set of attributes (some
being required) that you can also specify. For your reference, an example of a
simple core description file can be found in section "Example Core
Description File".
|
Tag |
|||||
Required |
Yes (root) |
||||
Description |
The root node of the core description file |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
template |
No |
String |
Core template reference |
|
|
part |
Yes |
String |
Core part identifier |
|
|
family |
No |
String |
Core family |
|
|
isa |
Yes |
String |
Instruction Set Architecture |
|
|
endianity |
No |
|
The endianity of the core (little | big) |
|
Tag |
|||||
Required |
No (zero or more) |
||||
Description |
Defines (or references) a memory space |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of memory space |
|
|
mau |
Yes |
Number |
Memory access unit size (in bits) |
|
|
size |
No |
Number |
Size of memory space (in bytes) |
|
Tag |
|||||
Required |
No (zero or more) |
||||
Description |
Defines a memory map |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
space |
Yes |
String |
Name of core-specific memory space |
|
Tag |
|||||||||||||||||
Required |
No (zero or more) |
||||||||||||||||
Description |
Defines a register template |
||||||||||||||||
|
|||||||||||||||||
Attribute name |
Required |
Type |
Description |
|
|||||||||||||
id |
Yes |
String |
Register template identifier |
|
|||||||||||||
width |
Yes |
Number |
Register width in bits |
|
|||||||||||||
access |
Yes |
|
Size of memory space (in bytes) |
|
|||||||||||||
children |
No |
String |
Any combination of
|
|
|||||||||||||
Tag |
|||||||||||||||||
Required |
Yes (One or more, required by <group>) |
||||||||||||||||
Description |
Creates a memory mapped register reference |
||||||||||||||||
|
|||||||||||||||||
Attribute name |
Required |
Type |
Description |
|
|||||||||||||
id |
Yes |
String |
Identifier for register (i.e. SYSCFG) |
|
|||||||||||||
template |
No |
String |
Name of template to reference |
|
|||||||||||||
name |
No |
String |
Name of register (System Configuration) |
|
|||||||||||||
description |
No |
String |
Description of register |
|
|||||||||||||
location |
No |
Number |
The absolute location of register in memory |
|
|||||||||||||
width |
No |
Number |
Register width in bits |
|
|||||||||||||
float |
No |
|
Is this a floating point register? (true | false) |
|
|||||||||||||
decimalbits |
No |
Number |
Number of mantissa bits (number of bits to the right of the decimal) |
|
|||||||||||||
width |
Yes |
Number |
The width (in bits) of the register |
|
|||||||||||||
access |
Yes |
|
Any combination of
|
|
|||||||||||||
Tag |
|||||||||||||||
Required |
Yes (one or more, required by <map>) |
||||||||||||||
Description |
Creates a new memory region |
||||||||||||||
|
|||||||||||||||
|
Attribute name |
Required |
Type |
Description |
|||||||||||
|
name |
Yes |
String |
Name of memory region |
|||||||||||
|
base |
Yes |
Number |
Base address of region |
|||||||||||
|
size |
Yes |
Number |
Size of region (inclusive) |
|||||||||||
|
width |
Yes |
Number |
Memory access width (in bits) |
|||||||||||
|
access |
Yes |
|
Any combination of
|
|||||||||||
Tag |
|||||
Required |
Yes (One or more, required by <core>) |
||||
Description |
Creates a register group |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of register group |
|
Tag |
|||||
Required |
No (Zero or more) |
||||
Description |
Creates a register group |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
id |
Yes |
String |
Exception identifier |
|
|
name |
Yes |
String |
Name of exception |
|
|
description |
No |
String |
Description of exception |
|
Tag |
||||||||||||||||
Required |
No (zero or more) |
|||||||||||||||
Description |
Used to describe individual bits of a register |
|||||||||||||||
|
||||||||||||||||
Attribute name |
Required |
Type |
Description |
|||||||||||||
name |
Yes |
String |
Name of bitfield |
|||||||||||||
bits |
Yes |
Special |
Bits in field, given as high_bit..low_bit for example 31..16 |
|||||||||||||
description |
No |
String |
Description |
|||||||||||||
access |
No |
|
Any combination of
|
|||||||||||||
children |
No |
String |
|
|||||||||||||
Tag |
|||||
Required |
No (Zero or more) |
||||
Description |
Creates a register group |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Aliased register name |
|
|
target |
Yes |
String |
Original register name |
|
Tag |
|||||
Required |
No (zero or more) |
||||
Description |
Used to describe possible values of a <field> |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
value |
Yes |
Number |
A possible value for a <field> |
|
|
text |
Yes |
String |
Description for above value |
|
Peripheral description files are used to describe memory mapped peripheral registers available on a given target. Peripheral description files can also be used to describe memory mapped peripheral registers used on multiple targets, such as UART and Ethernet controllers, digital converters and so forth.
In order for EDGE to find and use the available peripheral description files, they have to reside in a designated folder as illustrated below:
<EDGE_ROOT> (Typically c:\mgc\embedded\edge_1.0)
\bin
\etc
\targets
\cores
\peripherals (Peripheral description files)
This section describes the peripheral description files in in-depth detail and provides a reference for what XML tags are valid tags for this description file type and how these tags must be organized in the XML file in order to be successfully used in EDGE. There is also a listing of valid tags with descriptions and parameter lists in the last section of this chapter.
Peripheral description files are made up of groups of memory mapped registers, separated into logical groups based on peripherals found on a given target. As mentioned earlier, registers such as those found in UART, Ethernet controllers or any other memory mapped peripheral can be defined in peripheral description files.
For each tag in the description file, there is a set of attributes (some being required) that you can also specify. For your reference, an example of a simple core description file can be found in section Error! Reference source not found..
Tag |
|||||
Required |
Yes (root) |
||||
Description |
The root node of the peripheral description file |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
template |
No |
String |
Peripheral template reference |
|
|
part |
Yes |
String |
Part identifier |
|
|
vendor |
No |
String |
Peripheral vendor identifier |
|
Tag |
|||||
Required |
No (zero or more) |
||||
Description |
Creates a register group |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
name |
Yes |
String |
Name of register group |
|
Tag |
|||||||||||||||||
Required |
No (zero or more) |
||||||||||||||||
Description |
Defines a register template |
||||||||||||||||
|
|||||||||||||||||
Attribute name |
Required |
Type |
Description |
|
|||||||||||||
id |
Yes |
String |
Register template identifier |
|
|||||||||||||
width |
Yes |
Number |
Register width in bits |
|
|||||||||||||
access |
Yes |
|
Any combination of
|
|
|||||||||||||
Tag |
|||||||||||||||||
Required |
Yes (One or more, required by <group>) |
||||||||||||||||
Description |
Creates a memory mapped register reference |
||||||||||||||||
|
|||||||||||||||||
Attribute name |
Required |
Type |
Description |
|
|||||||||||||
id |
Yes |
String |
Identifier for register (i.e. SYSCFG) |
|
|||||||||||||
template |
No |
String |
Name of template to reference |
|
|||||||||||||
name |
No |
String |
Name of register (System Configuration) |
|
|||||||||||||
description |
No |
String |
Description of register |
|
|||||||||||||
location |
Yes[3] |
Number |
The absolute location of register in memory |
|
|||||||||||||
offset |
Yes1 |
Number |
The offset from the base of a memory mapped peripheral |
|
|||||||||||||
mask |
No |
Number |
Bit-mask used to mask certain bits from the register value |
|
|||||||||||||
rshift |
No |
Number |
Right-shift the read value n times before displaying in debugger |
|
|||||||||||||
lshift |
No |
Number |
Left-shift the read value n times before displaying in debugger |
|
|||||||||||||
width |
Yes |
Number |
The width (in bits) of the register |
|
|||||||||||||
access |
Yes |
|
Any combination of
|
|
|||||||||||||
(1- Offset and location are mutually
exclusive. If register is part of a memory mapped peripheral (in a peripheral
description file) use either offset or location. If register is defined in a
register group in a target description file, use offset.)
Tag |
|||||||||||||||||||
Required |
No (zero or more) |
||||||||||||||||||
Description |
Used to describe individual bits of a register |
||||||||||||||||||
|
|||||||||||||||||||
Attribute name |
Required |
Type |
Description |
|
|||||||||||||||
name |
Yes |
String |
Name of bitfield |
|
|||||||||||||||
bits |
Yes |
Special |
Bits in field, given as high_bit..low_bit for example 31..16 |
|
|||||||||||||||
description |
No |
String |
Description |
|
|||||||||||||||
access |
No |
|
Any combination of
|
|
|||||||||||||||
Tag |
|||||
Required |
No (zero or more) |
||||
Description |
Used to describe possible values of a <field> |
||||
|
|||||
|
Attribute name |
Required |
Type |
Description |
|
|
value |
Yes |
Number |
A possible value for a <field> |
|
|
text |
Yes |
String |
Description for above value |
|
[1] Offset and location are mutually exclusive. If register is part of a memory mapped peripheral (in a peripheral description file) use either offset or location. If register is defined in a register group in a target description file, use offset.
[2] The path to the peripheral file referenced is relative to the root peripheral folder which is found at <EDGE_ROOT>\bin\etc\peripherals. For example, “MyPeripherals\uart1.xml” which creates a references to <EDGE_ROOT>\bin\etc\peripherals\MyPeripherals\uart1.xml
[3] Offset and location are mutually exclusive. If register is part of a memory mapped peripheral (in a peripheral description file) use either offset or location. If register is defined in a register group in a target description file, use offset.