CMSIS-Zone: Added first FreeMarker template example to Generator Data Model documentation.
@@ -10,9 +10,10 @@ template engine to generate arbitrary project files, see picture below..
\image html generator.png "FreeMarker Template Engine"
-\section Data Model Structure
+\section GenDataModel_Structure Data Model Structure
-The class diagram below visualizes the overall structure of the <b>Generator Data Model</b>.
+The class diagram below visualizes the overall structure of the <b>Generator Data Model</b>. The root element visible to
+the templates is FmZone.
\image html genmodel.png "Generator Data Model Class Diagram"
@@ -24,8 +25,8 @@ The reference implementation documented in detail below make use of the default
named like \em get<Attribute> or \em is<Attribute> to be visible just as <i><Attribute></i> to the template.
Please take note about the multiplicities stated in the diagram:
-- 0..1 indicates an optional scalar value which might be unavailable, consider using <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing" target="_blank">missing value handler operators</a>.
-- 1 indicates a mandatory scalar value which is guaranteed to be valid.
+- 0..1 indicates an optional value which might be unavailable, consider using <a href="http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing" target="_blank">missing value handler operators</a>.
+- 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.
@@ -37,6 +38,32 @@ For detailed descriptions of the data model elements please refere to the
- <a href="../genmodel/com/arm/cmsis/zone/gen/data/FmProcesor.html" target="_blank">FmProcesor</a>
- <a href="../genmodel/com/arm/cmsis/zone/gen/data/FmBlock.html" target="_blank">FmBlock</a>
-\section Template Examples
+\section GenDataModel_Examples Template Examples
+
+To get an impression of how template files might look like please refere to the simplyfied examples
+in this section.
+
+\subsection GenDataModel_Examples_AssignedBlocks 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.
+
+\code
+<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>
+</#list>
+</table>
+\endcode
*/
