Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LVGL: Add support of LVGL9 into LVGL port #268

Closed
wants to merge 1 commit into from
Closed

LVGL: Add support of LVGL9 into LVGL port #268

wants to merge 1 commit into from

Conversation

espzav
Copy link
Collaborator

@espzav espzav commented Jan 4, 2024

ESP-BSP Pull Request checklist

  • Version of modified component bumped
  • CI passing

Change description

Support of LVGL9 in ESP LVGL port (including support LVGL8 too).

LVGL9 supported parts:

  • Automatic selection between LVGL8 and LVGL9
  • LCD support
  • Screen rotation
  • Monochromatic screen
  • LCD Touch
  • Navigation buttons
  • Encoder
  • USB HID device

Other things not supported with LVGL9:

  • Images
    - [ ] lv_obj_set_style_image_opa

TODO (Create Jira tickets)

@espzav
Copy link
Collaborator Author

espzav commented Jan 24, 2024

@tore-espressif PTAL
All tested examples are here: #280
I didn't test it more in LVGL8, as we decided not support LVGL8 in BSP examples. Some simple examples are supported in LVGL8.
The main example in component is fully supported in both versions of LVGL.

  • [] I think, that I should update IDF examples too.

@espzav espzav force-pushed the lvgl9 branch 2 times, most recently from 9fe9e50 to 3ae4699 Compare January 24, 2024 12:49
Copy link
Collaborator

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@espzav great job! I left few comments that might be worth considering

.github/workflows/build_test.yml Outdated Show resolved Hide resolved
components/esp_lvgl_port/CMakeLists.txt Outdated Show resolved Hide resolved
components/esp_lvgl_port/CMakeLists.txt Outdated Show resolved Hide resolved
components/esp_lvgl_port/idf_component.yml Show resolved Hide resolved
components/esp_lvgl_port/README.md Outdated Show resolved Hide resolved
components/esp_lvgl_port/include/esp_lvgl_port.h Outdated Show resolved Hide resolved
components/esp_lvgl_port/CMakeLists.txt Show resolved Hide resolved
components/esp_lvgl_port/include/esp_lvgl_port.h Outdated Show resolved Hide resolved
@espzav
Copy link
Collaborator Author

espzav commented Jan 25, 2024

@tore-espressif Thank you for review. Fixed all except mail esp_lvgl_port.c file (as a comment).

  • Divided header files too - PTAL

@espzav espzav force-pushed the lvgl9 branch 2 times, most recently from 8f308cf to 9ad2b6b Compare January 26, 2024 08:36
@espzav
Copy link
Collaborator Author

espzav commented Jan 26, 2024

My last commit fixing usage of FPS monitor. I don't know, if it is right solution or workaround - I am discussing with Gabor: lvgl/lvgl#4926 (comment)

@Lzw655
Copy link
Collaborator

Lzw655 commented Jan 26, 2024

Hi @espzav, I also tried to port LVGL v9, and I've encountered some issues when using multiple CPU cores to render in parallel, and I'd like to share them with you:

  • We cannot directly use the FreeRTOS from LVGL because the header file paths it contains are not suitable for ESP-IDF. Moreover, the use of taskENTER_CRITICAL() is not compatible. However, with some simple modifications, it can be adapted for use. I recommend getting official support for our system from LVGL or enabling LV_OS_CUSTOM and registering it in esp_lvgl_port.
  • Ensure that the lv_init() function and lv_timer_handler() are in the same task; otherwise, the program will hang.

BTW, it indeed improves the performance by using multiple CPU cores. By running the v8 benchmark demo, the use of 2-unit increased the weighted FPS from 51 to 73 compared to a 1-unit.

@espzav
Copy link
Collaborator Author

espzav commented Jan 29, 2024

My last commit fixing usage of FPS monitor. I don't know, if it is right solution or workaround - I am discussing with Gabor: lvgl/lvgl#4926 (comment)

Here is the fix in LVGL: lvgl/lvgl#5518

@espzav
Copy link
Collaborator Author

espzav commented Jan 29, 2024

@Lzw655 Thank you for info, I will try it.

Copy link
Collaborator

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@espzav few more details :)

components/esp_lvgl_port/include/esp_lvgl_port.h Outdated Show resolved Hide resolved
components/esp_lvgl_port/CHANGELOG.md Show resolved Hide resolved
@espzav
Copy link
Collaborator Author

espzav commented Jan 30, 2024

@tore-espressif Thank you for your review! All fixed. Is it ok, can we merge it now?

@tore-espressif
Copy link
Collaborator

@tore-espressif Thank you for your review! All fixed. Is it ok, can we merge it now?

I can see that the CI is still using LVGL 8 https://github.com/espressif/esp-bsp/actions/runs/7707868489/job/21005817735?pr=268#step:4:186

Could you please add override_path for esp_lvgl_port to all BSPs? Eg here https://github.com/espressif/esp-bsp/blob/master/bsp/esp32_s3_korvo_2/idf_component.yml#L29

This way, the CI and local builds will automatically pick esp_lvgl_port from the current state of the repo, instead the latest released version.

After the CI passes with LVGL9 build, we should be good to merge :)

@tore-espressif
Copy link
Collaborator

@espzav Will we close this PR in favor of #280 ?

@espzav espzav closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants