-
Notifications
You must be signed in to change notification settings - Fork 162
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
Enable lv_binding_micropython as USER_C_MODULE #341
base: master
Are you sure you want to change the base?
Conversation
Thank you, I will test it, too! |
6e2d506
to
0bacc98
Compare
@MathyV I've just updated the tests, you should be able to run |
I am confused as to the purpose of this PR. The purpose of a user c module should be to keep the binding code self contained where modifications to the micropython build system would not need to be made to get it to compile. |
Which it is exactly this, the tests are not necessary just convenient, if necessary I can split this PR.
I am confused too, where do you see these modifications? 👀 |
There is no PR in https://github.com/lvgl/lv_micropython that removes all of the code that has been added to the build system to compile LVGL into micropython. I am making an assumption about that repo still being used because I am not seeing any kind of a connection between this repo and micropython anywhere that would indicate something different. I am also failing to see how this is able to be compiled as a user c module as there is no micropython.cmake or micropython.mk which is what is used to compile it as a user_c_module. The cmake file is not as important but the makfile must be named as micropython.mk in order for the micropython build system to locate it due to a directory and not a file needing to be provided in a make build. |
I am trying to figure out how I would use this as a user_c_module. What to I point micropython to? |
No, this is independent of
Not sure where you are looking at 😕 they are here
Just create a directory next to MicroPython repo e.g. named To compile unix port just do
In my case I compile my own unix variant for convenience (not necessary)
this added to
this added to
And this added to
In any case |
OK so say I clone this repo in my IDE's project folder. Then I clone micropython 1.23 into the binding cloned folder. To build it I would have to use the following command to build
When I do that make is going to search every single one of my other projects in a recursive manner and look for micropython.mk files. It is going to also do this for the directory the binding repo has been cloned into and if it finds any micropython.mk files anywhere it is going to compile those as user c modules as well. If this PR is accepted when the lv_micropython repo gets updated I am guessing it is going to break due to the gen_mpy script being altered to work with micropython 1.23. How were you able to handle the build with the ESP32s driver reliance on the esp-idf and that version needing to be 4.4 where as micropython 1.23 uses 5.1.x or 5.2.x I don't remember which. Support for 4.4 was removed in micropyton 1.21 I believe, it may have been 1.20... compiling LVGL as a user c module was never the issue, it was compiling the rest of the things that go along with it. How dows one go about setting up the display drivers? I am thinking that you may have missed this... everything in the drivers folder also needs to be handled as well. The .py files need to be frozen into the firmware and I am not seeing where that is done. |
No this is what I meant
The check passed which seems to build
Again those changes should be backwards compatible as the check confirms...
Yes it was,
The display drivers are a nice thing to have but not necessary to build
I'm aware of this, see my comments #242 (comment) and |
Fix to allow using lv_utils with asyncio in unix-macos.
is there possible to create new repositories under lvgl org. lv_micropython is real confuseing with micropython version and idf version. there is saying in README.md lv_micropython as a example to show how to bind lv_binding_micropython,but when i try to figure out how to bind as a submodule under official micropython repo, it is real not friendly and easy to achieve. sorry about my terrible english explanation, it is not my first language. |
e06953e
to
edaa4c3
Compare
Properly handle root pointers on lvgl init/deinit which fixes init error after a soft reset (see lvgl#343).
Just popping in to say this is great work. I just got this successfully running on a LILYGO T_Display using the latest Micropython. I haven't done too much with it yet as I'm still learning the ropes of this library but I did get me a press me button on a display with no touch inputs. There was some initial issues with the uasyncio stuff but I haven't looked too closely into that as it may be an error I made with the partitions. EDIT: The crashing seems to happen when I re-upload my script. Not sure the proper teardown of lvgl yet but it doesn't seem to be due to this C modulization but instead something to do with the co-processor or something |
@TheBestJohn
This may be related to #343 , not sure how are you uploading the script (probably there is a soft reset involved?) but you need to do a hard reset or call The are some tests that you may want to run with
For touch inputs you need to register an "input device" have a look at |
This is an updated version of #242 which allows to build
lv_binding_micropython
as aUSER_C_MODULE
with latest upstream MicroPython.Tested on :
This also adds tests that can be run with MicroPython test suite in both desktop (unix port) and devices.
These tests are :
api
: MicroPython-LVGL API (display/touch simulated)display
: Display driver integration (touch simulated)indev
: Touch driver integration (requires user input)For devices display/touch driver is not included, see more information at
tests/README.md