CMSIS-Pack  Version 1.2
Delivery Mechanism for Software Packs
 All Pages
Configuration Wizard Annotations

Configuration Wizard Annotations are items and modifiers required to create GUI-like elements in IDEs for configuration files. Using a GUI-like approach makes it easier for the user to check and adapt configuration files to his application's needs. The following applies to the configuration wizard annotations:

  • Annotations are written as comments in the code.
  • By default, the next number or string that follows the annotation is modified. Items marked with * in the table below can be followed by a skip-value. A skip-value skips a number of items. The following example modifies the second number that follows the comment:
    <o1>
  • Items of modifiers can be followed by a text.
  • White space characters are ignored in items or modifiers.
  • It is good practice to use symbol names from the device datasheet in front of the description.

The Configuration Wizard section must begin within the first 100 lines of code and must start with the following comment line:

// <<< Use Configuration Wizard in Context Menu >>>

The Configuration Wizard section can end with the following optional comment:

// <<< end of configuration section >>>

The following table lists the Configuration Wizard Annotations:

Item Text Description
<h> yes Heading: the following options belong to a group.
<e>* yes Heading with Enable: the following options belong to a group, which can be enabled via a checkbox.
<e.4>* yes Heading with Enable: modifies a specific bit (bit 4, in this example).
</h> or </e> yes Heading or Enable end.
<i> yes Tool-tip help for previous item.
<q>* yes Option for bit values which can be set via a checkbox.
<o>* yes Option with selection or number entry.
<o.4..5>* yes Modify a range of bits (example: bit 4 to 5).
<o.4>* yes modify a single bit (example: bit 4).
<s>* yes Option with ASCII string entry.
<s.10>* yes Option with ASCII string entry and a size limit of 10 characters.
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.
<0=> yes Value and text for selection.
<#+1>   <#-1>
<#*8>   <#/3>
no value modification (add, sub, mul, div) before number is merged into field.

Code Example

//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
//
// <h>Thread Configuration
// =======================
//
// <o>Number of concurrent running threads <0-250>
// <i> Defines max. number of threads that will run at the same time.
// <i> Default: 6
#ifndef OS_TASKCNT
#define OS_TASKCNT 6
#endif
// <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
// <o>Main Thread stack size [bytes] <64-32768:8><#/4>
// <i> Defines stack size for main thread.
// <i> Default: 200
#ifndef OS_MAINSTKSIZE
#define OS_MAINSTKSIZE 50
#endif
// <o>Number of threads with user-provided stack size <0-250>
// <i> Defines the number of threads with user-provided stack size.
// <i> Default: 0
#ifndef OS_PRIVCNT
#define OS_PRIVCNT 0
#endif
// <o>Total stack size [bytes] for threads with user-provided stack size <0-1048576:8><#/4>
// <i> Defines the combined stack size for threads with user-provided stack size.
// <i> Default: 0
#ifndef OS_PRIVSTKSIZE
#define OS_PRIVSTKSIZE 0
#endif
// <q>Check for stack overflow
// <i> Includes the stack checking code for stack overflow.
// <i> Note that additional code reduces the Kernel performance.
#ifndef OS_STKCHECK
#define OS_STKCHECK 1
#endif
// <o>Processor mode for thread execution
// <0=> Unprivileged mode
// <1=> Privileged mode
// <i> Default: Privileged mode
#ifndef OS_RUNPRIV
#define OS_RUNPRIV 1
#endif
// </h>
// <h>RTX Kernel Timer Tick Configuration
// ======================================
// <q> Use Cortex-M SysTick timer as RTX Kernel Timer
// <i> Use the Cortex-M SysTick timer as a time-base for RTX.
#ifndef OS_SYSTICK
#define OS_SYSTICK 1
#endif
//
// <o>Timer clock value [Hz] <1-1000000000>
// <i> Defines the timer clock value.
// <i> Default: 12000000 (12MHz)
#ifndef OS_CLOCK
#define OS_CLOCK 12000000
#endif
// <o>Timer tick value [us] <1-1000000>
// <i> Defines the timer tick value.
// <i> Default: 1000 (1ms)
#ifndef OS_TICK
#define OS_TICK 1000
#endif
// </h>
// <h>System Configuration
// =======================
//
// <e>Round-Robin Thread switching
// ===============================
//
// <i> Enables Round-Robin Thread switching.
#ifndef OS_ROBIN
#define OS_ROBIN 1
#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>User Timers
// ==============
// <i> Enables user Timers
#ifndef OS_TIMERS
#define OS_TIMERS 1
#endif
// <o>Timer Thread Priority
// <1=> Low
// <2=> Below Normal <3=> Normal <4=> Above Normal
// <5=> High
// <6=> Realtime (highest)
// <i> Defines priority for Timer Thread
// <i> Default: High
#ifndef OS_TIMERPRIO
#define OS_TIMERPRIO 5
#endif
// <o>Timer Thread stack size [bytes] <64-4096:8><#/4>
// <i> Defines stack size for Timer thread.
// <i> Default: 200
#ifndef OS_TIMERSTKSZ
#define OS_TIMERSTKSZ 50
#endif
// <o>Timer Callback Queue size <1-32>
// <i> Number of concurrent active timer callback functions.
// <i> Default: 4
#ifndef OS_TIMERCBQS
#define OS_TIMERCBQS 4
#endif
// </e>
// <o>ISR FIFO Queue size<4=> 4 entries <8=> 8 entries
// <12=> 12 entries <16=> 16 entries
// <24=> 24 entries <32=> 32 entries
// <48=> 48 entries <64=> 64 entries
// <96=> 96 entries
// <i> ISR functions store requests to this buffer,
// <i> when they are called from the interrupt handler.
// <i> Default: 16 entries
#ifndef OS_FIFOSZ
#define OS_FIFOSZ 16
#endif
// </h>
//------------- <<< end of configuration section >>> -----------------------

Tool specific display

It is left to the development tool how the Configuration Wizard Annotations are displayed. The uVision IDE displays the above code sample as follows:

RTX_Conf_CM_Wizard_View.png
Configuration Wizard Display

Where

Option are the device properties, which can be represented in a tree structure. Each item can have an explanatory tool-tip.

Value sets the option value. Can contain controls to encapsulate data in predefined drop-down lists.