Skip to content
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

feat(micropython): improve mem core micropython #6219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Carglglz
Copy link

@Carglglz Carglglz commented May 13, 2024

Allow using MICROPY_MALLOC_USES_ALLOCATED_SIZE option required to build lv_bindings_micropython with upstream MicroPython.

Required for lvgl/lv_binding_micropython#242
lvgl/lv_binding_micropython#341

Allow using `MICROPY_MALLOC_USES_ALLOCATED_SIZE` option
required to build `lv_bindings_micropython` with upstream
MicroPython.

Required for lvgl/lv_binding_micropython#242
@kisvegabor
Copy link
Member

cc @kdschlosser

Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I haven't tested it, but I assume that it's really required.

@kdschlosser
Copy link
Contributor

I thought I had actually made a comment on this, maybe I didn't press the comment button.

These functions should not even exist in LVGL. This is something that is able to be done using macros and it should be done at the binding level and not in LVGL.

This is the exact reason as to why there shouldn't be anything binding specific n LVGL because Now you have micropython specific code spread across multiple repositories. It can lead to a tangled mess when trying to locate where things are being done at.

Another option is to declare functions as extern and then let them get populated using a source file that is compiled in the binding.

The LV_STDLIB_MICROPYTHON macro doesn't need to exist in LVGL as that is able to be defined in the binding as well if the source file is moved. this would stop the other source files from getting compiled.

In the lv_mem_core_micropython.c file it is actually including a file that is from the micropython binding. that's kind of a goofy setup. not to mention confusing too.

In the binding I am working on I went about handling this issue in a different manner but this PR would make it easier to deal with that's for sure. I think this entire file needs to be located in the binding and not in LVGL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants