Code Monkey home page Code Monkey logo

lvgl_esp32_drivers's Introduction

English | 中文 | Português do Brasil | 日本語


 

 

Light and Versatile Graphics Library

 

   

Website | Docs | Forum | Demos | Services


📒 Overview

Mature and Well-known
LVGL is the most popular free and open source embedded graphics library to create beautiful UIs for any MCU, MPU and display type. It's supported by industry leading vendors and projects like  Arm, STM32, NXP, Espressif, Nuvoton, Arduino, RT-Thread, Zephyr, NuttX, Adafruit and many more.

Feature Rich
It has all the features to create modern and beautiful GUIs: 30+ built-in widgets, a powerful style system, web inspired layout managers, and a typography system supporting many languages. To integrate LVGL into your platform, all you need is at least 32kB RAM and 128 kB Flash, a C compiler, a frame buffer, and at least an 1/10 screen sized buffer for rendering.

Services
Our team is ready to help you with graphics design, UI implementation and consulting services. Contact us if you need some support during the development of your next GUI project.

🚀 Features

Free and Portable

  • A fully portable C (C++ compatible) library with no external dependencies.
  • Can be compiled to any MCU or MPU, with any (RT)OS.
  • Supports monochrome, ePaper, OLED or TFT displays, or even monitors. Porting Guide
  • Distributed under the MIT license, so you can easily use it in commercial projects too.
  • Needs only 32kB RAM and 128 kB Flash, a frame buffer, and at least an 1/10 screen sized buffer for rendering.
  • OS, External memory and GPU are supported but not required.

Widgets, Styles, Layouts and more

  • 30+ built-in Widgets:  Button, Label, Slider, Chart, Keyboard, Meter, Arc, Table and many more.
  • Flexible Style system with  ~100 style properties to customize any part of the widgets in any state.
  • Flexbox and Grid-like layouts engines to automatically size and position the widgets in a responsive way.
  • Texts are rendered with UTF-8 encoding supporting CJK, Thai, Hindi, Arabic, Persian writing systems.
  • Word wrapping, kerning, text scrolling, sub-pixel rendering, Pinyin-IME Chinese input, Emojis in texts.
  • Rendering engine supporting animations, anti-aliasing, opacity, smooth scrolling, shadows, image transformation, etc  
  • Supports Mouse, Touchpad, Keypad, Keyboard, External buttons, Encoder Input devices.
  • Multiple display support.

Binding and Build Support

  • MicroPython Binding exposes LVGL API
  • PikaScript Binding python on MCU lighter and easier.
  • No custom build system is used. You can build LVGL as you build the other files of your project.
  • Support for Make and CMake is included out of the box.
  • Develop on PC and use the same UI code on embedded hardware.
  • Convert the C UI code to HTML file with our Emscripten port.

Docs, Tools, and Services

❤️ Sponsor

If LVGL saved you a lot of time and money or you just had fun using it, consider Supporting its Development.

How do we spend the donations?
Our goal is to provide financial compensation for people who do the most for LVGL. It means not only the maintainers but anyone who implements a great feature should get a payment from the accumulated money. We use the donations to cover our operational costs like servers and related services.

How to donate?
We use GitHub Sponsors where you can easily send one time or recurring donations. You can also see all of our expenses in a transparent way.

How to get paid for your contribution?
If someone implements or fixes an issue labeled as Sponsored he or she will get a payment for that work. We estimate the required time, complexity and importance of the issue and set a price accordingly. To jump in just comment on a Sponsored issue saying "Hi, I'd like to deal with it. This is how I'm planning to fix/implement it...". A work is considered ready when it's approved and merged by a maintainer. After that you can submit and expense at opencollective.com and you will receive the payment in a few days.

Organizations supporting LVGL
Sponsors of LVGL

Individuals supporting LVGL
Backers of LVGL

📦 Packages

LVGL is available as:

🤖 Examples

See some examples of creating widgets, using layouts and applying styles. You will find C and MicroPython code, and links to try out or edit the examples in an online MicroPython editor.

For more examples check out the Examples folder.

Hello world label

Simple Hello world label example in LVGL

C code
/*Change the active screen's background color*/
lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN);

/*Create a white label, set its text and align it to the center*/
lv_obj_t * label = lv_label_create(lv_screen_active());
lv_label_set_text(label, "Hello world");
lv_obj_set_style_text_color(label, lv_color_hex(0xffffff), LV_PART_MAIN);
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
MicroPython code | Online Simulator
# Change the active screen's background color
scr = lv.screen_active()
scr.set_style_bg_color(lv.color_hex(0x003a57), lv.PART.MAIN)

# Create a white label, set its text and align it to the center
label = lv.label(lv.screen_active())
label.set_text("Hello world")
label.set_style_text_color(lv.color_hex(0xffffff), lv.PART.MAIN)
label.align(lv.ALIGN.CENTER, 0, 0)

Button with Click Event

LVGL button with label example

C code
lv_obj_t * button = lv_button_create(lv_screen_active());                   /*Add a button to the current screen*/
lv_obj_center(button);                                             /*Set its position*/
lv_obj_set_size(button, 100, 50);                                  /*Set its size*/
lv_obj_add_event_cb(button, button_event_cb, LV_EVENT_CLICKED, NULL); /*Assign a callback to the button*/

lv_obj_t * label = lv_label_create(button);                        /*Add a label to the button*/
lv_label_set_text(label, "Button");                             /*Set the labels text*/
lv_obj_center(label);                                           /*Align the label to the center*/
...

void button_event_cb(lv_event_t * e)
{
  printf("Clicked\n");
}
MicroPython code | Online Simulator
def button_event_cb(e):
  print("Clicked")

# Create a Button and a Label
button = lv.button(lv.screen_active())
button.center()
button.set_size(100, 50)
button.add_event_cb(button_event_cb, lv.EVENT.CLICKED, None)

label = lv.label(button)
label.set_text("Button")
label.center()

Checkboxes with Layout

Checkboxes with layout in LVGL

C code
lv_obj_set_flex_flow(lv_screen_active(), LV_FLEX_FLOW_COLUMN);
lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_CENTER);

lv_obj_t * cb;
cb = lv_checkbox_create(lv_screen_active());
lv_checkbox_set_text(cb, "Apple");
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);

cb = lv_checkbox_create(lv_screen_active());
lv_checkbox_set_text(cb, "Banana");
lv_obj_add_state(cb, LV_STATE_CHECKED);
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);

cb = lv_checkbox_create(lv_screen_active());
lv_checkbox_set_text(cb, "Lemon");
lv_obj_add_state(cb, LV_STATE_DISABLED);
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);

cb = lv_checkbox_create(lv_screen_active());
lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED);
lv_checkbox_set_text(cb, "Melon\nand a new line");
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
MicroPython code | Online Simulator
def event_handler(e):
    code = e.get_code()
    obj = e.get_target_obj()
    if code == lv.EVENT.VALUE_CHANGED:
        txt = obj.get_text()
        if obj.get_state() & lv.STATE.CHECKED:
            state = "Checked"
        else:
            state = "Unchecked"
        print(txt + ":" + state)


lv.screen_active().set_flex_flow(lv.FLEX_FLOW.COLUMN)
lv.screen_active().set_flex_align(lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.START, lv.FLEX_ALIGN.CENTER)

cb = lv.checkbox(lv.screen_active())
cb.set_text("Apple")
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)

cb = lv.checkbox(lv.screen_active())
cb.set_text("Banana")
cb.add_state(lv.STATE.CHECKED)
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)

cb = lv.checkbox(lv.screen_active())
cb.set_text("Lemon")
cb.add_state(lv.STATE.DISABLED)
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)

cb = lv.checkbox(lv.screen_active())
cb.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED)
cb.set_text("Melon")
cb.add_event_cb(event_handler, lv.EVENT.ALL, None)

Styling a Slider

Styling a slider with LVGL

C code
lv_obj_t * slider = lv_slider_create(lv_screen_active());
lv_slider_set_value(slider, 70, LV_ANIM_OFF);
lv_obj_set_size(slider, 300, 20);
lv_obj_center(slider);

/*Add local styles to MAIN part (background rectangle)*/
lv_obj_set_style_bg_color(slider, lv_color_hex(0x0F1215), LV_PART_MAIN);
lv_obj_set_style_bg_opa(slider, 255, LV_PART_MAIN);
lv_obj_set_style_border_color(slider, lv_color_hex(0x333943), LV_PART_MAIN);
lv_obj_set_style_border_width(slider, 5, LV_PART_MAIN);
lv_obj_set_style_pad_all(slider, 5, LV_PART_MAIN);

/*Create a reusable style sheet for the INDICATOR part*/
static lv_style_t style_indicator;
lv_style_init(&style_indicator);
lv_style_set_bg_color(&style_indicator, lv_color_hex(0x37B9F5));
lv_style_set_bg_grad_color(&style_indicator, lv_color_hex(0x1464F0));
lv_style_set_bg_grad_dir(&style_indicator, LV_GRAD_DIR_HOR);
lv_style_set_shadow_color(&style_indicator, lv_color_hex(0x37B9F5));
lv_style_set_shadow_width(&style_indicator, 15);
lv_style_set_shadow_spread(&style_indicator, 5);
4
/*Add the style sheet to the slider's INDICATOR part*/
lv_obj_add_style(slider, &style_indicator, LV_PART_INDICATOR);

/*Add the same style to the KNOB part too and locally overwrite some properties*/
lv_obj_add_style(slider, &style_indicator, LV_PART_KNOB);

lv_obj_set_style_outline_color(slider, lv_color_hex(0x0096FF), LV_PART_KNOB);
lv_obj_set_style_outline_width(slider, 3, LV_PART_KNOB);
lv_obj_set_style_outline_pad(slider, -5, LV_PART_KNOB);
lv_obj_set_style_shadow_spread(slider, 2, LV_PART_KNOB);
MicroPython code | Online Simulator
# Create a slider and add the style
slider = lv.slider(lv.screen_active())
slider.set_value(70, lv.ANIM.OFF)
slider.set_size(300, 20)
slider.center()

# Add local styles to MAIN part (background rectangle)
slider.set_style_bg_color(lv.color_hex(0x0F1215), lv.PART.MAIN)
slider.set_style_bg_opa(255, lv.PART.MAIN)
slider.set_style_border_color(lv.color_hex(0x333943), lv.PART.MAIN)
slider.set_style_border_width(5, lv.PART.MAIN)
slider.set_style_pad_all(5, lv.PART.MAIN)

# Create a reusable style sheet for the INDICATOR part
style_indicator = lv.style_t()
style_indicator.init()
style_indicator.set_bg_color(lv.color_hex(0x37B9F5))
style_indicator.set_bg_grad_color(lv.color_hex(0x1464F0))
style_indicator.set_bg_grad_dir(lv.GRAD_DIR.HOR)
style_indicator.set_shadow_color(lv.color_hex(0x37B9F5))
style_indicator.set_shadow_width(15)
style_indicator.set_shadow_spread(5)

# Add the style sheet to the slider's INDICATOR part
slider.add_style(style_indicator, lv.PART.INDICATOR)
slider.add_style(style_indicator, lv.PART.KNOB)

# Add the same style to the KNOB part too and locally overwrite some properties
slider.set_style_outline_color(lv.color_hex(0x0096FF), lv.PART.KNOB)
slider.set_style_outline_width(3, lv.PART.KNOB)
slider.set_style_outline_pad(-5, lv.PART.KNOB)
slider.set_style_shadow_spread(2, lv.PART.KNOB)

English, Hebrew (mixed LTR-RTL) and Chinese texts

English, Hebrew and Chinese texts with LVGL

C code
lv_obj_t * ltr_label = lv_label_create(lv_screen_active());
lv_label_set_text(ltr_label, "In modern terminology, a microcontroller is similar to a system on a chip (SoC).");
lv_obj_set_style_text_font(ltr_label, &lv_font_montserrat_16, 0);
lv_obj_set_width(ltr_label, 310);
lv_obj_align(ltr_label, LV_ALIGN_TOP_LEFT, 5, 5);

lv_obj_t * rtl_label = lv_label_create(lv_screen_active());
lv_label_set_text(rtl_label,"מעבד, או בשמו המלא יחידת עיבוד מרכזית (באנגלית: CPU - Central Processing Unit).");
lv_obj_set_style_base_dir(rtl_label, LV_BASE_DIR_RTL, 0);
lv_obj_set_style_text_font(rtl_label, &lv_font_dejavu_16_persian_hebrew, 0);
lv_obj_set_width(rtl_label, 310);
lv_obj_align(rtl_label, LV_ALIGN_LEFT_MID, 5, 0);

lv_obj_t * cz_label = lv_label_create(lv_screen_active());
lv_label_set_text(cz_label,
                  "嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。");
lv_obj_set_style_text_font(cz_label, &lv_font_simsun_16_cjk, 0);
lv_obj_set_width(cz_label, 310);
lv_obj_align(cz_label, LV_ALIGN_BOTTOM_LEFT, 5, -5);
MicroPython code | Online Simulator
ltr_label = lv.label(lv.screen_active())
ltr_label.set_text("In modern terminology, a microcontroller is similar to a system on a chip (SoC).")
ltr_label.set_style_text_font(lv.font_montserrat_16, 0);

ltr_label.set_width(310)
ltr_label.align(lv.ALIGN.TOP_LEFT, 5, 5)

rtl_label = lv.label(lv.screen_active())
rtl_label.set_text("מעבד, או בשמו המלא יחידת עיבוד מרכזית (באנגלית: CPU - Central Processing Unit).")
rtl_label.set_style_base_dir(lv.BASE_DIR.RTL, 0)
rtl_label.set_style_text_font(lv.font_dejavu_16_persian_hebrew, 0)
rtl_label.set_width(310)
rtl_label.align(lv.ALIGN.LEFT_MID, 5, 0)

font_simsun_16_cjk = lv.font_load("S:../../assets/font/lv_font_simsun_16_cjk.fnt")

cz_label = lv.label(lv.screen_active())
cz_label.set_style_text_font(font_simsun_16_cjk, 0)
cz_label.set_text("嵌入式系统(Embedded System),\n是一种嵌入机械或电气系统内部、具有专一功能和实时计算性能的计算机系统。")
cz_label.set_width(310)
cz_label.align(lv.ALIGN.BOTTOM_LEFT, 5, -5)

▶️ Get started

This list will guide you to get started with LVGL step-by-step.

Get Familiar with LVGL

  1. Check the Online demos to see LVGL in action (3 minutes)
  2. Read the Introduction page of the documentation (5 minutes)
  3. Get familiar with the basics on the Quick overview page (15 minutes)

Start to Use LVGL

  1. Set up a Simulator (10 minutes)
  2. Try out some Examples
  3. Port LVGL to a board. See the Porting guide or check the ready to use Projects

Become a Pro

  1. Read the Overview page to get a better understanding of the library (2-3 hours)
  2. Check the documentation of the Widgets to see their features and usage

Get Help and Help Others

  1. If you have questions go to the Forum
  2. Read the Contributing guide to see how you can help to improve LVGL (15 minutes)

🤝 Services

LVGL LLC was established to provide a solid background for LVGL library and to offer several type of services to help you in UI development. With 15+ years of experience in the user interface and graphics industry we can help you the bring your UI to the next level.

  • Graphics design Our in-house graphics designers are experts in creating beautiful modern designs which fit to your product and the resources of your hardware.
  • UI implementation We can also implement your UI based on the design you or we have created. You can be sure that we will make the most out of your hardware and LVGL. If a feature or widget is missing from LVGL, don't worry, we will implement it for you.
  • Consulting and Support We can support you with consulting as well to avoid pricey and time consuming mistakes during the UI development.
  • Board certification For companies who are offering development boards, or production ready kits we do board certification which shows how board can run LVGL.

