Open picpic020960 opened 3 years ago
As I said in my previous answer, we are in a complicated situation at the moment: the ESP32 port of micropython now uses a new build system based on Espressif's idf.py command, which in turn is based on cmake. This build system does not have the facilities yet, needed to build C-modules into the micropython binary, required by lv_micropython. If you want to just build the unix port of lv_micropython (not the t-watch version) then the easiest thing would be to download the latest lv_micropython version from github. Then follow the build instructions in the README. This should work without any problems. Once you have this going you can play with my twatch2020_firmware software, which is code that runs on both, the SDL version of lv_micropython (unix port) as well as the t-watch itself. As soon as the ESP32 port of lv_micropython will have switched to cmake as well I will also update my github repository for the t-watch.
OK , compiled :
MicroPython v1.14-453-g86f3583-dirty on 2021-02-26; linux version Use Ctrl-D to exit, Ctrl-E for paste mode
import display_driver Running the SDL lvgl version
but confused with environment variable and PYTHONPATH / MPY_PATH. example in lv_mpy_examples ? thanks a lot
If you are running under Linux then MicroPython will look for modules under $HOME/.micropython/lib. So... I have display_driver.py and display_driver_utils.py, imagetools and a few more in this directory. In order to make the lv_examples run you can combine header.py (found in lv_examples/src) with the example:
_cat header.py lc_ex_bar.py > bar_executable.py chmod +x bar_executable.py ./barexecutable.py Please tell me if this works for you.
lv_examples/src ?? header.py ?? .micropython/lib ?? some adding configuration.
i will test with populate .micropython/lib , seeing with sys.path but not created. edit : OK for num_clock.py with montserra 16 ( 48 not found) but no u/asyncio ! (for AngainorDev repo test) NB : num_clock (montserra 48) on t-watch = bad : digits as shadow , only the outline is visible
Bonjour, Sorry I was not clear enough! Please download https://github.com/lvgl/lv_examples There you will find all the lvgl examples for C and MicroPython. In its src directory you will find header.py. Have a look at it. The first line allows you to convert the script into an executable with chmod +x whatever_script.py Then you can run it with ./whatever_script.py Please modify this first line and replace /opt/bin/lv_micropython with the path of your micropython executable. Then concatenate the header file with the example you want to try: cat header.py lv_ex_bar_1.py > ex_bar.py # for the simple bar example chmod +x ex_bar.py ./ex_bar.py To create an lv_micropython with uasyncio built-in please compile he unix port with make VARIANT=dev The binary will be called micropython-dev and will have uasyncio included To get montserrat48 font you must enable it in lv_conf.h. You find this file in lv_micropython/lib/lv_bindings I will check numclock on the t-watch.
OK for monserrat 48 uasyncio : added to .micropython/lib for the moment. will test , then VARIANT maybe. header.py : ko 'bad interpreter' but don't worry , workaround thank's for all
"bad interpreter" you get if your path to lv_micropython is wrong. Make sure that /opt/bin/lv_micropython is replaced by the path to your lv_micropython binary. Then it must work!
Forgot: adding uasyncio to .micropython/lib may not be enough: the "standard" micropython uses a previous version of uasyncio and you might get conflicts. Not sure though!
OK the full path , with interpreter name ! work fine for uasyncio / VARIANT , later Thanks
Bonjour Uraich, one question : I want to hide the TAB label in tabview : in c example : lv_tabview_set_btns_pos(tabview, LV_TABVIEW_TAB_POS_TOP/BOTTOM/LEFT/RIGHT/NONE) how to translate LV_TABVIEW ... from c to mycropython ? and one second : how to clear (CLS) the screen ? thanks for help
PS : demo_printer : whaooo !
Bonjour Uraich , "As soon as the ESP32 port of lv_micropython will have switched to cmake as well I will also update my github repository for the t-watch." some news ? Regards
I have seen that the micropython build system now has the facilities needed to include C or C++ user modules. With this it should be possible to add the lvgl part. Maybe I will give it a try myself even though I am clearly not a cmake expert. For the moment however I have to finish another small project.
Bonjour Uraich , no news about this subject ?
other subject : ftDuino32 will be good tool for twatch-2020 developement !
thanks and Regards
There IS news: The dev-8.0 branch of lv_micropython now uses the cmake build system and it also uses V8 of lvgl. There are plenty of changes with respect to V7 and I am currently about trying to translate the examples from C to Python. Docs are still not online, there are still quite a few bugs and/or inconsistencies etc. So... it is really bleeding edge! A few micropython examples already work but I would say that I am still at the very beginning. I will upload to my (uraich) github repository lv_mpy_examples_v8.
Bonjour Uraich try to build micropython (lvgl) for unix as in your post in 'micropython forum'. but issue :
xxxxx@LIN0141157:~/twatch-2020-micropython/ports/unix$ make V=1 VARIANT=dev python3 ../../py/makeversionhdr.py build-dev/genhdr/mpversion.h python3 ../../tools/makemanifest.py -o build-dev/frozen_content.c -v "MPY_DIR=../.." -v "MPY_LIB_DIR=../../../micropython-lib" -v "PORT_DIR=/home/Charles.Rayer/twatch-2020-micropython/ports/unix" -v "BOARD_DIR=" -b "build-dev" -f"-mcache-lookup-bc" variants/dev/manifest.py Traceback (most recent call last): File "../../tools/makemanifest.py", line 344, in
main()
File "../../tools/makemanifest.py", line 254, in main
include(input_manifest)
File "../../tools/makemanifest.py", line 51, in include
with open(manifest) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/xxxxx/twatch-2020-micropython/ports/unix/variants/dev/manifest.py'
../../py/mkrules.mk:142 : la recette pour la cible « build-dev/frozen_content.c » a échouée
make: *** [build-dev/frozen_content.c] Erreur 1
xxxxx@LIN0141157:~/twatch-2020-micropython/ports/unix$
some tricks for dowload/clone or other ? Thank's for help and Regards
PS : lv_mpy_examples +++