XML_Format.txt 48.1 KB
Newer Older
1
2
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
3
\page zoneFormat Zone Description Format 
4

5
The <b>Zone Description Format</b> is a tool agnostic storage format and is split into:
6

7
 - <b>Resource File</b> that describes the system resources available. 
8
 - <b>Assignment File</b> that describes the resource partitioning.
9

10
11
The combination of both <b>Resource File</b> and <b>Assignment File</b> can be used to create a new derived <b>Resource File</b> that only
contains the resources available for this project. It is therefore possible to split the resources incrementally as needed.
12

13
14
A <b>Resource File</b> can therefore describe: 
 - A complete embedded system including device with one or more processors, external memory and/or external peripheral components.
15
 - TrustZone definition and initial setting for Secure Attribute Unit
16
 - A resource partition for an independent software project (i.e. boot loader, user application, secure partition) that implement the application for the system.
17

18
19
20
21
A <b>Assignment File</b> allows to specify either:
 - The partitioning of a system into multiple independent software projects.
 - The configuration of a Memory Protection Unit (MPU) for functional segregation of a software project. 
 
22
\note It is impossible to use a single <b>Assignment File</b> for both, partitioning of software projects and MPU configuration.
23
24
25


\section XML_Format_Schema Overall XML structure
26

27
28
The CMSIS-Zone utility uses two XML files to store system and configuration information. The structure these XML files
is described with schema files that are located in the ARM.CMSIS pack in the directory .\\CMSIS\\Utilities.
29

30
31
 File type  | Schema file   | Description
:-----------|:--------------|:-------------
32
*.rzone     | rzone.xsd     | Stores the system resources (processors, memory, peripherals) available.
33
*.azone     | azone.xsd     | Stores the system partitioning which includes assignments and memory splits for a related .rzone file.
34

35
\anchor rzone
36
Top-level .rzone XML elements
37
=============================
38
39
 - \subpage xml_rzone_pg "<rzone>" is the root element of the *.rzone file.
 - \ref xml_creator "<creator>" describes the creation for this *.rzone file.
40
 - \ref xml_device "<device>" describes the device that is part of the system. It may contain one or more processors.
41
 - \ref xml_resources "<resources>" describes the memory and peripheral resources of the system.
42

43
44

Structure of .rzone XML file
45
----------------------------
46

47
\code
48
49
50
<rzone>                  // root element of system zone file
  <creator>              // describes how this rzone file was created
  
51
52
53
  <device>               // device information
    <package/>           // software pack that defines device
    <processor/>         // processor information
54
  </device>
55

56
  
57
  <resources>            // physical resources off-chip 
58
59
60
61
    <sau_init>           // fixed SAU settings required for system
      <region/>          // region setting for SAU
    </sau_init>
	
62
63
64
    <memories>           // memories section  
      <memory>           // memory resource
    </memories>
65
    
66
67
    <peripherals>        // peripheral resources off-chip
      { <group> }        // peripheral group (optional)
68
      <peripheral>       // peripheral description
69
70
         <interrupt/>    // optional interrupts for peripheral
         <setup/>        // optional register setup for peripheral
71
72
      </peripheral>
      { </group> }       // peripheral group (optional)
73
74
    </peripherals>
  </resources>
75
</rzone>
76
\endcode
77

78
\anchor azone
79
Top-level .azone XML elements
80
=============================
81
82
 - \subpage xml_azone_pg "<azone>" is the root element of the *.azone file.
 - \ref xml_configure "<configure>" controls the behavior of the CMSIS-Zone utility (project or MPU assignments).
83
 - \ref xml_partition "<partition>" defines memory partitions that split available system memory.
84
 - \ref xml_zones "<zones>" defines the assignment of memory, block, and peripherals.
85
86

\code
87
<azone>
88
  <rzone>                // Refers related .rzone file
89
  <configure>            // CMSIS-Zone utility UI behavior
90
  
91
92
93
  <partition>            // memory partition information
    <memory>             // memory split information 
  </partition>
94
  
95
96
  <zones>                // zone assignments
    <zone>               // project zone name
97
98
99
      <assign>           // used peripheral or memory
        <interrupt/>     // for peripherals optional interrupt usage
      </assign>
