When exporting, let us choose if we want LV_COLOR_16_SWAP or not

What do you want to achieve?

If I leave the option “16bit swap” and the generated code protection (LV_COLOR_16_SWAP should be 1 to match SquareLine Studio’s settings), nothing works.
I DON’T want swap, and I have to disable this generated check each time I export.
Let us change this option in project preferences as we want. Any ESP32 board is forcing 16bit swap.

What have you tried so far?

Screenshot or video


  • SquareLine Studio version:
  • Operating system:
  • Target hardware:

I believe this is related to the OP’s request:

I have the same problem. After each export, I have to comment on this line in ui.c so that the correct colors are displayed on the display screen.

#if LV_COLOR_DEPTH != 16
    #error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
#if LV_COLOR_16_SWAP !=0
    // #error "LV_COLOR_16_SWAP should be 0 to match SquareLine Studio's settings"

Apparently, the developers are not aware that, for example, the TFT_eSPI library does not need LV_COLOR_16_SWAP?

Currently all our ESP board-templates are tailored to fix original Espressif ESP CPU+Display boards, that’s why their 16bit-swap parameter can’t be changed. The ‘swap’ or ‘not swap’ settings are made by Espressif.
If you don’t want to always set this in the exported source-code we advise to create a custom board template in which you can set your desired color-depth and ‘swap’ setting. To create a new board-template you can find our description here:

To be able to select different color-depths and swapping have this line in the .slb file: "color_depth": "8, 16, 16 sw, 32"