µVision4 User's Guide

Configuration Wizard

The Configuration Wizard is an integrated editor utility for generating GUI-like configuration controls in assembler, C/C++, or initialization files. Use the Configuration Wizard Annotations in the source code to generate the controls.

This picture is the result of the example source code further down:

Configuration Wizard Example Dialog

Where

OptionAre the device properties, which can be represented in a tree structure. Each item can have an explanatory tool-tip.
ValueSets the option value. Can contain controls to encapsulate data in predefined drop-down lists.

Click the tab Configuration Wizard and set device options via graphical controls. Click the tab Text Editor to view or change the source code.

Example

The example code below generates the Configuration Wizard represented above:

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


FUNC void Setup (void) {

// <h> External Bus Interface (EBI)

//   <e1.13> Enable Chip Select 0 (CSR0)
//     <o1.20..31> BA: Base Address <0x0-0xFFF00000:0x100000><#/0x100000>
//                 <i> Start Address for Chip Select Signal
//     <o1.7..8>   PAGES: Page Size      <0=> 1M Byte    <1=> 4M Bytes
//                                       <2=> 16M Bytes  <3=> 64M Bytes
//                 <i> Selects Active Bits in Base Address
//     <o1.0..1>   DBW: Data Bus Width   <1=> 16-bit     <2=> 8-bit
//     <o1.12>     BAT: Byte Access Type <0=> Byte-write
//                                       <1=> Byte-select
//     <e1.5>      WSE: Enable Wait State Generation
//       <o1.2..4>   NWS: Number of Standard Wait States <1-8><#-1>
//     </e>
//     <o1.9..11>  TDF: Data Float Output Time <0-7>
//                 <i> Number of Cycles Added after the Transfer
//   </e>
  _WDWORD(0xFFE00000, 0x010024A9);   // EBI_CSR0: Flash

//   <e1.13> Enable Chip Select 1 (CSR1)
//     <o1.20..31> BA: Base Address <0x0-0xFFF00000:0x100000><#/0x100000>
//                 <i> Start Address for Chip Select Signal
//     <o1.7..8>   PAGES: Page Size      <0=> 1M Byte    <1=> 4M Bytes
//                                       <2=> 16M Bytes  <3=> 64M Bytes
//                 <i> Selects Active Bits in Base Address
//     <o1.0..1>   DBW: Data Bus Width   <1=> 16-bit     <2=> 8-bit
//     <o1.12>     BAT: Byte Access Type <0=> Byte-write
//                                       <1=> Byte-select
//     <e1.5>      WSE: Enable Wait State Generation
//       <o1.2..4>   NWS: Number of Standard Wait States <1-8><#-1>
//     </e>
//     <o1.9..11>  TDF: Data Float Output Time <0-7>
//                 <i> Number of Cycles Added after the Transfer
//   </e>
  _WDWORD(0xFFE00004, 0x040034A5);   // EBI_CSR1: RAM

//           DRP: Data Read Protocol
//                      <0=> Standard Read
//                      <1=> Early Read
  _WDWORD(0xFFE00024, 0x00000010);   // EBI_MCR:  Data Read Protocol

  _WDWORD(0xFFE00020, 0x00000001);   // EBI_RCR:  Remap Command

// 

//  Program Entry Point
  PC = 0x04000000;

}

// <s> Change ID
// <s1.30> Change Password String
#define ID  "My User ID"
char pw[] = "My Password";

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

Configuration Wizard Annotations

Configuration Wizard Annotations are items and modifiers needed to create the GUI-like elements.

  • Annotations are written as comments in the code.
  • By default, the next number or string that follows the annotation is modified. Items marked with § can be followed by a skip-value. A skip-value skips a number of items. The 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 table lists the Configuration Wizard Annotations:

ItemTextDescription
<h>yesHeading: the following options belong to a group.
<e>§yesHeading with Enable: the following options belong to a group, which can be enabled via a checkbox.
<e.4>§yesHeading with Enable: modifies a specific bit (bit 4, in this example).
</h> or </e>yesHeading or Enable end.
<i>yesTool-tip help for previous item.
<q>§yesOption for bit values which can be set via a checkbox.
<o>§yesOption with selection or number entry.
<o.4..5>§yesModify a range of bits (example: bit 4 to 5).
<o.4>§yesmodify a single bit (example: bit 4).
<s>§yesOption with string entry.
<s.10>§yesOption with string entry and a size limit (10 characters).
Modifier Description
<0-31>noValue range for option fields.
<0-100:10>noValue range for option fields with step 10.
<0x40-0x1000:0x10>noValue range in hex format and step 10.
<0=>yesValue and text for selection.
<#+1>   <#-1>
<#*8>   <#/3>
novalue modification (add, sub, mul, div) before number is merged into field.