100
    </zone>
101
  </zones>
102
</azone>
103
\endcode
104

105
\anchor security
106
107
Security Type
=============
108
The attribute \em security defines the security setting for a memory or peripheral region.
109
Only one of the settings is allow:
reinhardkeil's avatar
reinhardkeil committed
110
111
 - \<empty\> security not defined (default) 
 - 'n'  non-secure
112
113
114
115
 - 'c'  secure on non-secure callable  
 - 's'  secure
 
\anchor access
116
117
Access Type
===========
118
119
120
121
122
123
The attribute \em access defines the access permission for a memory or peripheral region.
Multiple settings are allow:
 - 'r'  read  
 - 'w'  write
 - 'x'  execute
 - 'p'  peripheral</td>
124
125
126
127
128
129
130
131
132

\anchor privilege
Privilege Type
==============
The attribute \em privilege defines the privilege level that is required for memory/peripheral access or code execution in a MPU zone.
Only one of the settings is allow:
  - \<empty\> privilege level not specified
  - 'u' unprivileged level
  - 'p' privileged level
133
*/
134
135
136

/**************************************************************************************************/
/**
137
138
139
\page xml_rzone_pg /rzone element

The \ref xml_rzone_pg element is the root element of the .rzone file which describes the resources (processors, memory, peripherals) available.
140
141


142
<table class="cmtable" summary="Element: rzone">
143
144
145
146
147
148
149
150
151
152
153
154
155
156
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
    <td>root</td>
    <td colspan=3>Document root</td>
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
157
158
  <tr>
    <td>schemaVersion</td>
159
    <td>CMSIS-Zone schema version used for describing the *.rzone file.</td>
160
161
162
    <td>VersionType</td>
    <td>required</td>
  </tr>
163
164
165
166
167
168
169
170
  <tr>
    <td>xmlns:xs</td>
    <td>Is set to: \token{"http://www.w3.org/2001/XMLSchema-instance"} to indicate compliance to the XML format.</td>
    <td>xs:decimal</td>
    <td>required</td>
  </tr>
  <tr>
    <td>xs:noNamespaceSchemaLocation</td>
171
    <td>File name of the schema file. For example, \token{"rzone.xsd"}.</td>
172
173
174
175
176
177
178
179
180
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
181
182
183
184
185
186
  <tr>
    <td>\subpage xml_creator "creator"</td>
    <td>Specifies how a derived .rzone file was created.</td>
    <td>CreatorType</td>
    <td>optional</td>
  </tr>
187
  <tr>
188
    <td>\subpage xml_device "device"</td>
189
    <td>Device that includes one or more processing element (PE).</td>
190
191
    <td>DeviceType</td>
    <td>1..1 </td>
192
193
  </tr>
  <tr>
194
    <td>\subpage xml_resources "resources"</td>
195
196
197
    <td>Physical resources (memory and peripherals) that are available in the system.</td>
    <td>SResourceType</td>
    <td>1..1 </td>
198
  </tr>
199
200
201
202
203
204
205
206
207
208
209
</table>
*/


/**************************************************************************************************/
/**
\page xml_creator /rzone/creator element

The \ref xml_creator specifies how a derived .rzone file was created.

<table class="cmtable" summary="Element: device">
210
  <tr>
211
212
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
213
214
  </tr>
  <tr>
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
    <td>\ref xml_rzone_pg "rzone"</td>
    <td colspan=3>\ref xml_rzone_pg</td>
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>rzone</td>
    <td>Name of the .rzone file which contained top level resources.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>azone</td>
    <td>Name of the .azone file which contained related assignments.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>zone</td>
    <td>Name of the zone that is represented in this derived .rzone file.</td>
    <td>xs:string</td>
240
    <td>required</td>
241
242
243
244
245
  </tr>
</table>
*/


