From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/Zone/html/GenDataModel.html | 72 ++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 44 deletions(-) (limited to 'docs/Zone/html/GenDataModel.html') diff --git a/docs/Zone/html/GenDataModel.html b/docs/Zone/html/GenDataModel.html index 3e2c40f..5cff952 100644 --- a/docs/Zone/html/GenDataModel.html +++ b/docs/Zone/html/GenDataModel.html @@ -32,7 +32,7 @@ Logo
CMSIS-Zone (Preview) -  Version 0.0.1 +  Version 0.9.2
System Resource Management
@@ -110,61 +110,45 @@ $(document).ready(function(){initNavTree('GenDataModel.html','');});
Generator Data Model
-

The Generator Data Model defines the view on the Zone Description for code generators. By defining a common data model code generators can be developed independendly from actual CMSIS Zone Projects and vendor tools.

-

The CMSIS-Zone data (structured according to the Generator Data Model) is combined with file templates using the FreeMarker template engine to generate arbitrary project files, see picture below..

+

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.

generator.png
FreeMarker Template Engine
-

-Data Model Structure

-

The class diagram below visualizes the overall structure of the Generator Data Model. The root element visible to the templates is FmZone.

-
-genmodel.png -
-Generator Data Model Class Diagram
-

According to FreeMarker Documentation one can access the named attributes like retrieving data from a hash. The reference implementation documented in detail below make use of the default FreeMarker Bean wrapper. This leads to all Java methods named like get<Attribute> or is<Attribute> to be visible just as <Attribute> to the template.

-

Please take note about the multiplicities stated in the diagram:

-
    -
  • 0..1 indicates an optional value which might be unavailable, consider using missing value handler operators.
  • -
  • 1 indicates a mandatory value which is guaranteed to be valid.
  • -
  • 0..* indicates a collection or hash of values which might be empty.
  • -
  • 1..* indicates a collection or hash of values which is guaranteed to contain at least one element.
  • -
-

For detailed descriptions of the data model elements please refere to the JavaDoc documentation for

+

+FreeMarker top-level format

+

system element provides memory layout and TrustZone configuration of the complete system. zone element setup information of a zone (or system partition) along with related peripherals.

+

+FreeMarker basics

+

The variable types relevant for CMSIS-Zone are:

+

scalar: variable that stores a single value of a scalar type scalar-types:

-

-Template Examples

-

To get an impression of how template files might look like please refere to the simplyfied examples in this section.

-

-HTML table of all assigned memory blocks

-

This examples demonstrates how to iterate over the collection of memory blocks assigned to the project zone currently evaluated. The result of the template below is a HTML table with three columns listing block name, start address and size, respectively.

-
<table>
-
<th>
-
<td>Name</td>
-
<td>Start</td>
-
<td>Size</td>
-
</th>
-
<#list blocks as block>
-
<tr>
-
<td>${block.name}</td>
-
<td>${block.start}</td>
-
<td>${block.size}</td>
-
</tr>
+

hash: variable that that stores one or more variables with a unique lookup name

+

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:

+
${...}
+

Output the name of the zone:

+
${zone.name}
+

A sequence gets iterated:

+
<#list zone.memory as mem>
+
Memory region name $mem.name
+
</#list
+
+
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>
-
</table>