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

Mac OS port does not work anymore #269

Open
daviel opened this issue Apr 12, 2023 · 2 comments
Open

Mac OS port does not work anymore #269

daviel opened this issue Apr 12, 2023 · 2 comments

Comments

@daviel
Copy link

daviel commented Apr 12, 2023

I was trying to test the newer master branch and encountered following issue when running the example in the readme.

import lvgl as lv
lv.init()
from lv_utils import event_loop
Traceback (most recent call last):
File "", line 1, in
File "lv_utils.py", line 45, in
RuntimeError: Missing machine.Timer implementation!

It looks like it is using the fallback in the lv_timer if machine.Timer is not available. This leads to binding the timer from libc.so/librt.so via FFI which is not available under Mac OS.

I also tried running the example without the event_loop but there is no window showing up after after "disp_drv = lv.sdl_window_create(320,240)".

In version 8 of lvgl I could get lv_micropython to work without problems.

@amirgon
Copy link
Collaborator

amirgon commented Apr 13, 2023

Hi @daviel, thank you for reporting this bug.

The event loop is required for version 9 of lvgl on all platforms, whether embedded or not. Since Micropython Timer and libc.so/librt.so timer functions are missing for MacOS, it seems that we'll need to implement a MacOS-specific Timer class in the same manner as lv_timer.py implements it for Linux and Linux-like systems.

Would you like to give implementing this a try? If you or anyone else would like to attempt it, I'd be happy to review a pull request.

@daviel
Copy link
Author

daviel commented Apr 16, 2023

I will take a look at it but can't promise to have a solution anytime soon. :)

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

No branches or pull requests

2 participants