246
247
/**************************************************************************************************/
/**
248
\page xml_device /rzone/device element
249

250
The \ref xml_device specifies the device of the system that integrates the processors.
251

252
<table class="cmtable" summary="Element: device">
253
254
255
256
257
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
258
259
    <td>\ref xml_rzone_pg "rzone"</td>
    <td colspan=3>\ref xml_rzone_pg</td>
260
261
262
263
264
265
266
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
267
268
269
270
271
272
  <tr>
    <td>Dvendor</td>
    <td>The devices vendor identifier.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
273
274
  <tr>
    <td>Dname</td>
275
276
    <td>Specifies the name of the device. Only alphabetical characters, decimal digits, '-' and '_' are allowed.</td>
    <td>RestrictedString</td>
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
    <td>required</td>
  </tr>
  <tr>
    <td>info</td>
    <td>Brief description of the device.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>  
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
292
    <td>\ref xml_package "package"</td>
293
294
295
296
297
    <td>Optional reference to the Software Pack this device is provided by.</td>
    <td>complexType</td>
    <td>0..1</td>
  </tr>
  <tr>
298
    <td>\ref xml_processor "processor"</td>
299
300
301
302
303
304
305
    <td>Processing elements and associated features embedded in the device.</td>
    <td>complexType</td>
    <td>1..*</td>
  </tr>
</table>


306
\section xml_package /rzone/device/package element
307

308
The \ref xml_package refers to the Software Pack that provides the Device Family Pack (DFP) for the \ref xml_device "device". 
309

310
<table class="cmtable" summary="Element: package">
311
312
313
314
315
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
316
317
    <td>\ref xml_device "device"</td>
    <td colspan=3>\ref xml_device</td>
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>name</td>
    <td>The unique pack name.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>url</td>
    <td>The URL the pack can be obtained from.</td>
    <td>xs:string</td>
335
    <td>optional</td>
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
  </tr>
  <tr>
    <td>vendor</td>
    <td>The pack vendor name.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>version</td>
    <td>The pack version.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>info</td>
    <td>Brief description of the Software Pack.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>    
</table>


358
\section xml_processor /rzone/device/processor element
359

360
361
The \ref xml_processor defines the processing elements integrated in the \ref xml_device "device".
The information in this element is identical with CMSIS-Pack, except that it provides an additional 'info' attribute.
362

363
<table class="cmtable" summary="Element: processor">
364
365
366
367
368
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
369
370
    <td>\ref xml_device "device"</td>
    <td colspan=3>\ref xml_device</td>
371
372
373
374
375
376
377
378
379
380
381
382
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>Pname</td>
    <td>Processor identifier. This attribute <b>is mandatory for devices that embed multiple processors</b>. 
    </td>
    <td>RestrictedString</td>
383
384
385
386
387
388
389
    <td>required for all multi-core devices</td>
  </tr>
  <tr>
    <td>Punits</td>
    <td>Specifies the number of processor units in a symmetric multi-processor core (MPCore). Defaults to single-core CPU (\token{1}) when left empty.</td>
    <td>InstancesType</td>
    <td>required for all multi-core devices</td>
390
391
392
  </tr>
  <tr>
    <td>Dcore</td>
393
    <td>Specifies the processor core.</td>
394
    <td>DcoreEnum</td>
395
    <td>required</td>
396
397
398
  </tr>
  <tr>
    <td>Dfpu</td>
399
    <td>Specifies whether a hardware Floating Point Unit is present in the processor.</td>
400
    <td>DfpuEnum</td>
401
    <td>required</td>
402
403
404
  </tr>
  <tr>
    <td>Dmpu</td>
405
    <td>Specifies whether a Memory Protection Unit is present in the processor.</td>
406
    <td>DmpuEnum</td>
407
    <td>required</td>
408
409
410
  </tr>
  <tr>
    <td>Dtz</td>
Jonatan Antoni's avatar
Jonatan Antoni committed
411
    <td>Specifies whether an Armv8-M based device implements TrustZone.</td>
412
    <td>DtzEnum</td>
413
    <td>required for ARMv8-M based devices</td>
414
415
416
  </tr>
  <tr>
    <td>Ddsp</td>
417
    <td>Specifies whether a device supports the DSP instructions set.</td>
418
    <td>DdspEnum</td>
419
    <td>required</td>
420
421
422
  </tr>
  <tr>
    <td>Dendian</td>
423
    <td>Specifies the endianess of the processor.</td>
424
    <td>DendianEnum</td>
425
    <td>required</td>
426
427
428
429
430
  </tr>
  <tr>
    <td>Dclock</td>
    <td>Specifies the max clock frequency of the processor subsystem</td>
    <td>xs:unsignedInt</td>
431
    <td>required</td>
432
433
434
435
436
437
438
439
440
441
442
443
444
  </tr>
  <tr>
    <td>DcoreVersion</td>
    <td>Hardware revision of the processor core</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>info</td>
    <td>Brief description of the processor.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>  
445
446
447
448
</table>

*/

