84 views
in GUI Development by
Hi,

In our project (Using IMXRT and Embedded Wizard 11.0), We have set of Images available for each variant to play a welcome animation as a flipbook format.

But due to memory constrain in the target, we cannot afford to have all variant's images at a time.

We have separate profile for target build apart from win32 and protyper profile.

To overcome this memory constrain, we want to include the set of images which only belongs to a selected variant(variant can be selected at the time of build) and other variant's image assets shall not be included in a Target profile build.

Kindly suggest how to achieve this?

1 Answer

0 votes
by

Hello Vignesh,

based on the provided description it is not clear for me how the images are actually managed in your project. From technical point of view, Embedded Wizard automatically discards project members which are not in use. For example, if you have a Bitmap Resource existing to your project and this resource is not used, no code will be generated for this resource. In other words, if the undesired bitmaps are generated, there is some code existing in your project referencing this resources. In such case you need to review your code and remove such references. You could use $if..$endif directives to conditionally include code depending on the condition. The condition can involve the profile name. See also Compiler directives and Built-in macros: $profile.

However, assuming you want a Bitmap Resource to have different contents depending on the profile selected during code generation (depending on the product variant), I would recommend the approach of variants. In your case you would:

1. First add a Bitmap Resource to your project.

2. For each product variant derive a new variant from this Bitmap Resource. See also Bitmap resource variant.

3. Configure each variant with another image file. Each variant can so contain other image.

4. For each variant specify its variant condition (condition when this variant is used). See attribute VariantCond. In your case the variant condition should be the name of a profile for which the variant is needed.

5. Wherever you need the image in your project, use the name of the original Bitmap Resource.

During code generation only the variant (and its image contents) is taken in account for which the variant condition matches the actual profile name.

I hope it helps you further.

Best regards

Paul Banach

by

Hello Embedded Wizard Team,

We shall try with the clarification provided in previous comment. Here, adding additional information regarding project use case. Please let us know if different solution to be tried.

Requirement:

Customer have multiple variants, for example let's assume 4 variants (A, B, C, D) and each variant shall have 2 startup animation and 2 shutdown animation. All animations are flip-book animations i.e, sequence of images used for a animation.
So, all together there shall be 16 animations [ 4 variants * (2 start anim + 2 shutdown anim) ]
 

Our concept:

As our memory foot print is low, using IMX RT,  the plan is, perform variant specific build to include corresponding startup and shutdown animations and ignore other variant aniamtions
Example: When building target executable for Variant A, include A's 2 startup and 2 shutdown animation only
Out of 2 startup and 2 shutdown animation, which one to play is selected dynamically.

Our environment:

  • We are using single Embedded Wizard project and there are also many common functionalities independent of variant as well
  • It is not possible to keep all 16 animations in flash. Also, we are not using external memory like SD Card/ external image decoders

Query:

Is it possible to generate code such that, variant independent code and variant dependent code are separated.

By this, during target application build we include "Common sources + Variant specific sources" to generate executable.
Example:
While building for variant A, "Common sources + A Variant specific sources only"
While building for variant B, "Common sources + B Variant specific sources only"


We are thinking to have like Common Sources + Variant specific sources, any other better solution/ suggestion could also help


-
Regards,
Geethanathan

by

Hello Geethanathan,

Is it possible to generate code such that, variant independent code and variant dependent code are separated.

No, it is not possible. I would recommend the approach described in my preceding answer. Have you tried it out?

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...