/*=======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 \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} \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
Child Elements Description Type
.processor[n].Pname Name of the processor core. RestrictedString
.processor[n].DnumInterrupts Number of NVIC interrupts sources available to the processor core (excludes exception vectors). NonNegativeInteger
.processor[n].DnumSauRegions Number of regions in the Security Attribution Unit (SAU) of the processor core. NonNegativeInteger
*/ /**************************************************************************************************/ /** \page fm_memory memory[n] sequence element The \ref fm_memory provides a sequence of memory information.
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
Child Elements Description Type
.sau[n].start The logical start address for the region. xs:string
.sau[n].end The logical end address for the region. xs:string
.sau[n].nsc If set to 1 the region is secure, non-secure callable. SecurityTypeEnum/xs:string
.sau[n].info List of memory regions or info from \ref xml_si_region. xs:string
*/ /**************************************************************************************************/ /** \page fm_interrupt interrupt[n] sequence element The \ref fm_interrupt lists all interrupt sources available in the system. s
Parent Element Element Chain
\ref fm_system "system" \ref fm_system
Child Elements Description Type
.interrupt[n].name The name of this interrupt. xs:string
.interrupt[n].irqn The interrupt number. NonNegativeInteger
.interrupt[n].security The \ref security "security" setting for this interrupt. SecurityTypeEnum/xs:string
.interrupt[n].security.s Peripheral with related interrupt is assigned to \em "secure" state. xs:boolean
.interrupt[n].security.n Peripheral with related interrupt is assigned to \em "non-secure" state. xs:boolean
.interrupt[n].info Brief description of the interrupt source. xs:string
*/ /**************************************************************************************************/ /** \page fm_mpc_setup mpc_setup[n] element The \ref fm_mpc_setup contains a sequence of device specific configuration for the setup of the Memory Protection Controller (MPC).
Parent Element Element Chain
\ref fm_system "system" \ref fm_system
Child Elements Description Type
.mpc_setup[n].name The name of the base register that controls the MPC. xs:string
.mpc_setup[n].memory The name of the physical memory region that is connected via the MPC. xs:string
.mpc_setup[n].blk_size The block size information that CMSIS-Zone used for LUT generation. NonNegativeInteger
.mpc_setup[n].S_bit[m] A list of bit values for Secure attribute that are used to compose the LUT. NonNegativeInteger
.mpc_setup[n].P_bit[m] A list of bit values for Privileged attribute that are used to compose the LUT. NonNegativeInteger
.mpc_setup[n].bits_comment[m] The memory region information for source code comments that relate to S_bits or P_bits. xs:string
*/ /**************************************************************************************************/ /** \page fm_reg_setup reg_setup[n] element The \ref fm_reg_setup contains a sequence of device specific configuration for the setup of the interrupts.
Parent Element Element Chain
\ref fm_system "system" \ref fm_system
Child Elements Description Type
.reg_setup[n].name The name of the register or array that holds the configuration information. xs:string
.reg_setup[n].index The index value for the register array. NonNegativeInteger
.reg_setup[n].peripheral[m] An array with the peripheral names that setup belongs too. xs:string
.reg_setup[n].slot[m] An array with the slot names that setup belongs too. The value is empty when setup is not related to a slot xs:string
.reg_setup[n].value[m] An array with register setup values (corresponds to .peripheral[m] and .slot[m] above). NonNegativeInteger
*/ /**************************************************************************************************/ /** \page fm_peripheral peripheral[n] element The \ref fm_peripheral contains a sequence of all peripherals that are accessible in the zone (or system partition).
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
*/