449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\page xml_resources /rzone/resources element

The \ref xml_resources defines the memory and peripheral regions that are available.

<table class="cmtable" summary="Element: resources">
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
    <td>\ref xml_rzone_pg "rzone"</td>
    <td colspan=3>\ref xml_rzone_pg</td>
  </tr>
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
    <td>\subpage xml_sau_init "sau_init"</td>
    <td>Fixed SAU settings required for this system, i.e. to access peripherals.</td>
    <td>SauInitType</td>
    <td>0..1 </td>
  </tr>
  <tr>
    <td>\subpage xml_memories "memories"</td>
    <td>List of all memory regions available in this system. Some memory region might restrict the availability to specific processors.</td>
    <td>complexType</td>
    <td>0..1</td>
  </tr>
  <tr>
    <td>\subpage xml_peripherals "peripherals"</td>
    <td>List of all peripherals available for this system.</td>
    <td>complexType</td>
    <td>0..1</td>
  </tr>
</table>

*/

493
494
/**************************************************************************************************/
/**
495
\page xml_sau_init /rzone/resources/sau_init element
496
497
498
499
500
501
502
503
504

The \ref xml_sau_init specifies fixed Secure Attribute Unit (SAU) settings required for this system, for example a configuration that is required to access peripherals.

<table class="cmtable" summary="Element: sau_init">
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
505
506
    <td>\ref xml_resources "resources"</td>
    <td colspan=3>\ref xml_resources</td>
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
  </tr>
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
    <td>\ref xml_si_region "region"</td>
    <td>Region settings for the SAU.</td>
    <td>complexType</td>
    <td>1..*</td>
  </tr>
</table>


\section xml_si_region /rzone/sau_init/region element

The \ref xml_si_region contains the region setting for SAU initialization. 

<table class="cmtable" summary="Element: region">
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
    <td>\ref xml_sau_init "sau_init"</td>
    <td colspan=3>\ref xml_sau_init</td>
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>Pref</td>
    <td>The processor(s) that require this setting. If omitted all processors get this setting.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>start</td>
    <td>The logical start address for the region.</td>
    <td>NonNegativeInteger</td>
    <td>required</td>
  </tr>
  <tr>
    <td>size</td>
    <td>The size for the region.</td>
    <td>NonNegativeInteger</td>
    <td>required</td>
  </tr>
  <tr>
    <td>security</td>
    <td>\ref security "Security" attributes for this memory region.</td>
    <td>\ref security "SecurityType"</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>info</td>
    <td>Brief description of region setting (for comments in source code).</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>  
</table>

*/

576
577
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
578
\page xml_memories /rzone/resources/memories element
579

580
The \ref xml_memories contains a list of all memory regions available in this system. Some memory region might restrict the availability to specific processors.
581

582
583
<b>Example</b>
\code
584
<resources>
585
586
587
588
589
590
591
592
593
594
595
596
  <memories>
    <memory name="ExtMem1"    start="0x00000000" physical="0x00000000" size="0x00010000" access="rwx" security=""  type="RAM" info="External memory 1 / remap" external="true" />
    <memory name="Flash_NS"   start="0x08000000"                       size="0x00080000" access="rx"  security=""  type="ROM" info="Flash Memory (non secure)"                 />
    <memory name="Flash_S"    start="0x0c000000" physical="0x08001000" size="0x00080000" access="rx"  security="c" type="ROM" info="Flash Memory (secure)"                     />

    <memory name="SRAM1_C_NS" start="0x0A000000"                       size="0x00030000" access="rwx" security=""  type="RAM" info="SRAM1 Code (non secure)"   />
    <memory name="SRAM1_C_S"  start="0x0E000000" physical="0x0A000000" size="0x00030000" access="rwx" security="c" type="RAM" info="SRAM1 Code (secure)"       />
    <memory name="SRAM1_S"    start="0x30000000" physical="0x0A000000" size="0x00030000" access="rw"  security="s" type="RAM" info="SRAM1 (secure)"            />
    <memory name="SRAM1_NS"   start="0x20000000" physical="0x0A000000" size="0x00030000" access="rw"  security=""  type="RAM" info="SRAM1 (non secure)"        />

    <memory name="FMC_Bank1"  start="0x60000000"                       size="0x00000000" access="rw" security=""   type="RAM" info="Memory Controller bank 1"  />
  </memories>
