-
Notifications
You must be signed in to change notification settings - Fork 167
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
Fix the Windows port #175
Comments
I fixed the original error and got a basic CI setup going, but it now seems to be failing due to the SDL driver referencing POSIX signal APIs. This was added just a few months after the original PR in a2b13da. |
True, thanks @embeddedt for reminding me this. The problem we were trying to solve was how to interrupt the REPL (which is blocking read from stdin) in order to run LVGL event loop while the REPL waits for input. I was trying to find out whether there is a way to interrupt REPL on Windows. So the options I can see for now are:
|
Looking into a solution for that... in the meantime, we have another problem.
|
Actually the SDL driver still contains the code that runs the event loop. It's enabled by default and can be disabled by setting "auto_refresh" to False (this is done on advanced_demo to show how to use the generic event loop with SDL). A more complete solution would be to implement lv_timer for Windows (the same way we have Linux specific timer on the bindings) which doesn't rely on FFI. |
machine.Timer for windows port, here is a simple PR: micropython/micropython#8342 for the SDL/modSDL.c here is a simple patch to make the mingw port working
|
We have an lv_timer implementation for unix. In case your PR don't make it into Micropython, we van consider a Windows specific
Would you like to open a PR? |
yes, the ffi should be more flexible. but, it is turned off by default on windows port, not like the unix port. |
Any idea why? |
let's give a try for ffi on lv_mpy win port. |
hi amirgon, i tried this simple solution your mentioned here, it works(): modify lv_utils.py
so, i think, we may give an empty impl(without ffi call windows timer api) for windows port simply, and make it possible
|
to check SDL being running here is a simple patch for modSDL.c
and test code like this:
|
The simple solution with the built-in event loop has some disadvantages: the user cannot customize the event loop, no support for uasyncio etc. All these are supported only with the explicit event loop from lv_utils which requires Timer.
We don't need to import lv_utils at all if we are using the SDL built-in event loop. There is no point since the functionality there will not be used in such case. |
hi amirgon, we may have 3 options for this:
BTW.
|
another thing, is there any possible to reduce the command line length for gen_mpy.py to produce the qstr? this will make build lv_mpy with msbuild.exe possible like micropython official does. |
(2) and (3) achieve the same thing in different ways, right? (1) I've changed display_driver_utils.py to work without event loop if Timer is missing, so this would probably work with Windows now (could you check?)
This is useful when there are blocking actions (network or file access, input from user or a simply "sleep") and you want to be able to run multiple co-routines in cooperative multitasking (without multithreading). This is very common on javascript and also used on Python - try to read about async, await and uasyncio.
Frozen code uses Flash, not RAM. Are you trying to save RAM or Flash?
I'm not sure to which command line you refer to. |
Any update on this? |
The Windows port on lv_micropython seems to be broken.
Need to fix it and add CI tests
Related:
The text was updated successfully, but these errors were encountered: