Project members: Profile

With profile members you specify the configuration parameters for your project. Primarily these are the Platform Package to use for the code generation, the location where generated files should be stored and the display (LCD) size. As such, profiles can exist only at the root level of the project. Profile members are represented in Composer by following bricks:

With multiple profiles and the optionally enclosed macros you can manage several device/product variant configurations within one and the same project. You can simply switch between profiles and then use the active profile for code generation or prototyping.

Add new profile

First switch to the Composer containing the project main page.

Then, in the Gallery window, ensure that the folder Chora is opened.

Look in the folder for the template named Profile.

With the mouse, select the template and drag it into the Composer.

Drop the template within the Composer.

Adding a new profile member.

Name the profile

First ensure, that the profile member is selected.

Press the key F2 or select the menu item EDITRename ....

Enter the new profile name in the Inspector window.

The assigned name identifies globally the profile within your project. The name appears in the profiles selection list and determines implicitly the sub-directory where generated files are stored. Moreover, you can involve the profile name in expressions to conditionally build your application or manage project variants.

Select the Platform Package

Through the choice of the Platform Packages you determine the target system to generate the code for. It also affects the conversion of colors, bitmap and font resources. As such, the right choice is obligatory for generating the correct code for your particular target device.

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute PlatformPackage.

Specify display resolution and orientation

Every profile should be configured with resolution and orientation parameters corresponding to the display, you intend to use in the target device. For this purpose:

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute ScreenSize.

Accordingly locate and adapt the attribute ScreenOrientation.

Specify the application class

The choice of the application class determines the root component, the code generation should start with. Accordingly, all other project members referenced (directly or indirectly) from the application class are involved in the build process. Not referenced members, in turn, are excluded from the code generation.

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute ApplicationClass.

Specify the output directory

Per default, Embedded Wizard stores generated files within a folder named after the profile name and located directly below the folder of your project. With the attribute OutputDirectory you can determine another location where to store the files.

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute OutputDirectory.

If the selected Platform Package it supports, you can specify individual directories for the include (e.g. *.h), source (e.g. *.c) and resource (e.g. *.png) files. See the attributes OutputIncDirectory, OutputSrcDirectory and OutputResDirectory.

With the further attribute CleanOutputDirectories you can control how Embedded Wizard should treat outdated, superfluous files existing in the specified output directories.

Configure the format of generated bitmaps

Per default, Embedded Wizard generates all bitmap resources in compressed format requiring the bitmaps being decompressed when used at the runtime. You can override this behavior and generate bitmap resources directly in the native color format of the target system allowing the pixel information being accessed directly from the ROM code (e.g. flash memory).

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute FormatOfBitmapResources.

Depending on your Platform Package you will eventually also need to specify the color format used natively within the target system:

Again in Inspector window locate and adapt the attribute ColorChannelsOrder.

Similarly locate and adapt the attribute ColorPremultipliedAlpha.

Configure the format of generated strings

Per default, Embedded Wizard generates all string literals in compressed format requiring the strings being decompressed when used at the runtime. You can override this behavior and generate strings uncompressed allowing the information being accessed directly from the ROM code (e.g. flash memory).

First ensure, that the profile member is selected.

In the middle area of the Inspector window locate and adapt the attribute FormatOfStringConstants.

Edit profile macros

Every profile can contain any arbitrary number of macro members. To add a new macro or edit existing macros open the profile in a new Composer page:

First ensure, that the profile member is selected.

Press the key ENTER ...

... or double click on the profile member with the mouse.

Duplicate an existing profile

You can create any number of copies of an already existing profile member.

First ensure, that the profile member is selected.

Press the keys CtrlC and CtrlV in succession ...

... or hold the key Ctrl pressed while you drag and drop the selected profile member.

Finally rename the just duplicated profile member.

Select the current profile

The selection of the current profile affects directly the build process and the prototyping. In particular, the colors you see in the Composer or Prototyper window result from the Platform Package specified in the currently selected profile. You can easily switch between several profiles by using the profile selection combobox. Additionally when generating code in batch mode, you can select any arbitrary combination of profiles to generate the code for.

Profiles and conditional compilation

Profiles and the enclosed macro members can be evaluated in expressions and conditions allowing particular components or code fragments being compiled conditionally depending on the selected profile. Moreover, you can use the name of a profile in the Generator and VariantCond attribute of any other member in your project to control its code generation.

Delete a profile

First ensure, that the profile member is selected.

Press the key DEL or select the menu item EDITDelete.

Attributes of a profile

The following table shows the complete list of attributes provided by the profile member. Please note, depending on the Platform Package selected in the attribute PlatformPackage, some of the below listed attributes may be not available:

Attribute name

Short description

ApplicationClass

Determines the name of the application class to use when generating code for a particular profile member.

ApplicationName

Determines an optional name of the application when generating code for a particular profile member.

ApplicationTitle

Determines an optional title of the application when generating code for a particular profile member.

Brick

Determines the position and the size of a profile member brick within the Composer window.

CleanOutputDirectories

Controls how superfluous, outdated files found in output directories should be treated.

Clut

Determines a CLUT (color lookup table) file to use when generating code for a particular profile member.

ColorChannelsOrder

Controls the color conversion of bitmap resources when generating code for a particular profile member.

ColorPremultipliedAlpha

Controls the color conversion of bitmap resources when generating code for a particular profile member.

Description

Contains the description for the profile member.

FormatOfBitmapResources

Controls the conversion of bitmap resources when generating code for a particular profile member.

FormatOfStringConstants

Controls the conversion of strings when generating code for a particular profile member.

Obfuscation

Controls the format of the generated code.

Optimization (Deprecated)

Controls the optimization level when generating code for a particular profile member.

OutputDirectory

Determines the destination directory default for all generated files.

OutputIncDirectory

Determines the destination directory particular for generated include files (e.g. *.h).

OutputSrcDirectory

Determines the destination directory particular for generated source files (e.g. *.c).

OutputResDirectory

Determines the destination directory particular for generated resource files (e.g. *.png).

OutputPrefix

Specifies a name prefix for the generated code files.

PlatformPackage

Determines the Platform Package to use when generating code for a particular profile member.

PostProcess

Determines a command to execute at the end of the build process.

ScreenOrientation

Determines the actual installation orientation of the display in your target device.

ScreenSize

Determines the actual resolution of the display in your target device.

Verbose

Controls the amount of inline comments included into the generated code.