That is strange - the way to disable lvgl printf is to define LV_SPRINTF_CUSTOM as 1.
Please check lv_conf.h again, on github it’s 0 (maybe should be 1 by default)
I successfully “make BOARD=STM32F4DISC” in lv_binding/ports/stm32.
However, after i flashed the F4 board and then access the REPL ( by inserting “screen /dev/ttyACM0”), i could not “import lvgl as lv”. It replied "ImportError: no module named ‘lvgl’ ".
Did you update mpconfigport.h on the STM32 port to use lvgl as a builtin module?
Please have a look at mpconfigport.h on ESP32. See how MICROPY_PORT_LVGL_DEF is defined and used.
My apologies for replying so late, my team is busy for writing documents for our university.
I have some time researching on the links you gave me on the last comment:
About the Github link pull/16 you gave
In this link, I suppose you refered to the first comment and the link under it by @cidermore. In this link, I did the same thing as him except there is a line " MP_ROM_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl }" is under #define STM_BUILTIN_MODULE. I also accessed his repo and checked mpconfigport.h in stm32. The line " MP_ROM_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl }" is under #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS ( As i did initially).
I guess you are mentioning having “MICROPY_PORT_LVGL_DEF” under MICROPY_PORT_BUILTIN_MODULES.
About the reference you gave about mpconfigport.h on ESP32
In this link, "{ MP_OBJ_NEW_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl }, "
is under MICROPY_PORT_LVGL_DEF, which is different from the link of @cidermore. I am a bit confused about this.
About the MICROPY_PORT_LVGL_DEF, I tried to did the same thing as MICROPY_PORT_LVGL_DEF was used in esp32. And I received this error: 2019-12-12.png
These are additional (optional) ESP32-specific C libraries. ESPIDF provides API to ESP32 hardware and peripherals, RTCH is a resistive touch driver.
I guess you don’t need them.
LODEPNG decodes png files, it is not ESP32 specific, you can use it if you want.
I followed the ESP32 version and had important parts like you mentioned.
Also, as I deleted { MP_OBJ_NEW_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl } under STM_BUILTIN_MODULE, the error of strncpy has gone.
However, I still have an issue of “ImportError: no module named ‘lvgl’”. I don’t know what i miss.
Do i need a real display module to be able to “import lvgl as lv”?
Also, how can i post a link to Github here, “Sorry you cannot post a link to that host.” constantly appears. I want to post a link of Github to my mpconfigport.h file.
Thank you.
The reason you can’t import lvgl is that you deleted { MP_OBJ_NEW_QSTR(MP_QSTR_lvgl), (mp_obj_t)&mp_module_lvgl } under STM_BUILTIN_MODULE.
This is not the right way to solve the strncpy problem.
Please put it back and provide an implementation for strncpy as I suggested above.
No. You can use lvgl without a display (although it’s a bit pointless as you will not be able to see anything)