@kdschlosser
in your lv_binding_micropython/mkrules.cmake
if(ESP_PLATFORM)
file(GLOB_RECURSE LV_ESPIDF_HEADERS ${IDF_PATH}/components/*.h ${LV_BINDINGS_DIR}/driver/esp32/*.h)
lv_bindings(
OUTPUT
${LV_ESPIDF}
INPUT
${LV_BINDINGS_DIR}/driver/esp32/espidf.h
and
if(ESP_PLATFORM)
LIST(APPEND LV_SRC
${LV_BINDINGS_DIR}/driver/esp32/espidf.c
See How to build MicroPython with multiple external user C modules
I didn’t suggest compiling LVGL as an MPY. It certainly would be too big and slow to load.
You linked to the same link I did:
Agreed, native .mpy modules are platform specific, Micropython version specific, and currently only work on these platforms:
- x86 (32 bit)
- x64 (64 bit x86)
- armv6m (ARM Thumb, eg Cortex-M0)
- armv7m (ARM Thumb 2, eg Cortex-M3)
- armv7emsp (ARM Thumb 2, single precision float, eg Cortex-M4F, Cortex-M7)
- armv7emdp (ARM Thumb 2, double precision float, eg Cortex-M7)
- xtensa (non-windowed, eg ESP8266)
- xtensawin (windowed with window size 8, eg ESP32)
So, on a project running on a Cortex-M7 for example, the developer could have the benefit of not having to compile their own drivers at all. The same way Micropython offers precompiled binaries on their website, Github CI could be used to provide precompiled display driver binaries for that handful of platforms, and those binaries could be available to anyone using one of those platforms. No matter how the user got their firmware, all it would take for them to add display drivers would be to add a file to the microcontroller’s file system. Remember, my drivers will work with other graphics libraries as well, so maybe all they need is the firmware from micropython.org and the precompiled display driver MPY that I hope to provide, and they never have to run make
. For other platforms, say RP2, they would still have the option to compile their own as a user c module. Having native .mpy modules available might even sway the person making the hardware decisions to use an ESP32 or Cortex-M7 in their build for that very reason. Plus, I haven’t been able to find anything that says the above list will never grow.
If those limitations don’t impede the ability of the driver to compile as an MPY and don’t impede it’s ability to work, who cares? To be honest with you, I don’t know if they will or not, but that’s no reason for me not to try.
At this point I want to apologize to you for picking apart what you posted and coming across argumentative. That is not my nature at all. I did it to support what I’m about to say.
I am 50 years old and made my first forum post only 2 months. First ever, not just on LVGL’s forums. I’m a smart man, but prefer to take in what others share and keep to myself. I feel strongly about the topic at hand and also feel like I’ve got something to contribute, which is why I’ve been so vocal all of a sudden. I try to go out of my way to not talk down to anyone. In fact, when I could, I’ve praised you for your work and the contributions you are making to the community. That is very sincere. With @amirgon away from the project, you appear to be the future of lv_binding_micropython and your work will likely benefit us all. There’s no doubt in my mind you have the skills and are up for the task. Yet every time I post anything, I write and rewrite, trying to rephrase things so you won’t pick them apart. For instance, in the previous paragraph, I didn’t mention that x86 and x64 drivers are implemented differently than drivers for microcontrollers. I went out of my way to phrase things the way I did so you won’t focus on those or point that out. It’s not just me you do these things to. Here’s one example from another thread on this forum:
It looks like this person has a valid reason, but since they didn’t explain it to you first, you basically told them what they were doing is invalid. I ask you to step back and realize we all have have our own goals and use-case scenarios. You may not see the reasoning or circumstances surrounding what someone says. That doesn’t make what they say invalid. You may not agree with what someone says, and you may be right. No need to say “That won’t work…” There are ways to make your point without being adversarial, argumentative or belittling.
I have said all I am going to say. From here forward, I’ll go back to lurking. I may chime in from time to time if I think I can help someone with a problem or if I have some accomplishment I want to share with the community. I may try the Micropython forums instead. At any rate, I don’t want to argue with you publicly and have no intentions on responding to whatever you may post next. I’ll see it for certain, but if you are interested in a reply from me, you should message me directly. One last thing… I still respect your knowledge and skills and appreciate everything you’ve done to help me, both in your posts addressing me directly and in your posts for others that I’ve benefited from, even before I created a forum account.