Check out our Demos as reference. For more information take look at the Services page.

Contact us and tell how we can help.

🌟 Contributing

LVGL is an open project and contribution is very welcome. There are many ways to contribute from simply speaking about your project, through writing examples, improving the documentation, fixing bugs or even hosting your own project under the LVGL organization.

For a detailed description of contribution opportunities visit the Contributing section of the documentation.

More than 300 people already left their fingerprint in LVGL. Be one them! See you here! 🙂

... and many other.

lvgl_esp32_drivers's People

Contributors

abraaocsantana avatar alnef avatar arktrin avatar baoshi avatar c47d avatar chenghongyao avatar cranial-smoke avatar dimdk avatar jsmestad avatar kisvegabor avatar liebman avatar mam-pascal avatar mringwal avatar rajssss avatar ropg avatar sidwarkd avatar tore-espressif avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lvgl_esp32_drivers's Issues

XPT2046 improvement discussion

I've been having an issue with this input driver with spurious input events. This is where the IRQ line goes low for ~ 8us, measured with a scope. Looking at other implementations I see that some compute the Z (or press pressure). Maybe this should only return a new input based on some Z threshold.

Now the datasheet is very confusing on this subject and gives formula that require knowing the X and or Y resistance values. (currently I'm playing with what this library does.)

Any thoughts?

ST7735S: Display no longer works if RST pin is not selected

Hello, thank you for maintaining this amazing library, saved a lot of my work.
I am trying to save some pins and decided not to use RST pin, hoping that the software reset will do the job, also I have connected RST pin to 3.3V.
But it just doesn't work. I have noticed that the source (st7735s.c) has the required code missing:

	//Initialize non-SPI GPIOs
        gpio_pad_select_gpio(ST7735S_DC);
	gpio_set_direction(ST7735S_DC, GPIO_MODE_OUTPUT);

#if ST7735S_USE_RST
        gpio_pad_select_gpio(ST7735S_RST);
	gpio_set_direction(ST7735S_RST, GPIO_MODE_OUTPUT);

	//Reset the display
	gpio_set_level(ST7735S_RST, 0);
	vTaskDelay(100 / portTICK_RATE_MS);
	gpio_set_level(ST7735S_RST, 1);
	vTaskDelay(100 / portTICK_RATE_MS);
#endif

I have tried adding st7735s_send_cmd(TFT_SWRST);
but still don't know why it doesn't work even after that, here is how it looks:

	//Initialize non-SPI GPIOs
        gpio_pad_select_gpio(ST7735S_DC);
	gpio_set_direction(ST7735S_DC, GPIO_MODE_OUTPUT);

#if ST7735S_USE_RST
        gpio_pad_select_gpio(ST7735S_RST);
	gpio_set_direction(ST7735S_RST, GPIO_MODE_OUTPUT);

	//Reset the display
	gpio_set_level(ST7735S_RST, 0);
	vTaskDelay(100 / portTICK_RATE_MS);
	gpio_set_level(ST7735S_RST, 1);
	vTaskDelay(100 / portTICK_RATE_MS);
#else
	st7735s_send_cmd(TFT_SWRST);
#endif

Not sure what else I should do to fix this issue.

Support for DLCP2607

I recently bought the DLPDLCR2000EVM evaluation board from TI which features the DLCP2607 chip as a display controller. The product details mention 24-bit RGB, BT656 and a parallel interface although it also mentions I2C and SPI in the programmers guide.

I already got the display running with a RPi Zero but due to several reasons I would like to hook it up to an ESP32. Could someone more experienced than me tell me if this is already supported (or maybe impossible)?

Using a third SPI peripheral with LVGLs Display and Touch drivers

Describe the issue
I'm using an ESP32 with a ILI9341 driver display and a XPT2046 touch driver. They're both running on HSPI.

I'm trying to incorporate another SPI peripheral in the same bus (HSPI).

In the ESP32 documentation it says it is possible to have 3 peripherals per SPI bus.

When I try to use the same SPI bus for all of these, I get the error:

E (8973) spi: SPI2 already claimed by spi master.
E (8983) spi_master: spi_bus_initialize(232): host already in use

I am initializing the 3rd SPI peripheral like this:

  spi_bus_config_t bus = {
       .miso_io_num = 19,
       .mosi_io_num = 13,
       .sclk_io_num = 14,
       .quadwp_io_num = -1,
       .quadhd_io_num = -1,
       .max_transfer_sz = 0};

   ret = spi_bus_initialize(HSPI_HOST, &bus, 1);
   assert(ret == ESP_OK);

   spi_device_interface_config_t dev = {
       .clock_speed_hz = 9000000,
       .mode = 0,
       .spics_io_num = 5,
       .queue_size = 1,
       .flags = 0,
       .pre_cb = NULL};
   ret = spi_bus_add_device(HSPI_HOST, &dev, &__spi);

As for LVGL, I'm using the same SPI pins and

DISP_SPI_CS 12
TOUCH_SPI_CS 32

I am initializing LVGL first and only (works normally, both the display and the touch panel) and then the other peripheral, on a separate task.

ESP32 Chip version
ESP32-WROOM-32

ESP-IDF version
ESP-IDF 4.1

Development kit used
ESP 32 DEVKIT V1

Development machine OS
Ubuntu 14.04.5 LTS

Support for TK043F1569

Introduce the problem

I recently purchased 2x displays with adapters to use with the ESP32 DevKit V4 (WROVER-IE) and the Espressif LCDKit v1.1
Based on advice from EspressIf (TK043F1508 ) and from users (link below) I ordered what I thought was the correct module.
https://github.com/espressif/esp-iot-solution/issues/89#issue-674226075

I purchased the display modules from the following link:
https://buy.tbfocus.com/item.php?id=560872117142#3512775208514

Upon receiving the modules I find that the pins are (slightly different) but more important that the controller has changed from NT35510 or RM68120 to LG4572

Suggested solution

Any chance to get a driver adapted to support the LG4572 when used together with the DevKit and LCDKit mentioned above?

FC_20210408_0026

Datasheet.hk_lg4572b_8093633.pdf

Display orientation doesn't change on ssd1306 on setting through menuconfig

Display doesn't rotate on setting the option through menuconfig.

void ssd1306_init()
{
	esp_err_t ret;
	i2c_cmd_handle_t cmd = i2c_cmd_link_create();

	i2c_master_start(cmd);
	i2c_master_write_byte(cmd, (OLED_I2C_ADDRESS << 1) | I2C_MASTER_WRITE, true);
	i2c_master_write_byte(cmd, OLED_CONTROL_BYTE_CMD_STREAM, true);

	i2c_master_write_byte(cmd, OLED_CMD_SET_CHARGE_PUMP, true);
	i2c_master_write_byte(cmd, 0x14, true);
    i2c_master_write_byte(cmd, 0xA0, true);
	i2c_master_write_byte(cmd, 0xC0, true);
	i2c_master_write_byte(cmd, OLED_CMD_SET_CONTRAST, true);

on changing init function as follows, the display rotates. Should I add the following feature through a PR ?

on line 150, in ssd1306.c, you have done this, there's no use of the macro, both if/else have the same code written, should this be removed ?

#if defined CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE		
    row1 = area->y1>>3;
    row2 = area->y2>>3;
#else
    row1 = area->y1>>3;
    row2 = area->y2>>3;
#endif

Question: platformio support recommendation together for Arduino

I am trying to use this using platformio with Arduino framework but I noticed that when I reference to this repository that all driver headers and c files are compiled. However, this is an issue when you just want to use one single driver (in my case ILI9341) because a lot of macro´s are not defined, specially a lot of error around EVE_XXX macro´s and what not.
I think this is because the header/c file will always be compiled by platformio where as in the cmake files they are excluded from the build based on menuconfig/cmake builds.

When I strip out all drivers except ILI9341 I can run the display fine, which is pretty cool I must say 👍

Is there any trick/recommendation to use this from platformio builds?

M5Stack Core2

I'm cutting this issue to attempt to get some feedback on how this works with the M5Stack Core2 (and to highlight a few differences / give some real world thoughs that could help the future refactoring efforts in #1 and #44.

I have an M5Stack Core2, which is fairly similar to the M5Stack Basic, however a few of the GPIOs change, and some move to being on the attached AXP192 power chip (driven over I2C). Details on pins at https://docs.m5stack.com/en/core/core2

Differences:

Function M5Stack M5Stack Core2
MISO GPIO 19 GPIO 38
MOSI GPIO 23 GPIO 23
CLK GPIO 18 GPIO 18
CS GPIO 14 GPIO 5
CS GPIO 27 GPIO 15
RST GPIO 33 AXP IO4
BL GPIO 32 AXP DC3

The AXP192 is accessed via I2C (an example of this is found in https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/blob/master/Blinky-Hello-World/components/core2forAWS/tft/ili9341.c#L89-L93 and the drivers for this are in https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/tree/master/Blinky-Hello-World/components/core2forAWS/axp192)

So the process of initializing this setup includes doing non-GPIO activities to reset the display. My guess for doing this properly right now is to define some more M5Stack Core2 defines and have a couple of #ifdefed methods to slap the I2C bus for the reset and backlight changes. Alternatively, I could add some callbacks for these parts.

So I guess this adds a specific example of why the transport needs to be detached from both the display code (here SPI based) as well as the backlight code (I2C based), but also highlights that there's a possible higher layer code that connects these in a pre-configured sense (e.g. perhaps providing m5stack_basic_display_init() / m5stack_core2_display_init() etc.)

Hoping this helps @zladay in working out the hal approach.

Also of note, the M5Stack actually uses a IL9342C not a IL9341 - the differences as far as I can tell are the orientation (320x240 rather than 240x320), the backlight is controlled by PWM rather than just on/off, there are 4 gamma options rather than just 1, and a few different commands. Additionally, it has a touch screen (FT6336U based).

Kconfig refactoring

Yes, I've seen the request, but it is going to be far more complicated than that.

Currently all KConfig options are global: display orientation, connection(I2C/SPI), pinout, color inversion.... A mere addition of the .c file to compilation list will not be sufficient.

Even LVGL itself is compiled with fixed resolution.
EDIT: LVGL supports multiple screen, so I see the reasoning behind this.

Let me know if there is something obvious that I'm missing

Originally posted by @tore-espressif in #39 (comment)

Allow little-endian for ST7789

I found that I can insert
{ST7789_DISPON, {0}, 0x80}, //existing line
#if LV_COLOR_16_SWAP == 0 // Test: enable little endian.
{ST7789_RAMCTRL, {0, 8}, 2}, // Test: enable little endian.
#endif //DL: enable little endian.
{0, {0}, 0xff}, //existing line
to st7789_init_cmds in st7789.c
and now I can build with CONFIG_LV_COLOR_16_SWAP=n
and make LVGL code 500 bytes smaller and more efficient.

Note that ST7789VW doc says "Note: Little Endian only can be supported in 65K 8-bit and 9-bit interface.", so this trick may not work for everyone, but it seem to work for me (I am using SPI, of course).

Also, it will be nice to remove "static" from "static void st7789_send_cmd(uint8_t cmd)" and "static void st7789_send_data(void * data, uint16_t length)"
so I can experiment with register programming from my own code.

Thank you

Build. Error

I followed the readme. Add submodules in components etc. and configure it.
Then i get the compile error.

components/lvgl_esp32_drivers/lvgl_helpers.c:22:10: fatal error: src/lv_core/lv_refr.h: No such file or directory
 #include "src/lv_core/lv_refr.h"
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Compiling .pio/build/esp32dev/lwip/apps/dhcpserver/dhcpserver.o
Compiling .pio/build/esp32dev/lwip/apps/ping/esp_ping.o
*** [.pio/build/esp32dev/components/lvgl_esp32_drivers/lvgl_helpers.o] Error 1
components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c: In function 'spi_ready':
components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c:313:29: warning: passing argument 1 of 'lv_disp_flush_ready' from incompatible pointer type [-Wincompatible-pointer-types]
         lv_disp_flush_ready(&disp->driver);
                             ^~~~~~~~~~~~~
In file included from components/lvgl/src/hal/lv_hal.h:16,
                 from components/lvgl/lvgl.h:30,
                 from components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c:23:
components/lvgl/src/hal/lv_hal_disp.h:294:67: note: expected 'lv_disp_drv_t *' {aka 'struct _lv_disp_drv_t *'} but argument is of type 'lv_disp_drv_t **' {aka 'struct _lv_disp_drv_t **'}
 LV_ATTRIBUTE_FLUSH_READY void lv_disp_flush_ready(lv_disp_drv_t * disp_drv);
                                                   ~~~~~~~~~~~~~~~~^~~~~~~~```

Necessary updates for LVGL v8

@tore-espressif @kisvegabor @embeddedt
Is there anything special we should add to the drivers in order to support v8? Here's a list of what I think is necessary:

  • Orientation awareness: Current rotation doesn't align with LVGL orientation, we have portrait, portrait inverted, landscape and landscape inverted, LVGL has orientation in 90° rotation.
  • Update display driver member names.
  • Update LVGL initialization.
  • Drivers now need to know their size in order to be initialized (LV_HOR_RES_MAX and LV_VER_RES_MAX no longer exist).

nscreen32 support

I could make my app work on an esp32-wrover kit without any problems thanks to your great lib.
I then ordered the nscreen32, the "1st lvgl certified board in the world", but there seems to be no predefined configuration in menuconfig for it. Even if it's ST7796 TFT controller is available in the options, the Goodix touch controller does not seem supported yet.
Also, the code provided for the board seems to be arduino code only, but not really a component I can use out of the box with the esp-idf.
Are there any plans from lvgl to support the nscreen32 ?

Unable to use multiple display types.

LVGL supports multiple displays, but lvgl_esp32_drivers will only compile one of the TFT display drivers, and there is no way to enable more than one display via menuconfig. CMakeLists.txt will only build one TFT driver (see source) and lvgl_helpers.c is coupled to the one enabled driver.

Can the configuration be modified to allow multiple enabled drivers? Another option might be to simply enable them all and rely on the linker to leave out the unused drivers.

Document rotation support on display drivers README section

For some displays the rotation of the image can be accomplished by sending a command to the driver, while on others the display driver code need to swap the pixels.

Currently not all the drivers have rotation support, and some others relied on Kconfig options that are no longer available, two of those options are now in the LVGL configuration, LV_HOR_RES_MAX and LV_VER_RES_MAX.

So we need to update the display drivers README section to point this out.

support of parallel displays 16/8-bit

Is there any plan for adding parallel display support?
I am thinking a separate component to handle 8/16-bit I/Os, like disp_i2s_parallel. We can add support there, and modify the display drivers accordingly, also adding config support for SPI and 8/16 bit selection.

Display glitched after update from v7.3.1 to v7.11

I've been using LVGL for a while now. I began a project long ago and was using LVGL v7.3.1.

I've now returned and decided to update LVGL. I updated it to release/v7 and also updated lvgl_esp32_drivers to master.

My display is not displaying the image correctly now:
glitched_display

It seems to be duplicating/mirroring the image vertically. There should only be one of those shapes.

Is there any breaking change in either config or the way LVGL should be initialized between these versions that might cause this?
I've checked menuconfig and it all seems normal to me.

Running on:
ESP32
2.4" TFT ILI9341 with XPT2046 touch controller
connected by HSPI

LVGL8 Not Working Maybe BUFFER Problems. ILI9341

Device: ESP32 16mb flash
Display Res: 240x320

I tried some things. Custom Buffersize.
set the DISP_BUF_SIZE like:

#if defined (CONFIG_CUSTOM_DISPLAY_BUFFER_SIZE)
    #define DISP_BUF_SIZE   CONFIG_CUSTOM_DISPLAY_BUFFER_BYTES
#elif (LVGL_VERSION_MAJOR < 8)
    #if defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789)
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * LV_VER_RES_MAX)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306
        #if defined (CONFIG_LV_THEME_MONO)
            #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * (LV_VER_RES_MAX / 8))
        #else
            #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * LV_VER_RES_MAX)
        #endif
    #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X)
        #define DISP_BUF_LINES  40
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * DISP_BUF_LINES)
    #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820)
        #define DISP_BUF_SIZE (LV_VER_RES_MAX * IL3820_COLUMNS)
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01)
        #define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
    #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A)
        #define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 5KB
    #elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D)
        #define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 2888 bytes
    #elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9163C
        #define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
    #endif
#else
    #if defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
        #define DISP_BUF_SIZE  (240 * 10)
    #else
        #error "No display controller selected or you dont set custom buffer and use the lvgl v8+ version"
#endif
#endif

i tried also 240 * 40
On the Display change a drawed white area but i cant see the label what i set. and the task that i use dosnt fire.

LVGL programm part:

// Definition aller Objekte in dieser Klasse
lv_obj_t * gui_mainmenu_state;

// Tasks
static void gui_mainmenu_display_task_grad_update(lv_timer_t * timer);
static void gui_mainmenu_display_asyc_grad_update(void* p);

// Definition aller in dieser Datei vorkommenden Funktionen
//Events

//Styles

// Hauptmenü Ansicht

void gui_view_mainmenu(void)
{
  lv_obj_clean(lv_scr_act()); // Leere den Bildschirm
  gui_mainmenu_state = lv_label_create(lv_scr_act());
  lv_label_set_text(gui_mainmenu_state, "N.A. Grad");
  lv_obj_set_style_text_align(gui_mainmenu_state, LV_TEXT_ALIGN_CENTER, 0);
  lv_obj_align(gui_mainmenu_state, LV_ALIGN_CENTER, 0, 0);


  lv_timer_t * timer = lv_timer_create(gui_mainmenu_display_task_grad_update, 100, NULL);
}


// Tasks
static void gui_mainmenu_display_task_grad_update(lv_timer_t * timer)
{
  lv_label_set_text(gui_mainmenu_state, "0 Grad");
  lv_obj_set_style_text_align(gui_mainmenu_state, LV_TEXT_ALIGN_CENTER, 0);
  lv_obj_align(gui_mainmenu_state, LV_ALIGN_CENTER, 0, 0);   
  ESP_LOGI(TAG, "Ich Laufe\n");
}


static void gui_mainmenu_display_asyc_grad_update(void* p)
{

}

Statup Log:

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:9436
ho 0 tail 12 room 4
load:0x40078000,len:17920
load:0x40080400,len:4616
0x40080400: _init at ??:?

entry 0x40080720
I (29) boot: ESP-IDF v4.4-dev-960-gcf457d412 2nd stage bootloader
I (29) boot: compile time 13:59:25
D (29) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (37) boot: chip revision: 3
I (40) boot_comm: chip revision: 3, min. bootloader chip revision: 0
D (47) boot.esp32: magic e9
D (50) boot.esp32: segments 03
D (53) boot.esp32: spi_mode 02
D (56) boot.esp32: spi_speed 00
D (60) boot.esp32: spi_size 04
I (63) boot.esp32: SPI Speed      : 40MHz
I (67) boot.esp32: SPI Mode       : DIO
I (72) boot.esp32: SPI Flash Size : 16MB
D (76) boot: Enabling RTCWDT(9000 ms)
I (80) boot: Enabling RNG early entropy source...
D (86) bootloader_flash: mmu set paddr=00010000 count=1 size=c00 src_addr=10000 src_addr_aligned=10000
D (95) boot: mapped partition table 0x10000 at 0x3f400000
D (100) flash_parts: partition table verified, 5 entries
I (106) boot: Partition Table:
I (110) boot: ## Label            Usage          Type ST Offset   Length
D (117) boot: load partition table entry 0x3f400000
D (122) boot: type=1 subtype=2
I (125) boot:  0 nvs              WiFi data        01 02 00011000 00006000
D (133) boot: load partition table entry 0x3f400020
D (137) boot: type=1 subtype=1
I (141) boot:  1 phy_init         RF data          01 01 00017000 00001000
D (148) boot: load partition table entry 0x3f400040
D (153) boot: type=0 subtype=0
I (156) boot:  2 factory          factory app      00 00 00020000 000fa000
D (164) boot: load partition table entry 0x3f400060
D (169) boot: type=1 subtype=82
I (172) boot:  3 storage          Unknown data     01 82 0011a000 00edc000
I (180) boot: End of partition table
D (184) boot: Trying partition index -1 offs 0x20000 size 0xfa000
D (190) esp_image: reading image header @ 0x20000
D (195) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
D (202) esp_image: image header: 0xe9 0x06 0x02 0x04 400816dc
I (207) boot_comm: chip revision: 3, min. application chip revision: 0
V (215) esp_image: loading segment header 0 at offset 0x20018
V (220) esp_image: segment data length 0x1813c data starts 0x20020
V (227) esp_image: segment 0 map_segment 1 segment_data_offs 0x20020 load_addr 0x3f400020
I (235) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=1813ch ( 98620) map
D (243) esp_image: free data page_count 0x00000032
D (248) bootloader_flash: mmu set paddr=00020000 count=2 size=1813c src_addr=20020 src_addr_aligned=20000
V (293) esp_image: loading segment header 1 at offset 0x3815c
D (293) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (294) esp_image: segment data length 0x2738 data starts 0x38164
V (301) esp_image: segment 1 map_segment 0 segment_data_offs 0x38164 load_addr 0x3ffb0000
I (309) esp_image: segment 1: paddr=00038164 vaddr=3ffb0000 size=02738h ( 10040) load
D (317) esp_image: free data page_count 0x00000032
D (322) bootloader_flash: mmu set paddr=00030000 count=1 size=2738 src_addr=38164 src_addr_aligned=30000
V (336) esp_image: loading segment header 2 at offset 0x3a89c
D (338) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (344) esp_image: segment data length 0x5774 data starts 0x3a8a4
V (351) esp_image: segment 2 map_segment 0 segment_data_offs 0x3a8a4 load_addr 0x40080000
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

I (359) esp_image: segment 2: paddr=0003a8a4 vaddr=40080000 size=05774h ( 22388) load
D (367) esp_image: free data page_count 0x00000032
D (372) bootloader_flash: mmu set paddr=00030000 count=2 size=5774 src_addr=3a8a4 src_addr_aligned=30000
V (391) esp_image: loading segment header 3 at offset 0x40018
D (391) bootloader_flash: mmu set block paddr=0x00040000 (was 0xffffffff)
V (394) esp_image: segment data length 0x49a28 data starts 0x40020
V (401) esp_image: segment 3 map_segment 1 segment_data_offs 0x40020 load_addr 0x400d0020
0x400d0020: _stext at ??:?

I (409) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=49a28h (301608) map
D (417) esp_image: free data page_count 0x00000032
D (422) bootloader_flash: mmu set paddr=00040000 count=5 size=49a28 src_addr=40020 src_addr_aligned=40000
V (539) esp_image: loading segment header 4 at offset 0x89a48
D (539) bootloader_flash: mmu set block paddr=0x00080000 (was 0xffffffff)
V (540) esp_image: segment data length 0x135a0 data starts 0x89a50
V (546) esp_image: segment 4 map_segment 0 segment_data_offs 0x89a50 load_addr 0x40085774
0x40085774: _lock_release at /Users/trackhe/esp/esp-idf/components/newlib/locks.c:206

I (555) esp_image: segment 4: paddr=00089a50 vaddr=40085774 size=135a0h ( 79264) load
D (563) esp_image: free data page_count 0x00000032
D (568) bootloader_flash: mmu set paddr=00080000 count=2 size=135a0 src_addr=89a50 src_addr_aligned=80000
V (611) esp_image: loading segment header 5 at offset 0x9cff0
D (611) bootloader_flash: mmu set block paddr=0x00090000 (was 0xffffffff)
V (612) esp_image: segment data length 0x10 data starts 0x9cff8
V (618) esp_image: segment 5 map_segment 0 segment_data_offs 0x9cff8 load_addr 0x50000000
I (626) esp_image: segment 5: paddr=0009cff8 vaddr=50000000 size=00010h (    16) load
D (635) esp_image: free data page_count 0x00000032
D (640) bootloader_flash: mmu set paddr=00090000 count=1 size=10 src_addr=9cff8 src_addr_aligned=90000
V (649) esp_image: image start 0x00020000 end of last section 0x0009d008
D (656) bootloader_flash: mmu set block paddr=0x00090000 (was 0xffffffff)
D (663) boot: Calculated hash: af05da3e59e60c4aae9e94c18be906fc55fe166bb9207484db52462e398bc6bb
D (672) bootloader_flash: mmu set paddr=00090000 count=1 size=20 src_addr=9d010 src_addr_aligned=90000
D (681) bootloader_flash: mmu set paddr=00090000 count=1 size=20 src_addr=9d010 src_addr_aligned=90000
I (705) boot: Loaded app from partition at offset 0x20000
I (705) boot: Disabling RNG early entropy source...
D (705) boot: Mapping segment 0 as DROM
D (709) boot: Mapping segment 3 as IROM
D (713) boot: calling set_cache_and_start_app
D (717) boot: configure drom and irom and start
V (722) boot: d mmu set paddr=00020000 vaddr=3f400000 size=98620 n=2
V (728) boot: rc=0
V (730) boot: rc=0
V (733) boot: i mmu set paddr=00040000 vaddr=400d0000 size=301608 n=5
V (739) boot: rc=0
V (741) boot: rc=0
D (743) boot: start: 0x400816dc
0x400816dc: call_start_cpu0 at /Users/trackhe/esp/esp-idf/components/esp_system/port/cpu_start.c:268

D (758) efuse: In EFUSE_BLK0__DATA3_REG is used 3 bits starting with 9 bit
D (758) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 2 bit
I (763) psram: This chip is ESP32-D0WD
I (769) spiram: Found 64MBit SPI RAM device
I (772) spiram: SPI RAM mode: flash 40m sram 40m
I (777) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (784) cpu_start: Pro cpu up.
D (788) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 15 bit
D (795) efuse: In EFUSE_BLK0__DATA5_REG is used 1 bits starting with 20 bit
D (802) efuse: In EFUSE_BLK0__DATA3_REG is used 3 bits starting with 9 bit
D (809) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 2 bit
I (816) cpu_start: Starting app cpu, entry point is 0x4008162c
0x4008162c: call_start_cpu1 at /Users/trackhe/esp/esp-idf/components/esp_system/port/cpu_start.c:153

I (0) cpu_start: App cpu up.
I (1707) spiram: SPI SRAM memory test OK
D (1715) clk: RTC_SLOW_CLK calibration value: 2995930
I (1720) cpu_start: Pro cpu start user code
I (1720) cpu_start: cpu freq: 240000000
I (1720) cpu_start: Application information:
I (1725) cpu_start: Project name:     main
I (1730) cpu_start: App version:      2ccbcbe-dirty
I (1735) cpu_start: Compile time:     Jun 24 2021 21:52:04
I (1741) cpu_start: ELF file SHA256:  13b4aa0a088c247c...
I (1748) cpu_start: ESP-IDF:          v4.4-dev-960-gcf457d412
V (1754) memory_layout: reserved range is 0x3f41811c - 0x3f41815c
D (1760) memory_layout: Checking 8 reserved memory ranges:
D (1766) memory_layout: Reserved memory range 0x3f800000 - 0x3fc00000
D (1772) memory_layout: Reserved memory range 0x3ffae000 - 0x3ffae6e0
D (1779) memory_layout: Reserved memory range 0x3ffb0000 - 0x3ffb3730
D (1785) memory_layout: Reserved memory range 0x3ffe0000 - 0x3ffe0440
D (1792) memory_layout: Reserved memory range 0x3ffe3f20 - 0x3ffe4350
D (1798) memory_layout: Reserved memory range 0x40070000 - 0x40078000
D (1805) memory_layout: Reserved memory range 0x40078000 - 0x40080000
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

D (1811) memory_layout: Reserved memory range 0x40080000 - 0x40098d14
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

D (1818) memory_layout: Building list of available memory regions:
V (1824) memory_layout: Examining memory region 0x3f800000 - 0x3fc00000
V (1831) memory_layout: Region 0x3f800000 - 0x3fc00000 inside of reserved 0x3f800000 - 0x3fc00000
V (1840) memory_layout: Examining memory region 0x3ffae000 - 0x3ffb0000
V (1846) memory_layout: Start of region 0x3ffae000 - 0x3ffb0000 overlaps reserved 0x3ffae000 - 0x3ffae6e0
D (1856) memory_layout: Available memory region 0x3ffae6e0 - 0x3ffb0000
V (1863) memory_layout: Examining memory region 0x3ffb0000 - 0x3ffb8000
V (1869) memory_layout: Start of region 0x3ffb0000 - 0x3ffb8000 overlaps reserved 0x3ffb0000 - 0x3ffb3730
D (1879) memory_layout: Available memory region 0x3ffb3730 - 0x3ffb8000
V (1886) memory_layout: Examining memory region 0x3ffb8000 - 0x3ffc0000
D (1892) memory_layout: Available memory region 0x3ffb8000 - 0x3ffc0000
V (1899) memory_layout: Examining memory region 0x3ffc0000 - 0x3ffc2000
D (1906) memory_layout: Available memory region 0x3ffc0000 - 0x3ffc2000
V (1912) memory_layout: Examining memory region 0x3ffc2000 - 0x3ffc4000
D (1919) memory_layout: Available memory region 0x3ffc2000 - 0x3ffc4000
V (1926) memory_layout: Examining memory region 0x3ffc4000 - 0x3ffc6000
D (1932) memory_layout: Available memory region 0x3ffc4000 - 0x3ffc6000
V (1939) memory_layout: Examining memory region 0x3ffc6000 - 0x3ffc8000
D (1946) memory_layout: Available memory region 0x3ffc6000 - 0x3ffc8000
V (1952) memory_layout: Examining memory region 0x3ffc8000 - 0x3ffca000
D (1959) memory_layout: Available memory region 0x3ffc8000 - 0x3ffca000
V (1966) memory_layout: Examining memory region 0x3ffca000 - 0x3ffcc000
D (1973) memory_layout: Available memory region 0x3ffca000 - 0x3ffcc000
V (1979) memory_layout: Examining memory region 0x3ffcc000 - 0x3ffce000
D (1986) memory_layout: Available memory region 0x3ffcc000 - 0x3ffce000
V (1993) memory_layout: Examining memory region 0x3ffce000 - 0x3ffd0000
D (1999) memory_layout: Available memory region 0x3ffce000 - 0x3ffd0000
V (2006) memory_layout: Examining memory region 0x3ffd0000 - 0x3ffd2000
D (2013) memory_layout: Available memory region 0x3ffd0000 - 0x3ffd2000
V (2019) memory_layout: Examining memory region 0x3ffd2000 - 0x3ffd4000
D (2026) memory_layout: Available memory region 0x3ffd2000 - 0x3ffd4000
V (2033) memory_layout: Examining memory region 0x3ffd4000 - 0x3ffd6000
D (2039) memory_layout: Available memory region 0x3ffd4000 - 0x3ffd6000
V (2046) memory_layout: Examining memory region 0x3ffd6000 - 0x3ffd8000
D (2053) memory_layout: Available memory region 0x3ffd6000 - 0x3ffd8000
V (2059) memory_layout: Examining memory region 0x3ffd8000 - 0x3ffda000
D (2066) memory_layout: Available memory region 0x3ffd8000 - 0x3ffda000
V (2073) memory_layout: Examining memory region 0x3ffda000 - 0x3ffdc000
D (2079) memory_layout: Available memory region 0x3ffda000 - 0x3ffdc000
V (2086) memory_layout: Examining memory region 0x3ffdc000 - 0x3ffde000
D (2093) memory_layout: Available memory region 0x3ffdc000 - 0x3ffde000
V (2100) memory_layout: Examining memory region 0x3ffde000 - 0x3ffe0000
D (2106) memory_layout: Available memory region 0x3ffde000 - 0x3ffe0000
V (2113) memory_layout: Examining memory region 0x3ffe0000 - 0x3ffe4000
V (2120) memory_layout: Start of region 0x3ffe0000 - 0x3ffe4000 overlaps reserved 0x3ffe0000 - 0x3ffe0440
V (2129) memory_layout: End of region 0x3ffe0440 - 0x3ffe4000 overlaps reserved 0x3ffe3f20 - 0x3ffe4350
D (2139) memory_layout: Available memory region 0x3ffe0440 - 0x3ffe3f20
V (2145) memory_layout: Examining memory region 0x3ffe4000 - 0x3ffe8000
V (2152) memory_layout: Start of region 0x3ffe4000 - 0x3ffe8000 overlaps reserved 0x3ffe3f20 - 0x3ffe4350
D (2162) memory_layout: Available memory region 0x3ffe4350 - 0x3ffe8000
V (2168) memory_layout: Examining memory region 0x3ffe8000 - 0x3fff0000
D (2175) memory_layout: Available memory region 0x3ffe8000 - 0x3fff0000
V (2182) memory_layout: Examining memory region 0x3fff0000 - 0x3fff8000
D (2188) memory_layout: Available memory region 0x3fff0000 - 0x3fff8000
V (2195) memory_layout: Examining memory region 0x3fff8000 - 0x3fffc000
D (2202) memory_layout: Available memory region 0x3fff8000 - 0x3fffc000
V (2208) memory_layout: Examining memory region 0x3fffc000 - 0x40000000
D (2215) memory_layout: Available memory region 0x3fffc000 - 0x40000000
V (2222) memory_layout: Examining memory region 0x40070000 - 0x40078000
V (2229) memory_layout: Region 0x40070000 - 0x40078000 inside of reserved 0x40070000 - 0x40078000
V (2237) memory_layout: Examining memory region 0x40078000 - 0x40080000
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2244) memory_layout: Region 0x40078000 - 0x40080000 inside of reserved 0x40078000 - 0x40080000
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2253) memory_layout: Examining memory region 0x40080000 - 0x40082000
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

0x40082000: esp_backtrace_print_from_frame at /Users/trackhe/esp/esp-idf/components/esp_system/port/arch/xtensa/debug_helpers.c:86

V (2260) memory_layout: Region 0x40080000 - 0x40082000 inside of reserved 0x40080000 - 0x40098d14
0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

0x40082000: esp_backtrace_print_from_frame at /Users/trackhe/esp/esp-idf/components/esp_system/port/arch/xtensa/debug_helpers.c:86

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2269) memory_layout: Examining memory region 0x40082000 - 0x40084000
0x40082000: esp_backtrace_print_from_frame at /Users/trackhe/esp/esp-idf/components/esp_system/port/arch/xtensa/debug_helpers.c:86

0x40084000: psram_spi_init at /Users/trackhe/esp/esp-idf/components/esp32/spiram_psram.c:670 (discriminator 33)

V (2275) memory_layout: Region 0x40082000 - 0x40084000 inside of reserved 0x40080000 - 0x40098d14
0x40082000: esp_backtrace_print_from_frame at /Users/trackhe/esp/esp-idf/components/esp_system/port/arch/xtensa/debug_helpers.c:86

0x40084000: psram_spi_init at /Users/trackhe/esp/esp-idf/components/esp32/spiram_psram.c:670 (discriminator 33)

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2284) memory_layout: Examining memory region 0x40084000 - 0x40086000
0x40084000: psram_spi_init at /Users/trackhe/esp/esp-idf/components/esp32/spiram_psram.c:670 (discriminator 33)

0x40086000: lv_draw_map at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_img.c:635

V (2291) memory_layout: Region 0x40084000 - 0x40086000 inside of reserved 0x40080000 - 0x40098d14
0x40084000: psram_spi_init at /Users/trackhe/esp/esp-idf/components/esp32/spiram_psram.c:670 (discriminator 33)

0x40086000: lv_draw_map at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_img.c:635

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2300) memory_layout: Examining memory region 0x40086000 - 0x40088000
0x40086000: lv_draw_map at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_img.c:635

0x40088000: mask_mix at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:1218
 (inlined by) line_mask_flat at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:580

V (2307) memory_layout: Region 0x40086000 - 0x40088000 inside of reserved 0x40080000 - 0x40098d14
0x40086000: lv_draw_map at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_img.c:635

0x40088000: mask_mix at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:1218
 (inlined by) line_mask_flat at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:580

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2316) memory_layout: Examining memory region 0x40088000 - 0x4008a000
0x40088000: mask_mix at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:1218
 (inlined by) line_mask_flat at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:580

0x4008a000: draw_bg_img at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_rect.c:379

V (2322) memory_layout: Region 0x40088000 - 0x4008a000 inside of reserved 0x40080000 - 0x40098d14
0x40088000: mask_mix at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:1218
 (inlined by) line_mask_flat at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_mask.c:580

0x4008a000: draw_bg_img at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_rect.c:379

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2331) memory_layout: Examining memory region 0x4008a000 - 0x4008c000
0x4008a000: draw_bg_img at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_rect.c:379

0x4008c000: spi_flash_restore_cache at /Users/trackhe/esp/esp-idf/components/spi_flash/cache_utils.c:335

V (2338) memory_layout: Region 0x4008a000 - 0x4008c000 inside of reserved 0x40080000 - 0x40098d14
0x4008a000: draw_bg_img at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/draw/lv_draw_rect.c:379

0x4008c000: spi_flash_restore_cache at /Users/trackhe/esp/esp-idf/components/spi_flash/cache_utils.c:335

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2347) memory_layout: Examining memory region 0x4008c000 - 0x4008e000
0x4008c000: spi_flash_restore_cache at /Users/trackhe/esp/esp-idf/components/spi_flash/cache_utils.c:335

0x4008e000: lv_memset_00 at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/misc/lv_mem.c:472

V (2354) memory_layout: Region 0x4008c000 - 0x4008e000 inside of reserved 0x40080000 - 0x40098d14
0x4008c000: spi_flash_restore_cache at /Users/trackhe/esp/esp-idf/components/spi_flash/cache_utils.c:335

0x4008e000: lv_memset_00 at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/misc/lv_mem.c:472

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2362) memory_layout: Examining memory region 0x4008e000 - 0x40090000
0x4008e000: lv_memset_00 at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/misc/lv_mem.c:472

0x40090000: __tzcalc_limits at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/time/tzcalc_limits.c:55

V (2369) memory_layout: Region 0x4008e000 - 0x40090000 inside of reserved 0x40080000 - 0x40098d14
0x4008e000: lv_memset_00 at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/lvgl/src/misc/lv_mem.c:472

0x40090000: __tzcalc_limits at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/time/tzcalc_limits.c:55

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2378) memory_layout: Examining memory region 0x40090000 - 0x40092000
0x40090000: __tzcalc_limits at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/time/tzcalc_limits.c:55

0x40092000: xQueueGenericCreateStatic at /Users/trackhe/esp/esp-idf/components/freertos/queue.c:341 (discriminator 1)

V (2385) memory_layout: Region 0x40090000 - 0x40092000 inside of reserved 0x40080000 - 0x40098d14
0x40090000: __tzcalc_limits at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/time/tzcalc_limits.c:55

0x40092000: xQueueGenericCreateStatic at /Users/trackhe/esp/esp-idf/components/freertos/queue.c:341 (discriminator 1)

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2394) memory_layout: Examining memory region 0x40092000 - 0x40094000
0x40092000: xQueueGenericCreateStatic at /Users/trackhe/esp/esp-idf/components/freertos/queue.c:341 (discriminator 1)

0x40094000: xTaskGetAffinity at /Users/trackhe/esp/esp-idf/components/freertos/tasks.c:4209

V (2400) memory_layout: Region 0x40092000 - 0x40094000 inside of reserved 0x40080000 - 0x40098d14
0x40092000: xQueueGenericCreateStatic at /Users/trackhe/esp/esp-idf/components/freertos/queue.c:341 (discriminator 1)

0x40094000: xTaskGetAffinity at /Users/trackhe/esp/esp-idf/components/freertos/tasks.c:4209

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2409) memory_layout: Examining memory region 0x40094000 - 0x40096000
0x40094000: xTaskGetAffinity at /Users/trackhe/esp/esp-idf/components/freertos/tasks.c:4209

0x40096000: spi_ll_set_address at /Users/trackhe/esp/esp-idf/components/hal/esp32/include/hal/spi_ll.h:820
 (inlined by) spi_hal_setup_trans at /Users/trackhe/esp/esp-idf/components/hal/spi_hal_iram.c:131

V (2416) memory_layout: Region 0x40094000 - 0x40096000 inside of reserved 0x40080000 - 0x40098d14
0x40094000: xTaskGetAffinity at /Users/trackhe/esp/esp-idf/components/freertos/tasks.c:4209

0x40096000: spi_ll_set_address at /Users/trackhe/esp/esp-idf/components/hal/esp32/include/hal/spi_ll.h:820
 (inlined by) spi_hal_setup_trans at /Users/trackhe/esp/esp-idf/components/hal/spi_hal_iram.c:131

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2425) memory_layout: Examining memory region 0x40096000 - 0x40098000
0x40096000: spi_ll_set_address at /Users/trackhe/esp/esp-idf/components/hal/esp32/include/hal/spi_ll.h:820
 (inlined by) spi_hal_setup_trans at /Users/trackhe/esp/esp-idf/components/hal/spi_hal_iram.c:131

0x40098000: spi_flash_chip_generic_get_write_protect at /Users/trackhe/esp/esp-idf/components/spi_flash/spi_flash_chip_generic.c:302

V (2432) memory_layout: Region 0x40096000 - 0x40098000 inside of reserved 0x40080000 - 0x40098d14
0x40096000: spi_ll_set_address at /Users/trackhe/esp/esp-idf/components/hal/esp32/include/hal/spi_ll.h:820
 (inlined by) spi_hal_setup_trans at /Users/trackhe/esp/esp-idf/components/hal/spi_hal_iram.c:131

0x40098000: spi_flash_chip_generic_get_write_protect at /Users/trackhe/esp/esp-idf/components/spi_flash/spi_flash_chip_generic.c:302

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

V (2441) memory_layout: Examining memory region 0x40098000 - 0x4009a000
0x40098000: spi_flash_chip_generic_get_write_protect at /Users/trackhe/esp/esp-idf/components/spi_flash/spi_flash_chip_generic.c:302

V (2447) memory_layout: Start of region 0x40098000 - 0x4009a000 overlaps reserved 0x40080000 - 0x40098d14
0x40098000: spi_flash_chip_generic_get_write_protect at /Users/trackhe/esp/esp-idf/components/spi_flash/spi_flash_chip_generic.c:302

0x40080000: _WindowOverflow4 at /Users/trackhe/esp/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1730

D (2457) memory_layout: Available memory region 0x40098d14 - 0x4009a000
V (2464) memory_layout: Examining memory region 0x4009a000 - 0x4009c000
D (2470) memory_layout: Available memory region 0x4009a000 - 0x4009c000
V (2477) memory_layout: Examining memory region 0x4009c000 - 0x4009e000
D (2484) memory_layout: Available memory region 0x4009c000 - 0x4009e000
V (2490) memory_layout: Examining memory region 0x4009e000 - 0x400a0000
D (2497) memory_layout: Available memory region 0x4009e000 - 0x400a0000
I (2504) heap_init: Initializing. RAM available for dynamic allocation:
D (2511) heap_init: New heap initialised at 0x3ffae6e0
I (2516) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (2522) heap_init: New heap initialised at 0x3ffb3730
I (2528) heap_init: At 3FFB3730 len 0002C8D0 (178 KiB): DRAM
I (2534) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (2540) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (2547) heap_init: New heap initialised at 0x40098d14
I (2552) heap_init: At 40098D14 len 000072EC (28 KiB): IRAM
I (2558) spiram: Adding pool of 4096K of external SPI memory to heap allocator
V (2567) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2573) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (2581) intr_alloc: Connected src 46 to int 2 (cpu 0)
D (2586) FLASH_HAL: extra_dummy: 1
V (2589) memspi: raw_chip_id: 1840C8

V (2593) memspi: chip_id: C84018

V (2597) memspi: raw_chip_id: 1840C8

V (2600) memspi: chip_id: C84018

D (2604) spi_flash: trying chip: issi
D (2608) spi_flash: trying chip: gd
I (2611) spi_flash: detected chip: gd
I (2616) spi_flash: flash io: dio
D (2620) cpu_start: calling init function: 0x40105a24
0x40105a24: _GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:348

D (2625) cpu_start: calling init function: 0x40105784
0x40105784: _GLOBAL__sub_I___cxa_get_globals_fast at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_globals.cc:145

D (2630) cpu_start: calling init function: 0x40103974
0x40103974: s_set_default_wifi_log_level at /Users/trackhe/esp/esp-idf/components/esp_wifi/src/wifi_init.c:72

D (2635) cpu_start: calling init function: 0x40100cec
0x40100cec: esp_ipc_init at /Users/trackhe/esp/esp-idf/components/esp_ipc/ipc.c:88

D (2641) cpu_start: calling init function: 0x400dcba0
0x400dcba0: _GLOBAL__sub_I__ZN8SPIClassC2Eh at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/libraries/SPI/src/SPI.cpp:308

D (2645) cpu_start: calling init function: 0x400dc9cc
0x400dc9cc: _GLOBAL__sub_I__ZN6StringC2EPKc at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/WString.cpp:863

D (2650) cpu_start: calling init function: 0x400dc558
0x400dc558: _GLOBAL__sub_I__ZN6Stream9timedReadEv at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/Stream.cpp:336

D (2655) cpu_start: calling init function: 0x400dc478
0x400dc478: _GLOBAL__sub_I__ZN5Print5writeEPKhj at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/Print.cpp:374

D (2661) cpu_start: calling init function: 0x400dc398
0x400dc398: _GLOBAL__sub_I__ZN9IPAddressC2Ev at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/IPAddress.cpp:122

D (2666) cpu_start: calling init function: 0x400dc2f4
0x400dc2f4: _GLOBAL__sub_I_Serial at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/HardwareSerial.cpp:221

D (2671) cpu_start: calling init function: 0x400dc1fc
0x400dc1fc: _GLOBAL__sub_I__Z19interruptFunctionalPv at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../components/arduino/cores/esp32/FunctionalInterrupt.cpp:40

D (2676) cpu_start: calling init function: 0x400dbb24
0x400dbb24: _GLOBAL__sub_I__ZN7ADS12564initEhhhj at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../main/ADS1256.cpp:318

D (2681) cpu_start: calling init function: 0x400db9d0
0x400db9d0: _GLOBAL__sub_I_adstemps at /Volumes/Containerdisk2/GitHub/heizbadsteuerung/build/../main/main.cpp:211

D (2686) cpu_start: calling init function: 0x400d2718
0x400d2718: esp_reset_reason_init at /Users/trackhe/esp/esp-idf/components/esp_system/port/soc/esp32/reset_reason.c:73

D (2691) cpu_start: calling init function: 0x400d19b0
0x400d19b0: esp_ota_init_app_elf_sha256 at /Users/trackhe/esp/esp-idf/components/app_update/esp_app_desc.c:76

V (2697) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2703) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC02
D (2711) intr_alloc: Connected src 17 to int 3 (cpu 0)
D (2716) cpu_start: Setting C++ exception workarounds.
D (2722) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 15 bit
D (2729) efuse: In EFUSE_BLK0__DATA5_REG is used 1 bits starting with 20 bit
V (2736) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2742) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (2750) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (2756) cpu_start: Starting scheduler on PRO CPU.
D (0) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 15 bit
D (0) efuse: In EFUSE_BLK0__DATA5_REG is used 1 bits starting with 20 bit
V (10) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (10) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E
D (20) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (30) cpu_start: Starting scheduler on APP CPU.
D (2830) heap_init: New heap initialised at 0x3ffe0440
D (2840) heap_init: New heap initialised at 0x3ffe4350
I (2840) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
D (2850) spiram: Allocating block of size 32768 bytes
V (2860) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2860) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (2860) intr_alloc: Connected src 16 to int 12 (cpu 0)
I (2880) HBS: Initializing
I (4280) lvgl_helpers: Display buffer size: 2400
I (4280) lvgl_helpers: Initializing shared SPI master
I (4280) lvgl_helpers: Configuring SPI host HSPI_HOST (1)
I (4290) lvgl_helpers: MISO pin: 12, MOSI pin: 13, SCLK pin: 14, IO2/WP pin: -1, IO3/HD pin: -1
I (4300) lvgl_helpers: Max transfer size: 4800 (bytes)
I (4310) lvgl_helpers: Initializing SPI bus...
D (4310) spi: SPI2 use iomux pins.
I (4320) disp_spi: Adding SPI device
I (4320) disp_spi: Clock speed: 80000000Hz, mode: 0, CS pin: 15
V (4320) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (4330) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x80E
D (4340) intr_alloc: Connected src 30 to int 3 (cpu 1)
V (4340) bus_lock: device registered on bus 1 slot 0.
D (4350) spi_hal: eff: 80000, limit: 80000k(/0), 0 dummy, -1 delay
D (4360) spi_master: SPI2: New device added to CS0, effective clock: 80000kHz
V (4360) bus_lock: device registered on bus 1 slot 1.
D (4370) spi_hal: eff: 2000, limit: 80000k(/0), 0 dummy, -1 delay
D (4380) spi_master: SPI2: New device added to CS1, effective clock: 2000kHz
I (4580) ILI9341: Initialization.
V bus_lock: dev 0 acquired.
V (4580) spi_master: polling trans
V bus_lock: SPI dev changed from -1 to 0
V (4590) spi_master: polling trans done
V (4590) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4600) spi_master: polling trans
V (4600) spi_master: polling trans done
V (4600) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4610) spi_master: polling trans
V (4610) spi_master: polling trans done
V (4620) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4620) spi_master: polling trans
V (4630) spi_master: polling trans done
V (4630) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4640) spi_master: polling trans
V (4640) spi_master: polling trans done
V (4640) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4650) spi_master: polling trans
V (4650) spi_master: polling trans done
V (4660) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4660) spi_master: polling trans
V (4670) spi_master: polling trans done
V (4670) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4680) spi_master: polling trans
V (4680) spi_master: polling trans done
V (4680) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4690) spi_master: polling trans
V (4690) spi_master: polling trans done
V (4700) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4700) spi_master: polling trans
V (4710) spi_master: polling trans done
V (4710) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4720) spi_master: polling trans
V (4720) spi_master: polling trans done
V (4720) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4730) spi_master: polling trans
V (4730) spi_master: polling trans done
V (4740) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4740) spi_master: polling trans
V (4750) spi_master: polling trans done
V (4750) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4760) spi_master: polling trans
V (4760) spi_master: polling trans done
V (4760) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4770) spi_master: polling trans
V (4770) spi_master: polling trans done
V (4780) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4780) spi_master: polling trans
V (4790) spi_master: polling trans done
V (4790) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4800) spi_master: polling trans
V (4800) spi_master: polling trans done
V (4800) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4810) spi_master: polling trans
V (4810) spi_master: polling trans done
V (4820) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4820) spi_master: polling trans
V (4830) spi_master: polling trans done
V (4830) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4840) spi_master: polling trans
V (4840) spi_master: polling trans done
V (4840) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4850) spi_master: polling trans
V (4850) spi_master: polling trans done
V (4860) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4860) spi_master: polling trans
V (4870) spi_master: polling trans done
V (4870) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4880) spi_master: polling trans
V (4880) spi_master: polling trans done
V (4880) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4890) spi_master: polling trans
V (4900) spi_master: polling trans done
V (4900) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4900) spi_master: polling trans
V (4910) spi_master: polling trans done
V (4910) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4920) spi_master: polling trans
V (4920) spi_master: polling trans done
V (4920) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4930) spi_master: polling trans
V (4940) spi_master: polling trans done
V (4940) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4940) spi_master: polling trans
V (4950) spi_master: polling trans done
V (4950) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4960) spi_master: polling trans
V (4960) spi_master: polling trans done
V (4960) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4970) spi_master: polling trans
V (4980) spi_master: polling trans done
V (4980) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (4980) spi_master: polling trans
V (4990) spi_master: polling trans done
V (4990) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5000) spi_master: polling trans
V (5000) spi_master: polling trans done
V (5000) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5010) spi_master: polling trans
V (5020) spi_master: polling trans done
V (5020) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5020) spi_master: polling trans
V (5030) spi_master: polling trans done
V (5030) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5040) spi_master: polling trans
V (5040) spi_master: polling trans done
V (5040) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5050) spi_master: polling trans
V (5060) spi_master: polling trans done
V (5060) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5060) spi_master: polling trans
V (5070) spi_master: polling trans done
V (5070) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5080) spi_master: polling trans
V (5080) spi_master: polling trans done
V (5080) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5090) spi_master: polling trans
V (5100) spi_master: polling trans done
V (5100) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5100) spi_master: polling trans
V (5110) spi_master: polling trans done
V (5110) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5120) spi_master: polling trans
V (5120) spi_master: polling trans done
V (5120) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5130) spi_master: polling trans
V (5140) spi_master: polling trans done
V (5140) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5140) spi_master: polling trans
V (5150) spi_master: polling trans done
V (5150) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5160) spi_master: polling trans
V (5160) spi_master: polling trans done
V (5160) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5270) spi_master: polling trans
V (5270) spi_master: polling trans done
V (5270) bus_lock: dev 0 released.
I (5380) ILI9341: Display orientation: LANDSCAPE
I (5380) ILI9341: 0x36 command value: 0x28
V bus_lock: dev 0 acquired.
V (5380) spi_master: polling trans
V (5390) spi_master: polling trans done
V (5390) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5400) spi_master: polling trans
V (5400) spi_master: polling trans done
V (5410) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5410) spi_master: polling trans
V (5420) spi_master: polling trans done
V (5420) bus_lock: dev 0 released.
I (5420) XPT2046: XPT2046 Initialization
I (5430) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
V bus_lock: dev 0 acquired.
V (5480) spi_master: polling trans
V (5480) spi_master: polling trans done
V (5480) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5480) spi_master: polling trans
V (5490) spi_master: polling trans done
V (5490) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5490) spi_master: polling trans
V (5500) spi_master: polling trans done
V (5500) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5510) spi_master: polling trans
V (5510) spi_master: polling trans done
V (5510) bus_lock: dev 0 released.
V bus_lock: dev 0 acquired.
V (5520) spi_master: polling trans
V (5530) spi_master: polling trans done
V (5530) bus_lock: dev 0 released.
V (5530) bus_lock: dev 0 served from bg.

Related: #68

If i use (i get the extra line from https://github.com/lvgl/lv_sim_eclipse_sdl/blob/release/v8.0/main.c#L128-L141 that i mentioned in https://github.com/lvgl/lvgl/blob/master/docs/CHANGELOG.md#driver-changes)

    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);
    disp_drv.flush_cb = disp_driver_flush;
    disp_drv.hor_res = MY_DISP_HOR_RES;
    disp_drv.ver_res = MY_DISP_VER_RES;
    disp_drv.antialiasing = 1;

I get a square like:

#define DISP_BUF_SIZE (320 * 40)
IMG_4372

#define DISP_BUF_SIZE (320 * 100)
IMG_4371

if i use the init routine from https://github.com/lvgl/lv_port_esp32/tree/port_v8 like:

static void loop1code(void *pvParameter) {
    //tft_start();
    //startup_jpeg();

    (void) pvParameter;
    xGuiSemaphore = xSemaphoreCreateMutex();

    lv_init();
    lvgl_driver_init();


    //static lv_disp_draw_buf_t disp_buf;

    //static lv_color_t buf_1[320 * 10];
    //static lv_color_t buf_2[240 * 10];

    //lv_disp_draw_buf_init(&disp_buf, buf_1, buf_2, 320*10);


    lv_color_t* buf1 = (lv_color_t*) heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
    assert(buf1 != NULL);

    /* Use double buffered when not working with monochrome displays */
    #ifndef CONFIG_LV_TFT_DISPLAY_MONOCHROME
        lv_color_t* buf2 = (lv_color_t*) heap_caps_malloc(DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
        assert(buf2 != NULL);
    #else
        static lv_color_t *buf2 = NULL;
    #endif

    static lv_disp_draw_buf_t disp_buf;

    uint32_t size_in_px = DISP_BUF_SIZE;

    /* Initialize the working buffer depending on the selected display.
     * NOTE: buf2 == NULL when using monochrome displays. */
    lv_disp_draw_buf_init(&disp_buf, buf1, buf2, size_in_px);

    lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&disp_drv);
    disp_drv.flush_cb = disp_driver_flush;


    #ifdef CONFIG_LV_TFT_DISPLAY_MONOCHROME
        disp_drv.rounder_cb = disp_driver_rounder;
        disp_drv.set_px_cb = disp_driver_set_px;
    #endif

        disp_drv.draw_buf = &disp_buf;
        lv_disp_drv_register(&disp_drv);

        /* Register an input device when enabled on the menuconfig */
    #if CONFIG_LV_TOUCH_CONTROLLER != TOUCH_CONTROLLER_NONE
        lv_indev_drv_t indev_drv;
        lv_indev_drv_init(&indev_drv);
        indev_drv.read_cb = touch_driver_read;
        indev_drv.type = LV_INDEV_TYPE_POINTER;
        lv_indev_drv_register(&indev_drv);
    #endif

    /* Create and start a periodic timer interrupt to call lv_tick_inc */
    const esp_timer_create_args_t periodic_timer_args = {
        .callback = &lv_tick_task,
        .name = "periodic_gui"
    };
    esp_timer_handle_t periodic_timer;
    ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
    ESP_ERROR_CHECK(esp_timer_start_periodic(periodic_timer, LV_TICK_PERIOD_MS * 1000));


    dp_views();

    while (1) {
          /* Delay 1 tick (assumes FreeRTOS tick is 10ms */
          vTaskDelay(pdMS_TO_TICKS(10));

          /* Try to take the semaphore, call lvgl related function on success */
          if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY)) {
              lv_task_handler();
              xSemaphoreGive(xGuiSemaphore);
        }
      }

    /* A task should NEVER return */
        free(buf1);
    #ifndef CONFIG_LV_TFT_DISPLAY_MONOCHROME
        free(buf2);
    #endif
    vTaskDelete(NULL);
}

without

    disp_drv.hor_res = MY_DISP_HOR_RES;
    disp_drv.ver_res = MY_DISP_VER_RES;
    disp_drv.antialiasing = 1;

then i get

#define DISP_BUF_SIZE (320 * 40)
IMG_4373

sorry if my writing is confuse ^^'
I am happy to explain if anything is unclear

I hope this help us with lvgl8 :)

Best Regards.

On ESP32C3 with ILI9488 controller at 480x320 16bit, the DMA memory is not sufficient for an entire screen to flush

The function ili9488_flush() is using an algorithm that allocates an entire screen sized DMA buffer, but on the ESP32C3 device, there is not sufficient memory.

I modified the function to do one line at a time, but it might be good to figure out the best of allocation.

I have a modification to this driver that I can share, but it seems that many of the drivers share this flushing code.

Perhaps there is a way to double check the memory required and do the entire screen if available, otherwise drop back to one line or x lines at a time?

Q: Is there an advantage using this instead of TFT_eSPI

I have an existing project based on Arduino and I do have some experience with TFT_eSPI so I know how this works so I wonder if there is any advantage of using esp32_drivers instead of TFT_eSPI.
I want to drive a ILI9341 display at 240x320.

Reason I am asking is because from what I currently understand is when using esp32_drivers/lv_port_esp32 I have to use RTOS instead of Arduino but I can be totally wrong here. I don´t fully understand yet why
lv_port_esp32 exist..

But perhaps I should be looking at using lvgl_esp32_drivers and use the ILI9341 driver instead of TFT_eSPI?

Cant Use Touch with ILI9488 3,5" 480x320 V1.0 XPT2046

Describe the issue
I cant use my Touch.

Code to reproduce the issue
I use the arduino esp port. And load the Library TFT_eSPI
the kallibration of the touch is working after that i init the lvgl and run a loop
it also works with my ILI9341 2.8 240x320 V1.2 with the same Touch controller XPT2046

void loop1code(void * pvParameters) {
for(;;){
lv_task_handler();
vTaskDelay(10 / portTICK_PERIOD_MS);
}
}

framework: espressif

installed components
arduino
lvgl
lvgl_esp32_drivers

when i configure the lvgl_esp32_drivers (touch controller) in menuconfig take this no effekt.
same problem.

i have aktivated the cpu count in the bottom right corner but it is not showing. up. maybe this is not a touch problem? I dont know how i can test it? With the ili9341 it works.

Expected Results
working touch

Actual Results
no touch. but compiling and flashing suscessfull

ESP32 Chip version
ESP: M213EH2864UH3Q0 https://www.mouser.de/ProductDetail/Espressif-Systems/ESP32-WROVER-IEM213EH2864UH3Q0?qs=vmHwEFxEFR97Z2otHlKj0Q%3D%3D

ESP-IDF version
4.4

Development machine OS
macos

Compilation warnings/errors (if available)
no

If possible, copy the compilation log into a file and attach it here
if needed

Allow for manual offset setting, and automatic swapping of resoultion and offsets when changing screen orientation

While trying to set up the library for the TTGO T-DISPLAY i ran into the problem that the premade config didn't work (which is another issue in it self #50).
To get around this, i instead just tried to configure everything manually, but then ran into the problem that that also didn't work, because the offset settings needed for the display used on the T-Display ( which is this; for reference), isn't using the full address area of the ST7789V.
So i made this patch, in order to be able to configure for this display manually.

diff --git a/lvgl_tft/Kconfig b/lvgl_tft/Kconfig
index ddd7f51..ba6746e 100644
--- a/lvgl_tft/Kconfig
+++ b/lvgl_tft/Kconfig
@@ -206,24 +206,28 @@ menu "LVGL TFT Display controller"
         default 3 if DISPLAY_ORIENTATION_LANDSCAPE_INVERTED
 
     config LV_TFT_DISPLAY_OFFSETS
-        bool
+        bool "enable coordinate offsets"
         help
-        Display area doesn't start at address 0
+            Set this to configure coordinate offsets for the visible display Area.
+            In other words: set Adress offsets
 
     config LV_TFT_DISPLAY_X_OFFSET
         depends on LV_TFT_DISPLAY_OFFSETS
-        int
+        int "the vertical display window coordinate offset"
         default 40 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_LANDSCAPE || LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
         default 53 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_PORTRAIT  || LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
         default 0
+        help
+            Set this to the number of pixels the active display area is offset horizonatlly
 
     config LV_TFT_DISPLAY_Y_OFFSET
         depends on LV_TFT_DISPLAY_OFFSETS
-        int
+        int "the vertical display window coordinate offset"
         default 53  if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_LANDSCAPE || LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED)
         default 40 if LV_PREDEFINED_DISPLAY_TTGO && (LV_DISPLAY_ORIENTATION_PORTRAIT  || LV_DISPLAY_ORIENTATION_PORTRAIT_INVERTED)
         default 0
-
+        help
+            Set this to the number of pixels the active display area is offset horizonatlly
 
     # Display colors(?)
     # Useful to know when the display being used is a monochrome

But even then i had to set the resolution with LV_HOR_RES_MAX and LV_VER_RES_MAX to 135 and 240. (which btw are confusingly described because they aren't really the "Maximal vertical/horizontal resolution to support by the library", but just the resolution of the display used, in this case)

Which then brought up the issue that these (both resolution an offsets) values are relative to the resulting coordinate system after setting screen orientation, which means they have to be manually changed every time the screen orientation is changed.

disp_drv.rotated not working with ST7735 driver

The problem is that the ST7735 display is 160x128 pixels.
So if you set:

  • Landscape during compile time
  • disp_drv.rotated = 1 in the code
  • Swap display width and height in the code
  • Call the ST7735 rotation function for a hardware rotate

It still is not working in portrait mode. The upper 128 pixels are working in portrait mode, the bottom 32 pixels are not functioning at all (pixel noise).
I suspect the LVGL driver code is still thinking that the height is 128 pixels, despite the rotated setting.

Maybe because of this code in LV_CONF.H ?
#define LV_VER_RES_MAX (CONFIG_LVGL_DISPLAY_HEIGHT)

pixelnoise

Little log:
D (00:00:02.871) screen: LVGL Width: 128 , Height 160
I (00:00:02.879) lvgl_helpers: Display hor size: 160, ver size: 128
I (00:00:02.880) lvgl_helpers: Display buffer size: 6400
I (00:00:02.890) lvgl_helpers: Initializing SPI master for display
I (00:00:02.892) lvgl_helpers: Configuring SPI host VSPI_HOST (2)
I (00:00:02.898) lvgl_helpers: MISO pin: -1, MOSI pin: 23, SCLK pin: 18
I (00:00:02.910) lvgl_helpers: Max transfer size: 12800 (bytes)
I (00:00:02.912) lvgl_helpers: Initializing SPI bus...

RPi MPI3501 Compile error error: 'data' undeclared

Describe the issue
Compile error using preconfigured RPi MPI3501.

Code to reproduce the issue

TFT Display controller config:

  • Predifined display: RPi MPI3501
  • SPI Bus: HSPI
  • SIO (MOSI/MISO)
  • HALF Duplex
  • Landscape
  • PIN: MOSI 23, CLK 18, CS 5, DC 12, RST 4

Touch controller config:

  • XPT2046
  • VSPI
  • Others default

Expected Results
compile success

Actual Results

-c ../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c
In file included from ../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:12:
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c: In function 'ili9486_set_orientation':
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:210:49: error: 'data' undeclared (first use in this function)
     ESP_LOGI(TAG, "0x36 command value: 0x%02X", data[orientation]);
                                                 ^~~~
/home/samuel/tools/esp/esp-idf/components/log/include/esp_log.h:330:137: note: in definition of macro 'ESP_LOG_LEVEL'
         if (level==ESP_LOG_ERROR )          { esp_log_write(ESP_LOG_ERROR,      tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
                                                                                                                                         ^~~~~~~~~~~
/home/samuel/tools/esp/esp-idf/components/log/include/esp_log.h:297:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
 #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO,    tag, format, ##__VA_ARGS__)
                                      ^~~~~~~~~~~~~~~~~~~
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:210:5: note: in expansion of macro 'ESP_LOGI'
     ESP_LOGI(TAG, "0x36 command value: 0x%02X", data[orientation]);
     ^~~~~~~~
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:210:49: note: each undeclared identifier is reported only once for each function it appears in
     ESP_LOGI(TAG, "0x36 command value: 0x%02X", data[orientation]);
                                                 ^~~~
/home/samuel/tools/esp/esp-idf/components/log/include/esp_log.h:330:137: note: in definition of macro 'ESP_LOG_LEVEL'
         if (level==ESP_LOG_ERROR )          { esp_log_write(ESP_LOG_ERROR,      tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
                                                                                                                                         ^~~~~~~~~~~
/home/samuel/tools/esp/esp-idf/components/log/include/esp_log.h:297:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
 #define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO,    tag, format, ##__VA_ARGS__)
                                      ^~~~~~~~~~~~~~~~~~~
../components/lvgl_esp32_drivers/lvgl_tft/ili9486.c:210:5: note: in expansion of macro 'ESP_LOGI'
     ESP_LOGI(TAG, "0x36 command value: 0x%02X", data[orientation]);
     ^~~~~~~~
[923/1032] Building C object esp-idf/lv...l/src/lv_themes/lv_theme_material.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

ESP32 Chip version
ESP32-WROOM-32

ESP-IDF version
v4.3-dev-1197-g8bc19ba89
Development kit used
ESP32-DevKitC
Development machine OS
Ubuntu 18.0

Strange Adafruit TFT FeatherWing - 3.5" 480x320 issue

Hi

I'm using the Adafruit 3.5" TFT Featherwing with an Adafruit Huzzah32 board and having an issue.

The display appears to be working fine using this example code in that it it shows the write/list/chart example screens. However the touch operation is not working, and every 3s roughly the screen switches to the next of the three tabs in the example cycling around them. I am using the configuration for the TFT featherwing in menuconfig but this appears to also select settings for the touch controller without a way to change the CS so I'm not sure if it is this.

I'm building on Windows with ESP-idf 4.0.1 and everything compiles and runs without error but not what I'd expect on screen.

Question: Why is the default buffer size for the ILI9341 larger than for similar display controllers in lvgl_helpers.h?

If we look in lvgl_helpers.h where DISP_BUF_SIZE is set/calculated you will see:

#if defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789)
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * LV_VER_RES_MAX)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 64)

Why is the DISP_BUF_SIZE 1.6x that of similar controllers? I find it odd because it is very common for for ILI9341 based displays to be 320x240 and 64 doesn't divide cleanly into 240. 64 does however divide cleanly into 320, as in 480x320 displays we see associated the the ILI9486/8.

Also is there a reasoning behind the size of these buffers that could be documented? If there were it would certainly help those who write their own drivers understand what their default buffer size should be

SSD1306 menuconfig/kconfig broken

recent commit 9fed1cc conflicts somewhat with this block in kconfig:

# Used in display init function to send display orientation commands
choice DISPLAY_ORIENTATION
prompt "Display orientation"
default DISPLAY_ORIENTATION_PORTRAIT if !LV_TFT_DISPLAY_CONTROLLER_SSD1306
default DISPLAY_ORIENTATION_LANDSCAPE if LV_TFT_DISPLAY_CONTROLLER_SSD1306
config DISPLAY_ORIENTATION_PORTRAIT
bool "Portrait" if !LV_TFT_DISPLAY_CONTROLLER_SSD1306
config DISPLAY_ORIENTATION_PORTRAIT_INVERTED
bool "Portrait inverted" if !LV_TFT_DISPLAY_CONTROLLER_SSD1306
config DISPLAY_ORIENTATION_LANDSCAPE
bool "Landscape"
config DISPLAY_ORIENTATION_LANDSCAPE_INVERTED
bool "Landscape inverted"
endchoice
config LV_DISPLAY_ORIENTATION
int
default 0 if DISPLAY_ORIENTATION_PORTRAIT
default 1 if DISPLAY_ORIENTATION_PORTRAIT_INVERTED
default 2 if DISPLAY_ORIENTATION_LANDSCAPE
default 3 if DISPLAY_ORIENTATION_LANDSCAPE_INVERTED

kconfig does not actually set CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE or CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED, it sets CONFIG_DISPLAY_ORIENTATION_LANDSCAPE and CONFIG_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED

End result is that I get an invalid orientation error regardless of which orientation I set. I think this is just a simple kconfig update to fix, adding the LV prefix?

for now I've fixed it in my own stuff by picking the previous commit for the submodule in my project, but since lvgl/lv_port_esp32 is using 9fed1cc as its referenced commit, it'll be broken for that repo/demo :(

Green screen with WROVER4

I have everything working great with TTGO T-Display, but when I tried to get my WROVER v4.1 running, I cannot get the display to show anything besides a white screen at boot then a green mess.

I am stumped what I am doing wrong 🤷‍♂️

Running LVGL v7.11.0 and latest commit from this repo.

IMG_0730

#include "gfx.hpp"

#include "esp_log.h"
#include "esp_system.h"
#include "esp_timer.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/task.h"
#include "lvgl.h"
#include "lvgl_helpers.h"

#include "esp_freertos_hooks.h"

#define LV_TICK_PERIOD_MS 1

/* Creates a semaphore to handle concurrent call to lvgl stuff
 * If you wish to call *any* lvgl function from other threads/tasks
 * you should lock on the very same semaphore! */
SemaphoreHandle_t xGuiSemaphore;

extern "C" void app_main(void) {
  ESP_ERROR_CHECK(esp_event_loop_create_default());

  // Initialize NVS
  esp_err_t err = nvs_flash_init();
  if (err == ESP_ERR_NVS_NO_FREE_PAGES ||
      err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
    // NVS partition was truncated and needs to be erased
    // Retry nvs_flash_init
    ESP_ERROR_CHECK(nvs_flash_erase());
    err = nvs_flash_init();
  }
  ESP_ERROR_CHECK(err);

  xTaskCreatePinnedToCore(guiTask, "gui", 4096 * 2, nullptr, 0, nullptr, 1);

  while (true) {
    my_main.loop();
  }
}


void lv_tick_task(void) { lv_tick_inc(portTICK_PERIOD_MS); }

void guiTask(void *pvParameter) {

  (void)pvParameter;
  xGuiSemaphore = xSemaphoreCreateMutex();

  lv_init();

  /* Initialize SPI or I2C bus used by the drivers */
  lvgl_driver_init();

  lv_color_t *buf1 = (lv_color_t *)heap_caps_malloc(
      DISP_BUF_SIZE * sizeof(lv_color_t), MALLOC_CAP_DMA);
  assert(buf1 != nullptr);

  static lv_disp_buf_t disp_buf;

  uint32_t size_in_px = DISP_BUF_SIZE;

  /* Initialize the working buffer depending on the selected display. */
  lv_disp_buf_init(&disp_buf, buf1, nullptr, size_in_px);

  lv_disp_drv_t disp_drv;
  lv_disp_drv_init(&disp_drv);
  disp_drv.flush_cb = disp_driver_flush;

  disp_drv.buffer = &disp_buf;
  lv_disp_drv_register(&disp_drv);

  /* Create and start a periodic timer interrupt to call lv_tick_inc */
  const esp_timer_create_args_t periodic_timer_args = {
      .callback = &lv_tick_task, .name = "periodic_gui"};
  esp_timer_handle_t periodic_timer;
  ESP_ERROR_CHECK(esp_timer_create(&periodic_timer_args, &periodic_timer));
  ESP_ERROR_CHECK(
      esp_timer_start_periodic(periodic_timer, LV_TICK_PERIOD_MS * 1000));

  /* Create the demo application */
  create_demo_application();

  while (1) {
    /* Delay 1 tick (assumes FreeRTOS tick is 10ms */
    vTaskDelay(pdMS_TO_TICKS(10));

    /* Try to take the semaphore, call lvgl related function on success */
    if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY)) {
      lv_task_handler();
      xSemaphoreGive(xGuiSemaphore);
    }
  }

  /* A task should NEVER return */
  free(buf1);
  vTaskDelete(nullptr);
}

void create_demo_application(void) {

  /* use a pretty small demo for monochrome displays */
  /* Get the current screen  */
  lv_obj_t *scr = lv_disp_get_scr_act(nullptr);

  /*Create a Label on the currently active screen*/
  lv_obj_t *label1 = lv_label_create(scr, nullptr);

  /*Modify the Label's text*/
  lv_label_set_text(label1, "Prototype");

  /* Align the Label to the center
   * nullptr means align on parent (which is the screen now)
   * 0, 0 at the end means an x, y offset after alignment*/
  lv_obj_align(label1, nullptr, LV_ALIGN_CENTER, 0, 0);
}
#
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#

# ...

#
# LVGL configuration
#
# CONFIG_LV_ATTRIBUTE_FAST_MEM_USE_IRAM is not set
# CONFIG_LV_CONF_MINIMAL is not set
CONFIG_LV_CONF_SKIP=y
CONFIG_LV_HOR_RES_MAX=480
CONFIG_LV_VER_RES_MAX=320
# CONFIG_LV_COLOR_DEPTH_32 is not set
CONFIG_LV_COLOR_DEPTH_16=y
# CONFIG_LV_COLOR_DEPTH_8 is not set
# CONFIG_LV_COLOR_DEPTH_1 is not set
CONFIG_LV_COLOR_DEPTH=16
# CONFIG_LV_COLOR_16_SWAP is not set
CONFIG_LV_ANTIALIAS=y
CONFIG_LV_DISP_DEF_REFR_PERIOD=30
CONFIG_LV_DPI=130
CONFIG_LV_DISP_SMALL_LIMIT=30
CONFIG_LV_DISP_MEDIUM_LIMIT=50
CONFIG_LV_DISP_LARGE_LIMIT=70

#
# Memory manager settings
#
# CONFIG_LV_MEM_CUSTOM is not set
CONFIG_LV_MEM_SIZE_KILOBYTES=32
# CONFIG_LV_MEMCPY_MEMSET_STD is not set
# end of Memory manager settings

#
# Indev device settings
#
CONFIG_LV_INDEV_DEF_READ_PERIOD=30
CONFIG_LV_INDEV_DEF_DRAG_LIMIT=10
CONFIG_LV_INDEV_DEF_DRAG_THROW=10
CONFIG_LV_INDEV_DEF_LONG_PRESS_TIME=400
CONFIG_LV_INDEV_DEF_LONG_PRESS_REP_TIME=100
CONFIG_LV_INDEV_DEF_GESTURE_LIMIT=50
CONFIG_LV_INDEV_DEF_GESTURE_MIN_VELOCITY=3
# end of Indev device settings

#
# Feature usage
#
CONFIG_LV_USE_ANIMATION=y
CONFIG_LV_USE_SHADOW=y
CONFIG_LV_SHADOW_CACHE_SIZE=0
CONFIG_LV_USE_OUTLINE=y
CONFIG_LV_USE_PATTERN=y
CONFIG_LV_USE_VALUE_STR=y
CONFIG_LV_USE_BLEND_MODES=y
CONFIG_LV_USE_OPA_SCALE=y
CONFIG_LV_USE_IMG_TRANSFORM=y
CONFIG_LV_USE_GROUP=y
CONFIG_LV_USE_GPU=y
# CONFIG_LV_USE_GPU_STM32_DMA2D is not set
# CONFIG_LV_USE_GPU_NXP_PXP is not set
# CONFIG_LV_USE_GPU_NXP_VG_LITE is not set
CONFIG_LV_USE_FILESYSTEM=y
# CONFIG_LV_USE_USER_DATA is not set
# CONFIG_LV_USE_PERF_MONITOR is not set
CONFIG_LV_USE_API_EXTENSION_V6=y
CONFIG_LV_USE_API_EXTENSION_V7=y
# end of Feature usage

#
# Image decoder and cache
#
CONFIG_LV_IMG_CF_INDEXED=y
CONFIG_LV_IMG_CF_ALPHA=y
CONFIG_LV_IMG_CACHE_DEF_SIZE=1
# end of Image decoder and cache

#
# Compiler Settings
#
# CONFIG_LV_BIG_ENDIAN_SYSTEM is not set
# end of Compiler Settings

#
# HAL Settings
#
# CONFIG_LV_TICK_CUSTOM is not set
# end of HAL Settings

#
# Log Settings
#
CONFIG_LV_USE_LOG=y
# CONFIG_LV_LOG_LEVEL_TRACE is not set
CONFIG_LV_LOG_LEVEL_INFO=y
# CONFIG_LV_LOG_LEVEL_WARN is not set
# CONFIG_LV_LOG_LEVEL_ERROR is not set
# CONFIG_LV_LOG_LEVEL_NONE is not set
CONFIG_LV_LOG_LEVEL=1
# CONFIG_LV_LOG_PRINTF is not set
# end of Log Settings

#
# Debug Settings
#
CONFIG_LV_USE_DEBUG=y
CONFIG_LV_USE_ASSERT_NULL=y
CONFIG_LV_USE_ASSERT_MEM=y
# CONFIG_LV_USE_ASSERT_MEM_INTEGRITY is not set
# CONFIG_LV_USE_ASSERT_STR is not set
# CONFIG_LV_USE_ASSERT_OBJ is not set
# CONFIG_LV_USE_ASSERT_STYLE is not set
# end of Debug Settings

#
# Font usage
#
# CONFIG_LV_FONT_FMT_TXT_LARGE is not set
# CONFIG_LV_USE_FONT_SUBPX is not set

#
# Enable built-in fonts
#
# CONFIG_LV_FONT_MONTSERRAT_8 is not set
# CONFIG_LV_FONT_MONTSERRAT_10 is not set
# CONFIG_LV_FONT_MONTSERRAT_12 is not set
CONFIG_LV_FONT_MONTSERRAT_14=y
CONFIG_LV_FONT_MONTSERRAT_16=y
# CONFIG_LV_FONT_MONTSERRAT_18 is not set
# CONFIG_LV_FONT_MONTSERRAT_20 is not set
# CONFIG_LV_FONT_MONTSERRAT_22 is not set
# CONFIG_LV_FONT_MONTSERRAT_24 is not set
# CONFIG_LV_FONT_MONTSERRAT_26 is not set
# CONFIG_LV_FONT_MONTSERRAT_28 is not set
# CONFIG_LV_FONT_MONTSERRAT_30 is not set
# CONFIG_LV_FONT_MONTSERRAT_32 is not set
# CONFIG_LV_FONT_MONTSERRAT_34 is not set
# CONFIG_LV_FONT_MONTSERRAT_36 is not set
# CONFIG_LV_FONT_MONTSERRAT_38 is not set
# CONFIG_LV_FONT_MONTSERRAT_40 is not set
# CONFIG_LV_FONT_MONTSERRAT_42 is not set
# CONFIG_LV_FONT_MONTSERRAT_44 is not set
# CONFIG_LV_FONT_MONTSERRAT_46 is not set
# CONFIG_LV_FONT_MONTSERRAT_48 is not set
# CONFIG_LV_FONT_UNSCII_8 is not set
# CONFIG_LV_FONT_UNSCII_16 is not set
# CONFIG_LV_FONT_MONTSERRAT12SUBPX is not set
# CONFIG_LV_FONT_MONTSERRAT28COMPRESSED is not set
# CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW is not set
# CONFIG_LV_FONT_SIMSUN_16_CJK is not set
# end of Enable built-in fonts

# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_8 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_10 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_14 is not set
CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_18 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_20 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_22 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_24 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_28 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_30 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_32 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_34 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_36 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_38 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_40 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_42 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_44 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_46 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT_48 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_UNSCII_8 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_UNSCII_16 is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT12SUBPX is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_MONTSERRAT28COMPRESSED is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_DEJAVU_16_PERSIAN_HEBREW is not set
# CONFIG_LV_FONT_DEFAULT_SMALL_SIMSUN_16_CJK is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_8 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_10 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_12 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_14 is not set
CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_16=y
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_18 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_20 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_22 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_24 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_26 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_28 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_30 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_32 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_34 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_36 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_38 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_40 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_42 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_44 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_46 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT_48 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_UNSCII_8 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_UNSCII_16 is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT12SUBPX is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_MONTSERRAT28COMPRESSED is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_DEJAVU_16_PERSIAN_HEBREW is not set
# CONFIG_LV_FONT_DEFAULT_NORMAL_SIMSUN_16_CJK is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_8 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_10 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_12 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_14 is not set
CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_16=y
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_18 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_20 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_22 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_24 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_26 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_28 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_30 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_32 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_34 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_36 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_38 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_40 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_42 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_44 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_46 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT_48 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_UNSCII_8 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_UNSCII_16 is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT12SUBPX is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_MONTSERRAT28COMPRESSED is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_DEJAVU_16_PERSIAN_HEBREW is not set
# CONFIG_LV_FONT_DEFAULT_SUBTITLE_SIMSUN_16_CJK is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_8 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_12 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_14 is not set
CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_16=y
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_18 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_20 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_22 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_24 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_26 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_28 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_30 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_32 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_34 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_36 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_38 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_40 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_42 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_44 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_46 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT_48 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_UNSCII_8 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_UNSCII_16 is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT12SUBPX is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_MONTSERRAT28COMPRESSED is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_DEJAVU_16_PERSIAN_HEBREW is not set
# CONFIG_LV_FONT_DEFAULT_TITLE_SIMSUN_16_CJK is not set
# end of Font usage

#
# Theme usage
#

#
# Enable theme usage, always enable at least one theme
#
# CONFIG_LV_THEME_EMPTY is not set
# CONFIG_LV_THEME_TEMPLATE is not set
CONFIG_LV_THEME_MATERIAL=y
# CONFIG_LV_THEME_MONO is not set
# end of Enable theme usage, always enable at least one theme

# CONFIG_LV_THEME_DEFAULT_INIT_EMPTY is not set
# CONFIG_LV_THEME_DEFAULT_INIT_TEMPLATE is not set
CONFIG_LV_THEME_DEFAULT_INIT_MATERIAL=y
# CONFIG_LV_THEME_DEFAULT_INIT_MONO is not set
CONFIG_LV_THEME_DEFAULT_COLOR_PRIMARY=0xFF0000
CONFIG_LV_THEME_DEFAULT_COLOR_SECONDARY=0x0000FF
CONFIG_LV_THEME_DEFAULT_FLAG_LIGHT=y
# CONFIG_LV_THEME_DEFAULT_FLAG_DARK is not set
# end of Theme usage

#
# Text Settings
#
CONFIG_LV_TXT_ENC_UTF8=y
# CONFIG_LV_TXT_ENC_ASCII is not set
CONFIG_LV_TXT_BREAK_CHARS=" ,.;:-_"
CONFIG_LV_TXT_LINE_BREAK_LONG_LEN=0
CONFIG_LV_TXT_COLOR_CMD="#"
# CONFIG_LV_USE_BIDI is not set
# CONFIG_LV_USE_ARABIC_PERSIAN_CHARS is not set
# CONFIG_LV_SPRINTF_CUSTOM is not set
# CONFIG_LV_SPRINTF_DISABLE_FLOAT is not set
# end of Text Settings

#
# Widgets
#
CONFIG_LV_USE_OBJ_REALIGN=y
# CONFIG_LV_USE_EXT_CLICK_AREA_OFF is not set
CONFIG_LV_USE_EXT_CLICK_AREA_TINY=y
# CONFIG_LV_USE_EXT_CLICK_AREA_FULL is not set
CONFIG_LV_USE_ARC=y
CONFIG_LV_USE_BAR=y
CONFIG_LV_USE_BTN=y
CONFIG_LV_USE_BTNMATRIX=y
CONFIG_LV_USE_CALENDAR=y
# CONFIG_LV_CALENDAR_WEEK_STARTS_MONDAY is not set
CONFIG_LV_USE_CANVAS=y
CONFIG_LV_USE_CHECKBOX=y
CONFIG_LV_USE_CHART=y
CONFIG_LV_CHART_AXIS_TICK_MAX_LEN=256
CONFIG_LV_USE_CONT=y
CONFIG_LV_USE_CPICKER=y
CONFIG_LV_USE_DROPDOWN=y
CONFIG_LV_DROPDOWN_DEF_ANIM_TIME=200
CONFIG_LV_USE_GAUGE=y
CONFIG_LV_USE_IMG=y
CONFIG_LV_USE_IMGBTN=y
# CONFIG_LV_IMGBTN_TILED is not set
CONFIG_LV_USE_KEYBOARD=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_LABEL_DEF_SCROLL_SPEED=25
CONFIG_LV_LABEL_WAIT_CHAR_COUNT=3
# CONFIG_LV_LABEL_TEXT_SEL is not set
# CONFIG_LV_LABEL_LONG_TXT_HINT is not set
CONFIG_LV_USE_LED=y
CONFIG_LV_LED_BRIGHT_MIN=120
CONFIG_LV_LED_BRIGHT_MAX=255
CONFIG_LV_USE_LINE=y
CONFIG_LV_USE_LIST=y
CONFIG_LV_LIST_DEF_ANIM_TIME=100
CONFIG_LV_USE_LINEMETER=y
CONFIG_LV_LINEMETER_PRECISE_NO_EXTRA_PRECISION=y
# CONFIG_LV_LINEMETER_PRECISE_SOME_EXTRA_PRECISION is not set
# CONFIG_LV_LINEMETER_PRECISE_BEST_PRECISION is not set
CONFIG_LV_USE_OBJMASK=y
CONFIG_LV_USE_MSGBOX=y
CONFIG_LV_USE_PAGE=y
CONFIG_LV_PAGE_DEF_ANIM_TIME=100
CONFIG_LV_USE_SPINNER=y
CONFIG_LV_SPINNER_DEF_ARC_LENGTH=60
CONFIG_LV_SPINNER_DEF_SPIN_TIME=1000
CONFIG_LV_SPINNER_TYPE_SPINNING_ARC=y
# CONFIG_LV_SPINNER_TYPE_FILLSPIN_ARC is not set
# CONFIG_LV_SPINNER_TYPE_CONSTANT_ARC is not set
CONFIG_LV_USE_ROLLER=y
CONFIG_LV_ROLLER_DEF_ANIM_TIME=200
CONFIG_LV_ROLLER_INF_PAGES=7
CONFIG_LV_USE_SLIDER=y
CONFIG_LV_USE_SPINBOX=y
CONFIG_LV_USE_SWITCH=y
CONFIG_LV_USE_TEXTAREA=y
CONFIG_LV_TEXTAREA_DEF_CURSOR_BLINK_TIME=400
CONFIG_LV_TEXTAREA_DEF_PWN_SHOW_TIME=1500
CONFIG_LV_USE_TABLE=y
CONFIG_LV_TABLE_COL_MAX=12
CONFIG_LV_TABLE_CELL_STYLE_CNT=4
CONFIG_LV_USE_TABVIEW=y
CONFIG_LV_TABVIEW_DEF_ANIM_TIME=300
CONFIG_LV_USE_TILEVIEW=y
CONFIG_LV_TILEVIEW_DEF_ANIM_TIME=300
CONFIG_LV_USE_WIN=y
# end of Widgets
# end of LVGL configuration

#
# LVGL TFT Display controller
#
# CONFIG_LV_PREDEFINED_DISPLAY_NONE is not set
CONFIG_LV_PREDEFINED_DISPLAY_WROVER4=y
# CONFIG_LV_PREDEFINED_DISPLAY_M5STACK is not set
# CONFIG_LV_PREDEFINED_DISPLAY_M5CORE2 is not set
# CONFIG_LV_PREDEFINED_DISPLAY_M5STICK is not set
# CONFIG_LV_PREDEFINED_DISPLAY_M5STICKC is not set
# CONFIG_LV_PREDEFINED_DISPLAY_ERTFT0356 is not set
# CONFIG_LV_PREDEFINED_DISPLAY_ADA_FEATHERWING is not set
# CONFIG_LV_PREDEFINED_DISPLAY_RPI_MPI3501 is not set
# CONFIG_LV_PREDEFINED_DISPLAY_WEMOS_LOLIN is not set
# CONFIG_LV_PREDEFINED_DISPLAY_ATAG is not set
# CONFIG_LV_PREDEFINED_DISPLAY_RPI_RA8875 is not set
# CONFIG_LV_PREDEFINED_DISPLAY_TTGO is not set
# CONFIG_LV_PREDEFINED_DISPLAY_TTGO_CAMERA_PLUS is not set
# CONFIG_LV_PREDEFINED_DISPLAY_WT32_SC01 is not set
CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341=y
CONFIG_LV_TFT_DISPLAY_PROTOCOL_SPI=y
CONFIG_DISPLAY_ORIENTATION_PORTRAIT=y
# CONFIG_DISPLAY_ORIENTATION_PORTRAIT_INVERTED is not set
# CONFIG_DISPLAY_ORIENTATION_LANDSCAPE is not set
# CONFIG_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED is not set
CONFIG_LV_DISPLAY_ORIENTATION=0
# CONFIG_CUSTOM_DISPLAY_BUFFER_SIZE is not set
CONFIG_LV_TFT_DISPLAY_SPI_HSPI=y
# CONFIG_LV_TFT_DISPLAY_SPI_VSPI is not set
CONFIG_LV_TFT_DISPLAY_SPI_TRANS_MODE_SIO=y
# CONFIG_LV_TFT_DISPLAY_SPI_TRANS_MODE_DIO is not set
# CONFIG_LV_TFT_DISPLAY_SPI_TRANS_MODE_QIO is not set
CONFIG_LV_TFT_DISPLAY_SPI_HALF_DUPLEX=y
# CONFIG_LV_TFT_DISPLAY_SPI_FULL_DUPLEX is not set
# CONFIG_LV_TFT_USE_CUSTOM_SPI_CLK_DIVIDER is not set
CONFIG_LV_TFT_CUSTOM_SPI_CLK_DIVIDER=2
# CONFIG_LV_INVERT_COLORS is not set
CONFIG_LV_DISP_SPI_MOSI=23
CONFIG_LV_DISP_SPI_CLK=19
CONFIG_LV_DISPLAY_USE_SPI_CS=y
CONFIG_LV_DISP_SPI_CS=22
CONFIG_LV_DISPLAY_USE_DC=y
CONFIG_LV_DISP_PIN_DC=21
CONFIG_LV_DISP_USE_RST=y
CONFIG_LV_DISP_PIN_RST=18
CONFIG_LV_DISP_PIN_BUSY=35
CONFIG_LV_ENABLE_BACKLIGHT_CONTROL=y
CONFIG_LV_DISP_PIN_BCKL=5
CONFIG_LV_DISP_PIN_SDA=5
CONFIG_LV_DISP_PIN_SCL=4
# end of LVGL TFT Display controller

#
# LVGL Touch controller
#
CONFIG_LV_TOUCH_CONTROLLER=0
CONFIG_LV_TOUCH_CONTROLLER_NONE=y
# CONFIG_LV_TOUCH_CONTROLLER_XPT2046 is not set
# CONFIG_LV_TOUCH_CONTROLLER_FT6X06 is not set
# CONFIG_LV_TOUCH_CONTROLLER_STMPE610 is not set
# CONFIG_LV_TOUCH_CONTROLLER_ADCRAW is not set
# CONFIG_LV_TOUCH_CONTROLLER_FT81X is not set
# CONFIG_LV_TOUCH_CONTROLLER_RA8875 is not set
# CONFIG_LV_TOUCH_CONTROLLER_GT911 is not set
# end of LVGL Touch controller
# end of Component config

Kconfig settings for TTGO T-Display faulty

I discovered a problem when configuring a TTGO T-Display with menuconfig. when selecting the predefined Display setting.
First: the Items LV_TFT_DISPLAY_X_OFFSET and LV_TFT_DISPLAY_Y_OFFSET are not set correctly because of different item names DISPLAY_ORIENTATION_PORTRAIT vs. LV_DISPLAY_ORIENTATION_PORTRAIT and so on in config LV_DISPLAY_ORIENTATION. After adding the "LV_" to the items in config LV_DISPLAY_ORIENTATION it works.

Second LV_TFT_DISPLAY_SPI_VSPI is not selected automatically because of the disabled prompt "TFT SPI Bus.". I made it visible by deleting the condition "!LV_PREDEFINED_DISPLAY_TTGO &&". This is only a workaround as i'm not confident with Kconfig i have no suggestion for a fix.

Touch on ESP32 Wroover and ILI9341 + XPT2046 not working.

I use the espressif framework,
lvgl and
lvgl_esp32_driver
and use it over HSPI

I have also loaded TFT_eSPI and here the touch is working. but after running
lv_init();
lvgl_driver_init();

the init messages coming up in the monitor but the touch is not working.

Design proposal

Refactoring proposal

Here is a summary of major/refactoring issues that must be tackled systematically in order to make this SW component maintainable and extandable:

Issues collection

  1. Previous refactoring plans:
    • Kconfig refactoring #40
    • Long-term plans #44
  2. LVGL v8 #68
  3. Versioning lvgl/lv_port_esp32#272
  4. Multiple displays
    #31
    lvgl/lv_port_esp32#276
    lvgl/lv_port_esp32#277
  5. New graphical interfaces (RGB, parallel)
    #64
  6. Runtime configuration and Kconfig
    #65
    lvgl/lv_port_esp32#282
  7. New Espressif devices
    lvgl/lv_port_esp32#269

Proposal:

There are many hints in the issues' discussions that imply that the repo needs a major refactoring, so I'd like to present my high-level view of what and how should be done.
Please don't take it as high-jacking or critique of your wonderful project, but rather as a willingness to support it :)

1. Abandon Kconfig

Nice article about What not to turn into Kconfig option in Zephyr's project documentation, most notably pin numbers.

In case of ESP-LVGL drivers it means all the options.

Many issues from users are about Kconfig configuration, and at the same time it gives us no benefit.
On the contrary, it complicates our effort on any new feature, as it must be reflected in Kconfig.

Getting rid of Kconfig over runtime configuration would help us tackle issues in group 1, 4, 5, 6, 7 on top of a good design.

1.1. Eval board support

Support for evaluation boards (Wrover-kit, M5Stack...) is currently done only through Kconfig.
As a replacement, examples of how to configure the drivers and LVGL will be provided in examples folder (see point 4).

2. Use esp_lcd component

esp_lcd is a component in ESP-IDF. Its intention is to abstract away various graphical interfaces that are introduced in new Espressif chips starting from ESP32. Namely RGB and parallel graphical interfaces.
This component is maintained by Espressif, which would offload maintainer of this repo by taking care of peripheral drivers (not to be confused with display drivers) for newly released chips (ESP32-S3, ESP32-C3...).

There is also a rotation support, that is required in LVGL v8.

esp_lcd is written in a modular way, so it is possible to eventually carve out the display drivers and use them on different platforms. (I would leave this as a very last step).

esp_lcd can tackle issue in groups 5 and 7.

3. LVGL v8

Breaking changes compared to v7.

Nothing more to add, we have to support this.

4. Folder structure

Currently there are two repositories which serve similar purpose lvgl/lvgl_esp32_drivers and lvgl/lv_port_esp32. This causes a lot of confusion as the users don't know which repo is responsible for what and are often firing issues at wrong place.

I'd like to follow an idea: Single repo = single purpose.

lv_port_esp32 would be discontinued and its (revised) content moved to lvgl_esp32_drivers/examples subfolder.

lvgl_esp32_drivers folder structure:

lvgl_esp32_drivers
├───tft
├───touch
├───(esp) - to isolate esp-specific stuff?
└───examples

5. Versioning

All proposed changes above are breaking changes and there is no versioning or release cycle for esp_lvgl drivers.

I'm personally for rather slack-off option of tagging current state with version e.g. 0.0.1 which would be only bugfixed in the future.
And start a new branch with new refactored drivers e.g. 0.1.0.

But I'd like to hear your opinion on this too.

Roadmap

The main reason for creating this repository with the driver controllers (display and indev) from lv_port_esp32 was eventually contribute the drivers to the lv_drivers repo (then we could use that repo as submodule here, and other LVGL users could use their microcontroller of choice and have many drivers already available).

In order to achieve this, we would need to abstract the microcontroller independent code, this being: the bus the microcontroller uses to send the data to the display (SPI, I2C, parallel, etc) and any other GPIO (reset and backlight control).

I personally think of the following list as the steps we need to take, not all at once nor in priority order:

  • Fix the code style on the drivers, use the LVGL code style.
  • Update any outdated code.
  • On the meantime it might be useful to move the ESP32 specific code into a set of functions, think of static functions on the driver files, then maybe have a couple of files with all the ESP32 specific code?
  • Issue #1 had a lot of great ideas on how to get the display and touch controllers into one 'box' and update them if necessary, when rotating the screen, etc.
  • I think using callbacks is a way to abstract the microcontroller specific code from the drivers. Do you happen to know any other?

Other things we would like to do:

  • Clean up the Kconfig files.
  • Maybe structure the directories a bit better, I was thinking of rename the lvgl_tft directory to displays and have a directory per driver maybe?

@kisvegabor @embeddedt and others, any suggestions?

willing to give a lift

I am into Sitronix ST7735 style (e.g. ili9341, ili9488 and the like) TFT controllers. I am also working with different TCs (STMPE811, XPT2046 etc.)
I am interested in a more ESP-IDF-ish driver infrastructure with a streamlined lvgl interface.
Willing to share ideas, designs and code examples.
Looking for some guidance since this is an empty space now.

Support for displays without DC pin?

In menuconfig, there is a option to enable or disable the DC. However I beleive none of the drivers implemented it. Having such functionality will improve the usability of the driver, saving one more pin, and support Displays modules with no DC pin exposed.
Even though, I had hard time finding a driver which works without a DC pin, but found some hints to a 9-Bit SPI mode?

ILI9341 inversion on ESP32-Wrover-Kit

Hello,

ILI9341 display on ESP32-Wrover-Kit is always inverted, regardless off the settings Display orientation in menuconfig.
Problem lays on line 232 where correctly it should be

// 6C - portrait
// EC - portrait inverted
// CC - landscape
// 4C - landscape inverted
uint8_t data[] = {0x6C, 0xEC, 0xCC, 0x4C};

Nevertheless, I don't consider this solution satisfactory. This is screenshot from ILI9341 datasheet

image

There are 3 bits relevant for the display orientation and axis inversion: MY, MX, MV resulting in 8 different combinations.

My proposal is to split the Display orientation settings into three:

  1. Display orientation -> Landscape/portrait
  2. Invert X axis -> true/false
  3. Invert Y axis -> true/false

Then this section of code and similar in other drivers can be removed and the default settings for each board could be resolved by KConfig. (e.g. selecting Wrover-kit would set Invert X: true and Invert Y: false)

Should be handled together with #3 and #21, any opinion is welcome.

Thanks


NOTE

Not to be mistaken with color inversion. (command 0x20 and 0x21). #38


lvgl/lvgl.h: No such file or directory when using FT81X

Describe the issue
When building the project, if I use a development board such as the WROVER kit v4.1 it builds correclty however, if I select to use a screen driver such as the FT81x I get a compilation error

Code to reproduce the issue
standard git clone (with recursion) on master

Expected Results
build correcltly

Actual Results

../components/lvgl_esp32_drivers/lvgl_tft/EVE_config.h:41:10: fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"
          ^~~~~~~~~~~~~
compilation terminated.

ESP32 Chip version
N/A

ESP-IDF version
tried it on v4.1.1 as well as 4.0

Development kit used
N/A

Development machine OS
Tried on windows 10 as well as windows 8.1

Compilation warnings/errors (if available)

ir/FT81x.c.obj -MF esp-idf\lvgl_tft\CMakeFiles\__idf_lvgl_tft.dir\FT81x.c.obj.d -o esp-idf/lvgl_tft/CMakeFiles/__idf_lvgl_tft.dir/FT81x.c.obj   -c ../components/lvgl_esp32_drivers/lvgl_tft/FT81x.c
In file included from ../components/lvgl_esp32_drivers/lvgl_tft/EVE.h:39,
                 from ../components/lvgl_esp32_drivers/lvgl_tft/FT81x.c:8:
../components/lvgl_esp32_drivers/lvgl_tft/EVE_config.h:41:10: fatal error: lvgl/lvgl.h: No such file or directory
 #include "lvgl/lvgl.h"
          ^~~~~~~~~~~~~
compilation terminated.
[925/934] Building C object esp-idf/lvgl_tft/CMakeFiles/__idf_lvgl_tft.dir/disp_spi.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

If possible, copy the compilation log into a file and attach it here

SSD1306 orientation

I would be thrilled if it would be possible to implement 90 and 270 degree rotations (i.e. Portrait mode) for the SSD1306 driver.

I would love to use LVGL for my project but I would need this capability. I tried to see if I could implement it myself but failed. It should be fairly simple to implement using some conversions and a switch statement at the last place before sending the command to the display.

If somebody could find some time in the near future to help me implement that, I would be very grateful!

Compilation errors in lvgl_helpers.c

I got some compilation errors in lvgl_helpers.c

First:

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "src/core/lv_refr.h" instead of #include "src/lv_core/lv_refr.h"
#else
#include "lvgl/src/core/lv_refr.h" instead of #include "lvgl/src/lv_core/lv_refr.h"
#endif

The I get as well this:

../components/lvgl_esp32_drivers/lvgl_helpers.c:56:57: error: 'LV_HOR_RES_MAX' undeclared (first use in this function); did you mean 'LV_HOR_RES'?
ESP_LOGI(TAG, "Display hor size: %d, ver size: %d", LV_HOR_RES_MAX, LV_VER_RES_MAX);

Last issue looks like is caming from the past: lvgl/lv_port_esp32#124

I am using the round screen driver GC9A01 resolution 240x240.

Can I change LV_HOR_RES_MAX and LV_VER_RES_MAX for 240?

How do I tell lvgl that I only want to compile the driver for my ILI9488 board?

I've added -D CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488 to my build flags, however, lvgl insists on compiling all the drivers regardless. This leads to errors in drivers that I'm just not interested in like:

.pio/libdeps/esp32doit-devkit-v1/lvgl_esp32_drivers/lvgl_tft/il3820.c:183:2: error: #error "Unsupported orientation used"

Is there a reason that chip-specific files don't honor the CONFIG_LB_TFT_DISPLAY_CONTROLLER_* flags?

Is there a better way to work around this issue besides renaming all the files I don't need?

SSD1306 Wrong contrast initialisation and display mode

In the function void ssd1306_init(void) the configuration seems wrong:

    uint8_t display_mode = 0;

#if defined CONFIG_LV_INVERT_COLORS
    display_mode = OLED_CMD_DISPLAY_INVERTED;
#else
    display_mode = OLED_CMD_DISPLAY_NORMAL;
#endif

    uint8_t conf[] = {
        OLED_CONTROL_BYTE_CMD_STREAM,
        OLED_CMD_SET_CHARGE_PUMP,
        0x14,
        orientation_1,
        orientation_2,
        OLED_CMD_SET_CONTRAST,
        display_mode,
        0xFF,
        OLED_CMD_DISPLAY_ON
    };

We can see that the double byte command OLED_CMD_SET_CONTRAST (SSD1306 datasheet rev 1.1 p.28) is followed by display_mode.
So the contrast is set to 0xA6 or 0xA7 depending on the display mode configured and the display mode isn't configurable.

The fix that worked for me is to invert display_mode and 0xFF:

    uint8_t conf[] = {
        OLED_CONTROL_BYTE_CMD_STREAM,
        OLED_CMD_SET_CHARGE_PUMP,
        0x14,
        orientation_1,
        orientation_2,
        OLED_CMD_SET_CONTRAST,
        0xFF,
        display_mode,
        OLED_CMD_DISPLAY_ON
    };

`LV_HOR_RES_MAX` and `LV_VER_RES_MAX`

LV_HOR_RES_MAX and LV_VER_RES_MAX do not exist anymore in LVGL v8. However, this repository (in lvgl_helpers.h) uses them to calculate DISP_BUF_SIZE. They're also used in various drivers.

@kisvegabor, @embeddedt : Does this mean we need to do a v7 release and a v8 release of this repository to go along with the respective LVGL versions?

#if defined (CONFIG_CUSTOM_DISPLAY_BUFFER_SIZE)
#define DISP_BUF_SIZE   CONFIG_CUSTOM_DISPLAY_BUFFER_BYTES
#else
#if defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7789)
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7735S
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ST7796S
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_HX8357
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SH1107
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * LV_VER_RES_MAX)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9481
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9486
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9488
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9341
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_SSD1306
#if defined (CONFIG_LV_THEME_MONO)
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * (LV_VER_RES_MAX / 8))
#else
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * LV_VER_RES_MAX)
#endif
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_FT81X)
#define DISP_BUF_LINES  40
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * DISP_BUF_LINES)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_IL3820)
#define DISP_BUF_SIZE (LV_VER_RES_MAX * IL3820_COLUMNS)
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_RA8875
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_GC9A01)
#define DISP_BUF_SIZE  (LV_HOR_RES_MAX * 40)
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_JD79653A)
#define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 5KB
#elif defined (CONFIG_LV_TFT_DISPLAY_CONTROLLER_UC8151D)
#define DISP_BUF_SIZE ((LV_VER_RES_MAX * LV_VER_RES_MAX) / 8) // 2888 bytes
#elif defined CONFIG_LV_TFT_DISPLAY_CONTROLLER_ILI9163C
#define DISP_BUF_SIZE (LV_HOR_RES_MAX * 40)
#else
#error "No display controller selected"
#endif
#endif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.