597
  :
598
</resources>
599
\endcode
600
601


602
<table class="cmtable" summary="Element: memories">
603
604
605
606
607
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
608
609
    <td>\ref xml_resources "resources"</td>
    <td colspan=3>\ref xml_resources</td>
610
611
612
613
614
615
616
617
  </tr>
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
618
619
    <td>\ref xml_rmemory "memory"</td>
    <td>Lists a logical memory region with physical mapping. Memory might restricted to processors, access, or security modes.</td>
620
    <td>complexType</td>
621
    <td>0..1</td>
622
623
  </tr>
</table>
624

625
\section xml_rmemory /rzone/resources/memories/memory element
626

627
The \ref xml_rmemory lists a logical memory region with physical mapping. Memory might restricted to processors, access, or security modes.
628

629
<table class="cmtable" summary="Element: memory">
630
631
632
633
634
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
635
636
    <td>\ref xml_memories "memories"</td>
    <td colspan=3>\ref xml_memories</td>
637
  </tr>
reinhardkeil's avatar
reinhardkeil committed
638
639
640
641
642
643
644
645
646
647
648
649
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
    <td>\ref xml_rmpc "mpc"</td>
    <td>Specifies a Memory Protection Controller (MPC) for the physical memory.</td>
    <td>complexType</td>
    <td>0..1</td>
  </tr>
650
651
652
653
654
655
656
657
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>name</td>
658
    <td>The name of this memory region which must be unique in this *.rzone file.</td>
659
660
661
662
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
663
    <td>type</td>
664
665
    <td>The type of memory in this region ("RAM" or "ROM").</td>
    <td>PhysicalTypeEnum</td>
666
    <td>required</td>
667
668
  </tr>
  <tr>
669
    <td>start</td>
670
    <td>The logical start address of the memory region in the address map.</td>
671
    <td>NonNegativeInteger</td>
672
673
    <td>required</td>
  </tr>
674
675
  <tr>
    <td>physcial</td>
676
677
    <td>The physical start address of the memory region in the address map.  If physical is not specified the start address value is used.</td>
    <td>NonNegativeInteger</td>
678
679
    <td>optional</td>
  </tr>
680
681
  <tr>
    <td>size</td>
682
683
    <td>The size of the memory region in bytes.</td>
    <td>NonNegativeInteger</td>
684
685
686
687
    <td>required</td>
  </tr>
  <tr>
    <td>access</td>
688
    <td>\ref access "Access" permissions for this memory region.</td>
689
    <td>\ref access "AccessType"</td>
690
691
692
693
    <td>optional</td>
  </tr>
  <tr>
    <td>security</td>
694
    <td>\ref security "Security" attributes for this memory region.</td>
695
    <td>\ref security "SecurityType"</td>
696
697
    <td>optional</td>
  </tr>
698
699
700
  <tr>
    <td>privilege</td>
    <td>\ref privilege "Privilege level" for this memory region.</td>
Joachim Krech's avatar
Joachim Krech committed
701
    <td>\ref privilege "PrivilegeType"</td>
702
703
    <td>optional</td>
  </tr>
704
705
706
707
708
709
710
711
712
713
714
715
716
  <tr>
    <td>startup</td>
    <td>"1" specifies that this region is used for the startup code of the application. Default value is "0".</td>
    <td>xs:boolean</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>external</td>
    <td>"1" specifies that this region is provided by an external component that is not part of the device. Default value is "0".</td>
    <td>xs:boolean</td>
    <td>optional</td>
  </tr>
  <tr>
717
718
    <td>Pref</td>
    <td>The processor(s) that can access this memory region. If omitted all processors of the system have access.</td>
719
720
721
722
723
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>info</td>
724
    <td>Brief description of the memory region.</td>
