LVGL draws 2 1/4-sized screens in the top half of the dispaly


I have created some screens for my project in the PC simulator, which seem to work fine,
but when I compile and run on the target HW (arm/linux, using a reserved memory block
for the framebuffer), LVGL seems to draw the screen compressed, twice in the top half of the screen.
The HW screen is a 96x96 pixel TFT driven by DMA from the frame buffer.
The screenshots are made with double-buffering i.e as in the porting example using a put_px() method
in my ‘flush_cb’ callback to copy each pixel to the DMA buffer.
he custom ‘flush_cb’ is one difference to the working simulator code, the other is that
the code is being cross-compiled for the arm target and linked against a pre-compiled library of LVGL
which we use in our SDK (built using Yocto). I’m sure that the hardware is working, as I’ve tested
writes to the screen using command-line memwrite on the target board.

The screenshot of the simulator (which is correct) is TPSimulator.jpg.
The screenshot of the problem is TP_HW_96x96.jpg.

For both simulator and target, lv_conf.h is changed from the default only as follows:

#define LV_HOR_RES_MAX (96)
#define LV_VER_RES_MAX (96)

(LV_COLOR_DEPTH is unchanged at 32)

For the target version, I also seem to need to set the driver resolution to get the screeshots as shown:

disp_drv.hor_res = 96;
disp_drv.ver_res = 96;

Interestingly, if I set the res to 192x192:

disp_drv.hor_res = 192;
disp_drv.ver_res = 192;

it draws the full screen, but the widgets are the same size as at 96x96 i.e. half the size they should be .I can’t include the screenshot due to the new user limit unfortunately

I’m guessing this may be due to the way the LVGL library is being built for the SDK, but I’m not familiar enough with LVGL to know how to fix it yet.
Has anyone else had this problem? Any help or advice very much appreciated.

What MCU/Processor/Board and compiler are you using?

Altera Hard ARMv7 dual-core CPU/Custom board/GCC

What LVGL version are you using?


Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

My first wild guess would be, that your TFT supports only 16 bit colors (i.e. RGB565).

Thanks very much for the reply, but I’ve checked the hardware using memwrite: it’s 32-bits per pixel (xxRRGGBB)