lvgl-micropython / lvgl_micropython

LVGL module for MicroPython
MIT License
80 stars 25 forks source link

Those who have been having problems compiling under macOS #39

Closed kdschlosser closed 4 months ago

kdschlosser commented 6 months ago

OK I have been working on this for a bit now and I think I have the problem sorted out.

I can tell you at this time it is compiling for the ESP32 and also for the STM32. I am waiting for it to finish up compiling for the RP2 and also the native port that will run on macOS.

Here is the branch.

https://github.com/kdschlosser/lvgl_micropython/tree/develop

kdschlosser commented 6 months ago

I wanted to give an update. MacOS is compiling for ESP32, STM32 and RP2. I am working on getting it to compile so it can be run from macOS. Being able to run it on a desktop using the same scripts you put onto an MCU is going to make development a whole lot easier.

kdschlosser commented 6 months ago

YAY!!! it is now compiling for macOS. ESP32 works, STM32 works, RP2 works and even compiling to run MicroPython on macOS works.

I tried to statically link SDL2 to the executable but it didn't want to do it. Clang is made in a manner so it will dynamically link at all costs. I have tried everything I could find on how to tell Clang to statically link and all suggestions didn't work. as soon as I had SDL2 build a shared library the compilation succeeded. This is just the way Apple clang was made and there is nothing I can do about it. MicroPython has a requirement of using Apple clang for some reason and in fact gcc on macOS is just a pointer to clang. so there is no way around it without modifying the core of MicroPython. There is a reason why MicroPython has done this and I am guessing that the build will fail or MicroPython will not work properly is another compiler is used.

kdschlosser commented 6 months ago

OK so update, macOS is compiling for RP2, STM32, ESP32 and also so micropython is able to run on macOS.