725
726
727
728
    <td>xs:string</td>
    <td>optional</td>
  </tr>  
</table>
729
730


reinhardkeil's avatar
reinhardkeil committed
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
\section xml_rmpc /rzone/resources/memories/memory/mpc element

The \ref xml_rmpc element specifies a Memory Protection Controller (MPC) for the physical memory.

<table class="cmtable" summary="Element: mpc">
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
    <td>\ref xml_rmemory "memory"</td>
    <td colspan=3>\ref xml_rmemory</td>
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>name</td>
    <td>The base register name of the MPC.</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
reinhardkeil's avatar
reinhardkeil committed
757
758
759
    <td>blk_size</td>
    <td>The size (in bytes) of each memory block.  This value is also the alignment requirement for the memory blocks.
	    The number of LUT bits is: <i>memory size</i> / <i>blk_size</i>.</td>
reinhardkeil's avatar
reinhardkeil committed
760
761
    <td>NonNegativeInteger</td>
    <td>required</td>
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
  </tr>
  <tr>
    <td>type</td>
    <td>Specifies the permissions that the MPC verifies for the memory access:\n
	  - type="s" : (default) only the Secure attribute is verified.
	  - type="p" : only the Privileged attribute is verified.
	  - type="sp" : both the Secure are Privileged attribute are verified.
    <td>MpcTypeEnum</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>format</td>
    <td>Generate a combined LUT that contains both Secure and Privileged attribute (default no combined LUT is generated)\n
	  - format="sp" : odd bits (1, 3, 5, ...) contain Secure attribute; even bits (0, 2, 4, ...) contain Privileged attribute.
	  - format="ps" : odd bits (1, 3, 5, ...) contain Privileged attribute; even bits (0, 2, 4, ...) contain Secure attribute.
    <td>MpcFormatEnum</td>
    <td>optional</td>
reinhardkeil's avatar
reinhardkeil committed
779
780
781
782
  </tr>
</table>


783
784
785
786
*/

/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
787
\page xml_peripherals /rzone/resources/peripherals element
788

789
The \ref xml_peripherals contains a list of all peripherals available in the system. It also restricts the availability to specific processors or security modes.
790

791
792
793
794
795
<b>Example</b>
\code
<resources>
  :
  <peripherals>
796
    <peripheral name="ADC0" start="0x40080000" size="0x1000" access="rwp" info="Analog/Digital Converter 0 (12-bit)"/>
797
    :
798
799
    <group name="TIM" info="Timer Group">
      <peripheral name="TIM1"      start_ns="0x40012c00" start_s="0x50012c00" size="0x400" access="rw">
800
801
802
803
        <interrupt name="TIM1_BRK" irqn="41" info="Timer 1 Break"/>
        <interrupt name="TIM1_UP"  irqn="42" info="Timer 1 Update"/>
        <interrupt name="TIM1_BRK" irqn="43" info="Timer 1 Trigger and Commutation"/>
        <interrupt name="TIM1_CC"  irqn="44" info="Timer 1 Capture and Compare"/>
804
805
      </peripheral>
      <peripheral  name="TIM2"    start_ns="0x40000000" start_s="0x50000000" size="0x400" access="rw">
806
        <interrupt name="TIM2"    irqn="45" info="Timer2 Global Interrupt"/>
807
      </peripheral>
808
809
810
811
    </group>
  </peripherals>
</resources>
\endcode
812
&nbsp;
813

814
<table class="cmtable" summary="Element: peripherals">
815
816
817
818
819
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
820
821
    <td>\ref xml_resources "resources"</td>
    <td colspan=3>\ref xml_resources</td>
822
823
824
825
826
827
828
829
  </tr>
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
830
    <td>\ref xml_group "group"</td>
831
832
833
834
835
    <td>Logical grouping of peripherals.</td>
    <td>complexType</td>
    <td>0..*</td>
  </tr>
  <tr>
836
    <td>\ref xml_peripheral "peripheral"</td>
837
838
839
840
841
    <td>Peripheral definitions.</td>
    <td>complexType</td>
    <td>0..*</td>
  </tr>
</table>
842

843
\section xml_group /rzone/resources/peripherals/group element
844

