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

Update PlatformIO demo to LVGL9.1 #64

Merged
merged 4 commits into from
May 13, 2024
Merged

Conversation

zmeiresearch
Copy link
Contributor

This pull request updates lv_platformio demo to use lvgl 9.1. The changes that are required are:

  • Bump lvgl version from 8.2 to 9.1
  • Remove dependency of lv_drivers. Lvgl 9+ has these included in the main repo under src/drivers
  • Simplify the SDL demo as the driver in 9+ provides lv_sdl_window_create et.al. which takes care of proper creation and initialization of a window and input devices
  • Update the demo for the lvgl 8->9 transition (e.g. lv_disp_drv_t -> lv_display_t, lv_indev_drv_t -> lv_indev_t)

NB!: SDL demo has been tested only on MacOS and Linux. I've also updated the STM Discovery demo to compile and very similar code works on other boards, but I don't have that particular board to test.

zmeiresearch and others added 2 commits May 5, 2024 01:48
Trying to fix a 
```
Run actions/setup-python@v1
Error: Version 3.x with arch x64 not found
```
failure on MacOS
@kisvegabor
Copy link
Member

Awesome, thank you for this PR. Could you take a look at the failing CI? It seem on Mac it needs simply SDL.h.

zmeiresearch and others added 2 commits May 9, 2024 02:20
…d library paths. Fixes compilation failure on MacOS 14
Append Homebrew-installed SDL include and library paths on MacOS
@zmeiresearch
Copy link
Contributor Author

Pushed an update that fixed the build failure. Looking at previous CI runs, on x64 MacOS versions PlatformIO somehow managed to find SDL.h and libSDL2.a by itself, but on latest one it did not.

Initially tried adjusting build_flags to conditionally search for the correct paths (similar to what is done for hal/sdl2) but it ended up too convoluted, so used an additional extra_script that does the magic.

Note that it needs to be a 'pre' script, as build_flags cannot be modified by 'post' one - see https://docs.platformio.org/en/latest/scripting/launch_types.html

@kisvegabor
Copy link
Member

Awesome! Thank you very much!

I've shared it on LinkedIn too.

@kisvegabor kisvegabor merged commit 172aa55 into lvgl:master May 13, 2024
3 checks passed
@Linjieqiang
Copy link

Thank you very much. I tried many times and finally succeeded this time.
image

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.

3 participants