examples_schema.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. /**************************************************************************************************/
  2. /**
  3. \page pdsc_examples_pg /package/examples element
  4. The element \ref element_example describes fully defined examples contained in the PACK.
  5. An example lists the files that belong to an example. The example itself and each individual file may
  6. refer to a \ref element_condition "condition" that must resolve to true; if it is false the example or file will be ignored.
  7. The board element is used to reference to one or more board descriptions using the board vendor and name an example is targeted for.
  8. Each example can specify attributes listing related components using Class (Cclass=), Group (Cgroup=), Subgroup (Csub) and a Version (Cversion=)
  9. \b Example
  10. \code
  11. <examples>
  12. <example name="Blinky" folder="Boards/MCBSTM32F200/Blinky" doc="Abstract.txt" version="1.0">
  13. <description>This is a basic example demonstrating the development flow and letting the LED on the board blink</description>
  14. <board vendor="STMicroelectronics" name="32F429IDISCOVERY"/>
  15. <project>
  16. <environment name="uv" load="ARM/Blinky.uvproj"/>
  17. <environment name="iar" load="IAR/Blinky.ewarm" />
  18. </project>
  19. <attributes>
  20. <component Cclass="CMSIS" Cgroup="Core"/>
  21. <component Cclass="Device" Cgroup="Startup"/>
  22. <keyword>Blinky</keyword>
  23. <keyword>Getting Started</keyword>
  24. </attributes>
  25. </example>
  26. </examples>
  27. \endcode
  28. <p>&nbsp;</p>
  29. <hr>
  30. \section element_examples /package/examples
  31. Grouping element for examples. No more than one such group can exist in a PACK.
  32. <table class="cmtable" summary="Element: Example">
  33. <tr>
  34. <th>Parent</th>
  35. <th colspan="3">Chain</th>
  36. </tr>
  37. <tr>
  38. <td>\ref pdsc_package_pg "package"</td>
  39. <td colspan="3">\ref pdsc_package_pg "/package"</td>
  40. </tr>
  41. <tr>
  42. <th>Child&nbsp;Elements</th>
  43. <th>Description</th>
  44. <th>Type</th>
  45. <th>Occurrence</th>
  46. </tr>
  47. <tr>
  48. <td>\ref element_example "example"</td>
  49. <td>Description of fully specified project</td>
  50. <td>ExampleType</td>
  51. <td>1..* </td>
  52. </tr>
  53. </table>
  54. <p>&nbsp;</p>
  55. <hr>
  56. \section element_example /package/examples/example
  57. An example section is used to provide the required information for accessing an example project contained in a PACK. All examples contained in the installed packs can be
  58. listed including a brief description. A selected example will get copied into a user selected destination folder. Based on the user selected environment the respective project
  59. file will be loaded. The ID of an example is the combination of the PACK vendor, the board information and the example name and version. Examples with the same ID are
  60. treated as a single example.
  61. <table class="cmtable" summary="Element: Example">
  62. <tr>
  63. <th>Parent</th>
  64. <th colspan="3">Chain</th>
  65. </tr>
  66. <tr>
  67. <td>\ref element_examples "examples"</td>
  68. <td colspan="3">\ref element_examples</td>
  69. </tr>
  70. <tr>
  71. <th>Attributes</th>
  72. <th>Description</th>
  73. <th>Type</th>
  74. <th>Use</th>
  75. </tr>
  76. <tr>
  77. <td>name</td>
  78. <td>Name of the example</td>
  79. <td>xs:string</td>
  80. <td>required</td>
  81. </tr>
  82. <tr>
  83. <td>folder</td>
  84. <td>Relative path to the example base folder within the package. If selected, then the directory including all sub-folders and files will be copied,
  85. unless the archive attribute gets set.</td>
  86. <td>xs:string</td>
  87. <td>required</td>
  88. </tr>
  89. <tr>
  90. <td>archive</td>
  91. <td>Filename and extension of the archive file containing all files and sub-folders of the example. The archive is located in the path specified by the
  92. attribute \b <em>folder</em>. If selected, then the whole archive will be extracted.</td>
  93. <td>xs:string</td>
  94. <td>optional</td>
  95. </tr>
  96. <tr>
  97. <td>doc</td>
  98. <td>Document that describes the example.</td>
  99. <td>xs:string</td>
  100. <td>required</td>
  101. </tr>
  102. <tr>
  103. <td>version</td>
  104. <td>Example version number. The version format is described in \ref VersionType "Version Type".</td>
  105. </td>
  106. <td>VersionType</td>
  107. <td>optional</td>
  108. </tr>
  109. <tr>
  110. <th>Child&nbsp;Elements</th>
  111. <th>Description</th>
  112. <th>Type</th>
  113. <th>Occurrence</th>
  114. </tr>
  115. <tr>
  116. <td>description</td>
  117. <td>Briefly documents the purpose and scope of the example. The test can be displayed in an example selector.</td>
  118. <td>xs:string</td>
  119. <td>1</td>
  120. </tr>
  121. <tr>
  122. <td>\ref element_example_board "board"</td>
  123. <td>Complex type providing a reference to a board description using board name and vendor.</td>.
  124. <td>BoardReferenceType</td>
  125. <td>1</td>
  126. </tr>
  127. <tr>
  128. <td>\ref element_example_project "project"</td>
  129. <td>Complex type describing the project files for different environments</td>
  130. <td>ExampleProjectType</td>
  131. <td>1..* </td>
  132. </tr>
  133. <tr>
  134. <td>\ref element_example_attributes "attributes"</td>
  135. <td>Group element for project attributes, which list required components, define example categories, and set keywords to filter and search for examples.</td>
  136. <td>ExampleAttributesType</td>
  137. <td>1</td>
  138. </tr>
  139. </table>
  140. <p>&nbsp;</p>
  141. <hr>
  142. \section element_example_board /package/examples/example/board
  143. This element specifies the board that can be used with the example project.
  144. \b Example:
  145. \code
  146. <board name="MV1000A" vendor="MyVendor"/>
  147. \endcode
  148. <p>&nbsp;</p>
  149. <table class="cmtable" summary="Element: Example Board">
  150. <tr>
  151. <th>Parent</th>
  152. <th colspan="3">Chain</th>
  153. </tr>
  154. <tr>
  155. <td>\ref element_example "example"</td>
  156. <td colspan="3">\ref element_example</td>
  157. </tr>
  158. <tr>
  159. <th>Attributes</th>
  160. <th>Description</th>
  161. <th>Type</th>
  162. <th>Use</th>
  163. </tr>
  164. <tr>
  165. <td>vendor</td>
  166. <td>Vendor name of the board.</td>
  167. <td>xs:string</td>
  168. <td>required</td>
  169. </tr>
  170. <tr>
  171. <td>name</td>
  172. <td>Commercial name of the board.</td>
  173. <td>xs:string</td>
  174. <td>required</td>
  175. </tr>
  176. <tr>
  177. <td>Dvendor</td>
  178. <td>Vendor name of the device used on the board. Use predefined values as listed in the table \ref DeviceVendorEnum "Device Vendor". </td>
  179. <td>DeviceVendorEnum</td>
  180. <td>optional</td>
  181. </tr>
  182. <tr>
  183. <td>Dfamily</td>
  184. <td>Name of the target device family used on the board. This attribute is optional if either DsubFamily or Dname is already specified. \n <b>\token{Deprecated since version 1.1}</b></td>
  185. <td>xs:string</td>
  186. <td>optional</td>
  187. </tr>
  188. <tr>
  189. <td>DsubFamily</td>
  190. <td>Name of the target device sub-family used on the board. This attribute is optional if either Dfamily or Dname is already specified. \n <b>\token{Deprecated since version 1.1}</b></td>
  191. <td>xs:string</td>
  192. <td>optional</td>
  193. </tr>
  194. <tr>
  195. <td>Dname</td>
  196. <td>Name of the target device used on the board. This attribute is optional if either Dfamily or DsubFamily is already specified. \n <b>\token{Deprecated since version 1.1}</b>.</td>
  197. <td>xs:string</td>
  198. <td>optional</td>
  199. </tr>
  200. </table>
  201. \note
  202. Values for <b>\token{deprecated attributes}</b> are read from the board description element \ref element_board_mountedDevice.
  203. <p>&nbsp;</p>
  204. <hr>
  205. \section element_example_project /package/examples/project
  206. A project element is a sequence of \em environment elements that describe the name of the environment and the project file to be loaded.
  207. <b>Example:</b>
  208. \code
  209. <project>
  210. <environment ... />
  211. <environment ... />
  212. </project>
  213. \endcode
  214. <p>&nbsp;</p>
  215. <table class="cmtable" summary="Element: Example Project">
  216. <tr>
  217. <th>Parent</th>
  218. <th colspan=3>Chain</th>
  219. </tr>
  220. <tr>
  221. <td>\ref element_example "example"</td>
  222. <td colspan=3>\ref element_example</td>
  223. </tr>
  224. <tr>
  225. <th>Element</th>
  226. <th>Description</th>
  227. <th>Type</th>
  228. <th>Occurrence</th>
  229. </tr>
  230. <tr>
  231. <td>\ref element_example_project_env "environment"</td>
  232. <td>Specifies the environment and project file with extension.</td>
  233. <td>xs:complexType</td>
  234. <td>1..*</td>
  235. </tr>
  236. </table>
  237. <p>&nbsp;</p>
  238. <hr>
  239. \section element_example_project_env /package/examples/project/environment
  240. The environment element describes the name of the environment and the project file to be loaded.
  241. <b>Example:</b>
  242. \code
  243. <project>
  244. <environment name="uv" load="ARM/Blinky.uvproj"/>
  245. <environment name="iar" load="IAR/Blinky.ewarm" />
  246. </project>
  247. \endcode
  248. <p>&nbsp;</p>
  249. <table class="cmtable" summary="Element: Example Project">
  250. <tr>
  251. <th>Parent</th>
  252. <th colspan=3>Chain</th>
  253. </tr>
  254. <tr>
  255. <td>\ref element_example_project "project"</td>
  256. <td colspan=3>\ref element_example_project</td>
  257. </tr>
  258. <tr>
  259. <th>Attributes</th>
  260. <th>Description</th>
  261. <th>Type</th>
  262. <th>Use</th>
  263. </tr>
  264. <tr>
  265. <td>name</td>
  266. <td>Name of the required tool-chain (for example: \token{uv}, \token{iar}, etc.)</td>
  267. <td>xs:string</td>
  268. <td>required</td>
  269. </tr>
  270. <tr>
  271. <td>load</td>
  272. <td>Specifies the project file with extension. A path relative to \em folder attribute of the element \ref element_example can be appended.</td>
  273. <td>xs:string</td>
  274. <td>required</td>
  275. </tr>
  276. </table>
  277. <p>&nbsp;</p>
  278. <hr>
  279. \section element_example_attributes /package/examples/example/attributes
  280. <b>Example:</b>
  281. \code
  282. <example>
  283. <attributes>
  284. <category>Example Project</category>
  285. <category>For a specific board</category>
  286. ...
  287. <component Cclass="CMSIS" Cgroup="Core"/>
  288. <component Cclass="Device" Cgroup="Startup"/>
  289. ...
  290. <keyword>Blinky</keyword>
  291. <keyword>Getting Started</keyword>
  292. </attributes>
  293. </example>
  294. \endcode
  295. <p>&nbsp;</p>
  296. <table class="cmtable" summary="Element: Example Attributes">
  297. <tr>
  298. <th>Parent</th>
  299. <th colspan=3>Chain</th>
  300. </tr>
  301. <tr>
  302. <td>\ref element_example "example"</td>
  303. <td colspan=3>\ref element_example</td>
  304. </tr>
  305. <tr>
  306. <th>Child&nbsp;Elements</th>
  307. <th>Description</th>
  308. <th>Type</th>
  309. <th>Occurrence</th>
  310. </tr>
  311. <tr>
  312. <td>category</td>
  313. <td>Free form string defining an example category. A category can be used to filter examples in an example browser.</td>
  314. <td>xs:string</td>
  315. <td>0..*</td>
  316. </tr>
  317. <tr>
  318. <td>\ref element_example_attribute_component "component"</td>
  319. <td>Group for defining the components used in the example.</td>
  320. <td>ComponentCategoryType</td>
  321. <td>0..*</td>
  322. </tr>
  323. <tr>
  324. <td>keyword</td>
  325. <td>Free form string defining a keyword that relates to the example. A keyword can be used to search for examples.</td>
  326. <td>xs:string</td>
  327. <td>0..*</td>
  328. </tr>
  329. </table>
  330. <p>&nbsp;</p>
  331. <hr>
  332. \section element_example_attribute_component /package/examples/example/attributes/component
  333. The component element specifies the Cclass to which the example belongs.
  334. This can be used to list all related components within an example.
  335. <b>Example:</b>
  336. \code
  337. <attributes>
  338. ...
  339. <component Cclass="CMSIS" Cgroup="Core"/>
  340. <component Cclass="Device" Cgroup="Startup"/>
  341. ...
  342. </attributes>
  343. \endcode
  344. <p>&nbsp;</p>
  345. <table class="cmtable" summary="Element: Attribute Component">
  346. <tr>
  347. <th>Parent</th>
  348. <th colspan=3>Chain</th>
  349. </tr>
  350. <tr>
  351. <td>\ref element_example_attributes "attribute"</td>
  352. <td colspan=3>\ref element_example_attributes</td>
  353. </tr>
  354. <tr>
  355. <th>Attribute</th>
  356. <th>Description</th>
  357. <th>Type</th>
  358. <th>Use</th>
  359. </tr>
  360. <tr>
  361. <td>Cclass</td>
  362. <td>Free form string defining an example class. Predefined values can be used as listed in the table \ref CclassType "Component Classes".</td>
  363. <td>CclassType</td>
  364. <td>required</td>
  365. </tr>
  366. <tr>
  367. <td>Cgroup</td>
  368. <td>Free form string defining an example group. Predefined values can be used as listed in the table \ref CgroupType "Component Groups".</td>
  369. <td>CgroupType</td>
  370. <td>optional</td>
  371. </tr>
  372. <tr>
  373. <td>Csub</td>
  374. <td>Free form string defining an example subgroup. The type is described in \ref CsubType "Component Subgroups".</td>
  375. <td>CsubType</td>
  376. <td>optional</td>
  377. </tr>
  378. <tr>
  379. <td>Cversion</td>
  380. <td>Free form string defining an example version. The version format is described in \ref VersionType "Version Type".</td>
  381. <td>VersionType</td>
  382. <td>optional</td>
  383. </tr>
  384. <tr>
  385. <td>Cvendor</td>
  386. <td>Free form string defining the vendor of the example.</td>
  387. <td>xs:string</td>
  388. <td>optional</td>
  389. </tr>
  390. </table>
  391. <p>&nbsp;</p>
  392. */