64 views
in GUI Development by

I am facing a problem with the colors displayed for a View::Frame on target device. The colors are correctly displayed on prototype and other target device for the same UI. Also the other bitmap files look as expected on this particular target device. It seems its just problem with bitmap frames.

The buttons  have the  background and selection border created using bitmap frames and their colors have been displayed incorrectly.

Expected:

 

Actual:

 

The button implementation is done as below :

Specifications:

- The bitmap images are in Alpha8 color format.

-Platform package being used is Tara.Generic_RGB565.RGB565

1 Answer

0 votes
by
 
Best answer
Hello,

please let me know which target you are using and which compiler you are using. Are there any compiler warnings reported?

A couple of months ago we had a similar issue on RX65 taget due to an IAR compiler issue with incorrect copied color structs. It looks to me, that this might be also here the case.

Best regards,

Manfred.
by

Yes, my target device is RX65  and I am using IAR workbench as compiler.

I could see these warnings related to color while compiling the code:

[ 71%] ←[32mBuilding C object CMakeFiles/lib_display_ui.dir/EW_PlatformPackage/Unison/RGB565/ewgfx.c.obj←[0m

    XColor        colorITL = aColorTL;
                  ^
"EW_PlatformPackage\Unison\RGB565\ewgfx.c",8429  Warning[Ab006]:
          Undivisable displacement, truncated value 256 used

    XColor        colorITR = aColorTR;
                  ^
"EW_PlatformPackage\Unison\RGB565\ewgfx.c",8430  Warning[Ab006]:
          Undivisable displacement, truncated value 260 used

    XColor        colorIBL = aColorBL;
                  ^
"EW_PlatformPackage\Unison\RGB565\ewgfx.c",8431  Warning[Ab006]:
          Undivisable displacement, truncated value 268 used

    XColor        colorIBR = aColorBR;
                  ^
"EW_PlatformPackage\Unison\RGB565\ewgfx.c",8432  Warning[Ab006]:
          Undivisable displacement, truncated value 264 used

...
 

These are the warnings while building display library. I tried looking in building the complete app in IAR workbench but couldn't find much about color related warnings.

by

Hello,

according to the compiler warning "Undivisable displacement", the compiler is not able to copy the content of a struct into another struct with the identical type.

This kind of assignment is used very intensively for many data types like XColor, XPoint, XRect, .... and it is very common to use that in C (see section Assignment). 

From my point of view this is a compiler problem and should be fixed by IAR. Can you please get in contact with IAR? Maybe they have already fixed that.

Best regards,

Manfred.

by
Thanks Manfred for your reply.

This information is very helpful, I will get in touch with IAR support and see if they have any fix for this.

Regards,

Vikas.

Embedded Wizard Website | Privacy Policy | Imprint

...