845
The \ref xml_group can be used to logically group peripherals according to functionality or bus topology.
846

847
848
849
850
851
852
<table class="cmtable" summary="Element: group">
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
853
854
    <td>\ref xml_peripherals "peripherals"</td>
    <td colspan=3>\ref xml_peripherals</td>
855
856
857
858
859
860
861
862
863
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>name</td>
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
    <td>The name for the peripheral group must be be unique within a processor (specified by pref).</td>
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
    <td>start</td>
    <td>The logical start address of the peripheral group in both secure and non-secure mode.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>start_s</td>
    <td>The logical start address of the peripheral group in secure mode.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>start_ns</td>
    <td>The logical start address of the peripheral group in non-secure mode.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>physcial</td>
    <td>The physical start address of the peripheral group.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>size</td>
    <td>The physical size of the peripheral group in bytes.</td>
895
896
897
    <td>xs:string</td>
    <td>required</td>
  </tr>
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
  <tr>
    <td>external</td>
    <td>"1" specifies that this peripheral group is provided by an external component that is not part of the device. Default value is "0".</td>
    <td>xs:boolean</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>Pref</td>
    <td>The processor(s) that can access this peripheral group. If omitted all processors of the system have access.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>access</td>
    <td>\ref access "Access" permissions for this peripheral group.</td>
    <td>\ref access "AccessType"</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>security</td>
    <td>\ref security "Security" attributes for this peripheral group.</td>
    <td>\ref security "SecurityType"</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>privilege</td>
    <td>\ref privilege "Privilege level" for this peripheral group.</td>
    <td>\ref privilege "PrivilegeType"</td>
    <td>optional</td>
  </tr>
928
929
930
931
932
933
934
935
936
937
938
939
940
  <tr>
    <td>info</td>
    <td>Brief description of the peripheral group.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>  
  <tr>
    <th>Child Elements</th>
    <th>Description</th>
    <th>Type</th>
    <th>Occurrence</th>
  </tr>
  <tr>
941
    <td>\ref xml_peripheral "peripheral"</td>
942
943
944
945
    <td>Peripheral definitions.</td>
    <td>complexType</td>
    <td>0..*</td>
  </tr>
reinhardkeil's avatar
reinhardkeil committed
946
947
948
949
950
951
  <tr>
    <td>\ref xml_p_setup "setup"</td>
    <td>Setup information for the peripheral group.</td>
    <td>complexType</td>
    <td>0..*</td>
  </tr>
952
</table>
953

954
\section xml_peripheral /rzone/resources/peripherals/.../peripheral element
955

956
The \ref xml_peripheral is used to define an address mapping for one peripheral.
957

958
<table class="cmtable" summary="Element: peripheral">
959
960
961
962
963
  <tr>
    <th>Parent Element</th>
    <th colspan="3">Element Chain</th>
  </tr>
  <tr>
964
965
    <td>\ref xml_peripherals "peripherals"</td>
    <td colspan=3>\ref xml_peripherals</td>
966
967
  </tr>
  <tr>
968
969
    <td>\ref xml_group "group"</td>
    <td colspan=3>\ref xml_group</td>
970
971
972
973
974
975
976
977
978
  </tr>
  <tr>
    <th>Attributes</th>
    <th>Description</th>
    <th>Type</th>
    <th>Use</th>
  </tr>
  <tr>
    <td>name</td>
979
    <td>The name of the peripheral. The combination group / name must be be unique within a processor (specified by pref).</td>
980
981
982
983
    <td>xs:string</td>
    <td>required</td>
  </tr>
  <tr>
984
985
    <td>start</td>
    <td>The logical start address of the peripheral in both secure and non-secure mode.</td>
986
    <td>xs:string</td>
987
988
989
990
991
992
993
994
995
996
997
998
999
    <td>optional</td>
  </tr>
  <tr>
    <td>start_s</td>
    <td>The logical start address of the peripheral in secure mode.</td>
    <td>xs:string</td>
    <td>optional</td>
  </tr>
  <tr>
    <td>start_ns</td>
    <td>The logical start address of the peripheral in non-secure mode.</td>
    <td>xs:string</td>
    <td>optional</td>
1000
  </tr>
For faster browsing, not all history is shown. View entire blame