CMSIS-Pack
Version 1.4.1
Delivery Mechanism for Software Packs
|
Configuration Wizard Annotations consist of annotation items and annotation modifiers. They create GUI-like elements in IDEs for configuration files (see Tool-specific display). Using a GUI-like approach makes it easier for the user to check and adapt configuration files to the application needs. The following rules apply:
The following table lists the Configuration Wizard Annotations:
Item | Text | Description |
---|---|---|
<h> | yes | Heading. Creates a header section. All items and options enclosed by <h> and </h> belong to one group and can be expanded. This entry makes no changes to code symbols. It is just used to group other itmes and modifiers. Excerpt from the Code Example // <h>Thread Configuration -- header without checkbox to group other items
// ...
// </h>
|
<e>* | yes | Heading with enable. Creates a header section with a checkbox to enabled or disabled all items and options enclosed by <e> and </e>. Excerpt from the Code Example. // <e>Round-Robin Thread switching -- header with checkbox
// ===============================
//
// <i> Enables Round-Robin Thread switching. -- tooltip information for the header
#ifndef OS_ROBIN
#define OS_ROBIN 1 -- this value is set through the checkbox
#endif
// <o>Round-Robin Timeout [ticks] <1-1000>
// <i> Defines how long a thread will execute before a thread switch.
// <i> Default: 5
#ifndef OS_ROBINTOUT
#define OS_ROBINTOUT 5
#endif
// </e>
<e>Round-Robin Thread switching ... </e> sets OS_ROBIN to 1 (checkbox enabled) or 0 (checkbox disabled) and encloses the OS_ROBINTOUT (Round-Robin Timeout) setting. See screen outcome in Tool-specific display. |
<e.i>* | yes | Heading with Enable: modifies a specific bit (i) (example: <e.4> - changes bit 4 of a value). // <e.4>Serial Number
// <i>Enable Serial Number String.
// <i>If disabled, Serial Number String will not be assigned to USB Device.
#define USBD0_STR_DESC_SER_EN 1
|
</h> or </e> | yes | Heading or Enable end. |
<i> | yes | Tooltip help for previous item. // <i>This is shown as a tooltip when hovering over a text.
|
<q>* | yes | Option for bit values which can be set via a checkbox. // <h> Chip-select control
// <q> ASYNCWAIT: Wait signal during asynchronous transfer
// <i> Enables the FSMC to use the wait signal even during an asynchronous protocol.
// </h>
#define RTE_FSMC_BCR1_ASYNCWAIT 0 -- this is changed via a checkbox
|
<o>* | yes | Option with selection or number entry. // <o>Round-Robin Timeout [ticks] <1-1000> -- text displayed on screen. Range of [ticks] is [1..1000]
// <i> Defines how long a thread will execute before a thread switch. -- tooltip info
// <i> Default: 5 -- tooltip info. Both displayed in one tooltip.
#ifndef OS_ROBINTOUT
#define OS_ROBINTOUT 5
#endif
// </e>
|
<o.i>* | yes | Modify a single bit (example: <e.4> - modifies bit 4). // <o.4> <o.0>High-speed
// <i>Enable High-speed functionality (if device supports it).
#define USBD0_HS 0
|
<o.x..y>* | yes | Modify a range of bits. (example: <o.4..5> - bit 4 to 5). // <h>String Settings
// <i>These settings are used to create the String Descriptor.
// <o.0..15>Language ID <0x0000-0xFCFF>
// <i>English (United States) = 0x0409.
// </h>
#define USBD0_STR_DESC_LANGID 0x0409
|
<s>* | yes | Option with ASCII string entry. // <s>Manufacturer String
// <i>String Descriptor describing Manufacturer.
#define USBD0_STR_DESC_MAN L"Keil Software"
|
<s.i>* | yes | Option with ASCII string entry and a size limit of i characters. // <s.126>Manufacturer String
// <i>String Descriptor describing Manufacturer.
#define USBD0_STR_DESC_MAN L"Keil Software"
|
skip example <qi>; <oi>; <oi.x>; <si>; <si.x> | yes | Skip i items. Can be applied to all annotation items marked with a * in this table. // <o2>Skip 2 and modify the third item after this entry <1-9>
#define VALUE1 1000
#define VALUE2 2000
#define MODIFY_THIS 3000
|
Modifier | Description | |
<0-31> | no | Value range for option fields. |
<0-100:10> | no | Value range for option fields with step 10. |
<0x40-0x1000:0x10> | no | Value range in hex format and step 10. |
<value=> | yes | Creates a drop dow-list and displays the text. value is written to the next item. Excerpt from the Code Example. // <o>Timer Thread Priority -- creates a drop-down with the list below.
// <1=> Low
// <2=> Below Normal <3=> Normal <4=> Above Normal
// <5=> High
// <6=> Realtime (highest)
// <i> Defines priority for Timer Thread -- tooltip info
// <i> Default: High -- tooltip info
#ifndef OS_TIMERPRIO
#define OS_TIMERPRIO 5
#endif
|
<#+1> <#-1> <#*8> <#/3> | no | Modifies the entered or displayed value according to the operator (add, sub, mul, div). The changed value is set for the code symbol. Excerpt from Code Example. // <o>Default Thread stack size [bytes] <64-4096:8><#/4>
// <i> Defines default stack size for threads with osThreadDef stacksz = 0
// <i> Default: 200
#ifndef OS_STKSIZE
#define OS_STKSIZE 50
#endif
|
You can copy the code into a C-file and check the outcome in the uVision Editor.
It is left to the development tool to interprete and display Configuration Wizard Annotations. The uVision IDE displays the code above in the following way:
Where
Option are device properties, which can be represented in a tree structure. Each item can have an explanatory tooltip.
Value sets the option value. Can contain controls to encapsulate data in predefined drop-down lists.