CMSIS-Zone (Preview)
Version 0.0.1
System Resource Management
|
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 class diagram below visualizes the overall structure of the Generator Data Model. The root element visible to the templates is FmZone.
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:
For detailed descriptions of the data model elements please refere to the JavaDoc documentation for
To get an impression of how template files might look like please refere to the simplyfied examples in this section.
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.