/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\page GenDataModel Generator Data Model
The Generator Data Model defines the resource and partition data structure for code generators.
This data structure is connected to a FreeMarker template engine and file templates allow to generate
various files that can be used to configure development tools or hardware components.
\image html generator.png "FreeMarker Template Engine"
\section fp_toplevel FreeMarker top-level format
\subpage fm_system provides memory layout and TrustZone configuration of the complete system.
\subpage fm_zone setup information of a zone (or system partition) along with related peripherals.
\section fm_basics FreeMarker basics
The variable types relevant for CMSIS-Zone are:
\b scalar: variable that stores a single value of a scalar type
scalar-types:
- string
- int
- bool
\b hash: variable that that stores one or more variables with a unique lookup name
\b sequence: variable that stores sub-variables without names but instead are selected via index (myVariable[index])
A variable is accessed using the dollar character followed by a variable or expression in brackets:
\code
${...}
\endcode
Output the name of the zone:
\code
${zone.name}
\endcode
A sequence gets iterated:
\code
<#list zone.memory as mem>
Memory region name $mem.name
#list>
\endcode
Printing a sorted list of all available memory entries by start address
\code
<#list zone.memory?sort_by("start") as mem>
${mem.start} ${mem.name}
#list>
\endcode
\page fm_system system element
The \ref fm_system provides the memory layout and the TrustZone configuration of the complete system.
This information can be used for example, to create a linker script that defines the memory setup of the SoC system.
Child Elements |
Description |
Type |
\subpage fm_processor ".processor" |
A sequence of all processor elements available in the system resource file. |
sequence |
\subpage fm_memory ".memory" |
A sequence of all memory regions available in the system resource file. |
sequence |
\subpage fm_peripheral ".peripheral" |
A sequence of all peripherals available in the system resource file. |
sequence |
\subpage fm_sau ".sau" |
A sequence of all SAU regions for initialization. |
sequence |
\subpage fm_interrupt ".interrupt" |
A sequence of all interrupt sources available. |
sequence |
\subpage fm_mpc_setup ".mpc_setup" |
Contains the device specific configuration registers for the setup of the Memory Protection Controller (MPC). |
sequence |
\subpage fm_reg_setup ".reg_setup" |
Contains the device specific configuration registers for the setup of the peripherals. |
sequence |
\page fm_zone zone element
The \ref fm_zone provides the setup information of a zone (or system partition) along with related peripherals.
This information can be used for example, to create the MPU setup that is required for various execution zones along with
the related linker setup.
Child Elements |
Description |
Type |
.name |
The name of the zone (or system partition). |
string |
.Pname |
Name of the processor core. |
RestrictedString |
.class |
Class information for execution zones. |
string |
.security |
The \ref security "security" setting for this zone in the following separate fields. |
SecurityType |
.security.s |
Zone is executed in \em "secure" state. |
xs:boolean |
.security.n |
Zone is executed in \em "non-secure" state. |
xs:boolean |
.privilege |
The \ref privilege "privilege type" settings for this zone in the following separate fields. |
PrivilegeType |
.privilege.p |
Zone is executed in privileged level. |
xs:boolean |
.privilege.u |
Zone is executed in unprivileged level. |
xs:boolean |
\subpage fm_memory ".memory" |
A sequence of all memory regions that are accessible in the zone (or system partition). |
sequence |
\subpage fm_peripheral ".peripheral" |
A sequence of all peripherals that are accessible in the zone (or system partition). |
sequence |
\subpage fm_interrupt ".interrupt" |
A sequence of all interrupt sources that belong to peripherals that are accessible in the zone (or system partition). |
sequence |
\subpage fm_mpu_setup ".mpu_setup" |
A sequence of configuration information for the Memory Protection Unit (MPU). |
sequence |
*/
/**************************************************************************************************/
/**
\page fm_processor processor[n] sequence element
The \ref fm_processor provides a sequence of processor elements that are in the system.
Parent Element |
Element Chain |
\ref fm_system "system" |
\ref fm_system |
\ref fm_zone "zone" |
\ref fm_zone |
Child Elements |
Description |
Type |
.memory[n] |
Sequence of memory region information. |
sequence |
.memory[n].name |
The name of this memory region. |
xs:string |
.memory[n].type |
The type of memory in this region ("RAM" or "ROM"). |
MemoryTypeEnum |
.memory[n].start |
The logical start address of the memory region in the address map. |
NonNegativeInteger |
.memory[n].physical |
The physical start address of the memory region in the address map. |
NonNegativeInteger |
.memory[n].size |
The size (in bytes) of the memory region. |
NonNegativeInteger |
.memory[n].security |
The \ref security "security" setting for this memory region. |
SecurityType |
.memory[n].security.c |
Memory has non-secure callable attribute set. |
xs:boolean |
.memory[n].security.s |
Memory is access from \em "secure" state. |
xs:boolean |
.memory[n].security.n |
Memory is access from \em "non-secure" state. |
xs:boolean |
.memory[n].access |
The \ref access "access" permissions for this memory region in the following separate fields. |
AccessType |
.memory[n].access.r |
The \em read \ref access "access" permission. |
xs:boolean |
.memory[n].access.w |
The \em write \ref access "access" permission. |
xs:boolean |
.memory[n].access.x |
The \em execution \ref access "access" permission. |
xs:boolean |
.memory[n].access.p |
The \em peripheral \ref access "access" information. |
xs:boolean |
.memory[n].privilege |
The \ref privilege "privilege type" settings for this memory region in the following separate fields. |
PrivilegeType |
.memory[n].privilege.p |
The \em privileged \em level setting of \ref privilege "privilege type". |
xs:boolean |
.memory[n].privilege.u |
The \em unprivileged \em level setting of \ref privilege "privilege type". |
xs:boolean |
.memory[n].startup |
"1" specifies that this region is used for the startup code of the application. Default value is "0". |
xs:boolean |
.memory[n].uninit |
"1" specifies that this region is not zero initialized during startup. Default value is "0". |
xs:boolean |
.memory[n].shared |
"1" specifies that this region is used by multiple zones. Default value is "0". |
xs:boolean |
.memory[n].dma |
"1" specifies that this region is accessed by a DMA controller. Default value is "0". |
xs:boolean |
.memory[n].info |
Brief description of the memory region. |
xs:string |
.memory[n].linker_control |
Brief description of the memory region. |
xs:string |
*/
/**************************************************************************************************/
/**
\page fm_sau sau[n] sequence element
The \ref fm_sau lists all SAU regions for initialization in this system.
It lists all SAU regions that require either non-secure access or non-secure callable attribute.
The SAU region list is generated from:
- setup information from \ref xml_si_region
- memory regions that are assigned to zones with non-secure domain.
- memory regions that are configured as secure, non-secure callable.
Parent Element |
Element Chain |
\ref fm_system "system" |
\ref fm_system |
\ref fm_zone "zone" |
\ref fm_zone |
Child Elements |
Description |
Type |
.peripheral[n].name |
The name of the peripheral. |
xs:string |
.peripheral[n].group |
The name of the peripheral group that this peripheral belongs too. |
xs:string |
.peripheral[n].start |
The logical start address of the peripheral in the address map. |
NonNegativeInteger |
.peripheral[n].size |
The size (in bytes) of the peripheral. |
NonNegativeInteger |
.peripheral[n].security |
The \ref security "security" setting for this peripheral. |
SecurityType |
.peripheral[n].security.s |
Peripheral is assigned to \em "secure" state. |
xs:boolean |
.peripheral[n].security.n |
Peripheral is assigned to \em "non-secure" state. |
xs:boolean |
.peripheral[n].access |
The \ref access "access" permissions for this peripheral in the following separate fields. |
AccessType |
.peripheral[n].access.r |
The \em read \ref access "access" permission. |
xs:boolean |
.peripheral[n].access.w |
The \em write \ref access "access" permission. |
xs:boolean |
.peripheral[n].access.x |
The \em execution \ref access "access" permission. |
xs:boolean |
.peripheral[n].access.p |
The \em peripheral \ref access "access" information. |
xs:boolean |
.peripheral[n].privilege |
The \ref privilege "privilege type" settings for this peripheral in the following separate fields. |
PrivilegeType |
.peripheral[n].privilege.p |
The \em privileged \em level setting of \ref privilege "privilege type". |
xs:boolean |
.peripheral[n].privilege.u |
The \em unprivileged \em level setting of \ref privilege "privilege type". |
xs:boolean |
.peripheral[n].shared |
"1" specifies that this peripheral is used by multiple zones. Default value is "0". |
xs:boolean |
.peripheral[n].dma |
"1" specifies that this peripheral is accessed by a DMA controller. Default value is "0". |
xs:boolean |
.peripheral[n].info |
Brief description of the peripheral region. |
xs:string |
*/
/**************************************************************************************************/
/**
\page fm_mpu_setup mpu_setup element
The \ref fm_mpu_setup contains the configuration information for the Memory Protection Unit (MPU).
Parent Element |
Element Chain |
\ref fm_system "zone" |
\ref fm_zone |
Child Elements |
Description |
Type |
mpu_setup.type |
Implementation of the MPU ("v7M" or "v8M"). |
xs:string |
mpu_setup.region[n] |
Sequence of MPU region settings. |
sequence |
mpu_setup.region[n].start |
The base address of the region. |
xs:string |
mpu_setup.region[n].end |
The end address of the region. |
xs:string |
mpu_setup.region[n].access.r |
The \em read \ref access "access" permission setting for the region. |
xs:boolean |
mpu_setup.region[n].access.w |
The \em write \ref access "access" permission setting for the region. |
xs:boolean |
mpu_setup.region[n].access.x |
The \em execution \ref access "access" permission setting for the region. |
xs:boolean |
mpu_setup.region[n].access.p |
The \em peripheral \ref access "access" information setting for the region. |
xs:boolean |
mpu_setup.region[n].privileged |
'1' indicates that the region is set to Privileged mode. |
xs:boolean |
mpu_setup.region[n].shared |
'1' indicates that the region is shared across various processors. |
xs:boolean |
mpu_setup.region[n].dma |
'1' indicates that the region is accessed by a DMA controller. |
xs:boolean |
mpu_setup.region[n].rom |
'1' indicates that the memory type of that region is ROM ('0' for RAM or peripheral). |
xs:boolean |
mpu_setup.region[n].addr_v7M |
Only for v7M: Region base address field value for v7M register MPU_RBAR. |
xs:string |
mpu_setup.region[n].size_v7M |
Only for v7M: Block size field value for v7M register MPU_RASR (examples: 4=32bytes, 9=1KB, 19=1MB). |
xs:string |
mpu_setup.region[n].srd_v7M |
Only for v7M: Subregion disable value for v7M register MPU_RASR. |
xs:string |
*/