Replies: 21 comments 38 replies
-
I think with macks the hardware of the mac plays a HUGE role in it working properly or not. Both the build and the use are simple.
and the use should be pretty simple as well. import lcd_bus
import sdl_display
import sdl_pointer
import lvgl as lv
bus = lcd_bus.SDLBus(flags=lcd_bus.SDLBus.WINDOW_BORDERLESS)
buf = bus.allocate_framebuffer(768000, 0)
display = sdl_display.SDLDisplay(
data_bus=bus,
frame_buffer1=buf,
width=800,
height=480,
color_space=lv.COLOR_FORMAT.RGB565
)
display.init()
pointer = sdl_pointer.SDLPointer()
# code for GUI
import task_handler
task_handler.TaskHandler(5) |
Beta Was this translation helpful? Give feedback.
-
also try installing libc...
I can adjust the timer script to locate the libc.dynlib file if i is needed. |
Beta Was this translation helpful? Give feedback.
-
Fixed two typos
I seem to be missing a MacOS timer
|
Beta Was this translation helpful? Give feedback.
-
and task_handler.py has the following:
|
Beta Was this translation helpful? Give feedback.
-
i am working on that now. Trying to find a cross platform timer |
Beta Was this translation helpful? Give feedback.
-
OK I have a way to go about doing it. Gonna be tricky because of the callback being made from a different thread and not being able to access the repl. |
Beta Was this translation helpful? Give feedback.
-
OK I updated the repo. Try it again, hopefully it will work. |
Beta Was this translation helpful? Give feedback.
-
Fixed a couple of typos
A build error, is there supposed to be a macOS version of modmachine.h?
|
Beta Was this translation helpful? Give feedback.
-
remove the backslash and the end of that line and compile it again. It shouldn't need to be there anywho because it's an array that the macro is getting used in and the C compiler isn't picky about newlines. |
Beta Was this translation helpful? Give feedback.
-
also, don't do a git pull. delete and clone the library again. you doing a pull isn't updating the files that got modified the time before. That define is no longer in the modmachine.c file. |
Beta Was this translation helpful? Give feedback.
-
From a fresh git clone
|
Beta Was this translation helpful? Give feedback.
-
copy the SDL dynlib from the I'll fix the issue right now so it copies the file at the end of the build. Now that I have the complete filename of the sdl dynamic library. |
Beta Was this translation helpful? Give feedback.
-
Removed directory, git clone'd, built with executable.. SegFault. I added some print statements to test.py and it's in the task_handler call.
|
Beta Was this translation helpful? Give feedback.
-
ok the segfault should now be fixed |
Beta Was this translation helpful? Give feedback.
-
also what I want you to do is download the attached file and put it into your |
Beta Was this translation helpful? Give feedback.
-
I don't think the callback is being made. SDL is not going to create the window until the events are pumped |
Beta Was this translation helpful? Give feedback.
-
There is no extra output with the task_handler.py in place. Neither the task handler, nor the timer print. |
Beta Was this translation helpful? Give feedback.
-
ok so the callback I don't think is getting called. I am going to add some more simple debugging print statements so we can see what is happening. |
Beta Was this translation helpful? Give feedback.
-
OK I updated the repo. |
Beta Was this translation helpful? Give feedback.
-
Removed directory, git clone'd, built with executable, copied in test.py with There is output!
|
Beta Was this translation helpful? Give feedback.
-
Here are snippets of the sdl_bus.c file so the errors are easier to determine.
|
Beta Was this translation helpful? Give feedback.
-
I have a Macbook M2 and a Mac Mini M1 (where I do most of my development). First off, I'd like to really thank Kevin for the easy setup/build environment. I think the community would benefit from an example directory (especially since LVGL pulled their micropython example code from the v8.x code base when it went to v9.x).
Ideally, a simple Unix/Linux, MacOS and a Windows example along with a build line to further simplify it for us beginners that are new to this code base.
code/example/{unix,macos,windows}/easy.py
I am concerned that MacOS support may not be so simple for v9 lvgl as the event loop needs a timer and MacOS doesn't have librt.
LVGL Issue 269
IF MacOS is totally out of the question for the near-ish future, has anyone tried this in Ubuntu VM on Apple H/W?
Yesterday, I tried VMware Fusion Pro running an Ubuntu Server v24 Arm + GUI + build tools. It was simple enough to build an executable but when I ran it, SDL2 seems to need a 3d Graphics lib. Upon enabling "Accelerated 3D Graphics" the display grinds to almost a halt as I pan the mouse to get repaints of typing in a shell... There has to be a way, but this isn't it.
I plan on helping out with a GUI implemented with lvgl_micropython for an Elecrow 7" panel for FluidNC.
Beta Was this translation helpful? Give feedback.
All reactions