You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-LVGL.md
+57-18Lines changed: 57 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,58 +19,87 @@ Original micropython README: https://github.com/micropython/micropython/blob/mas
19
19
## Relationship between `lv_micropython` and `lv_binding_micropython`
20
20
21
21
Originally, `lv_micropython` was created as an example of how to use [lv_binding_micropython](https://github.com/lvgl/lv_binding_micropython) on a Micropython fork.
22
-
As such, we try to keep changes here as minimal as possible and we try to keep it in sync with Micropython upstream releases. We also try to add changes to `lv_binding_micropython` instead of to `lv_micropython`, when possible. (for example we keep all drivers in `lv_binding_micropython`, the ESP32 CMake functionality etc.)
22
+
23
+
As such, we try to keep changes here as minimal as possible and we try to keep it in sync with Micropython upstream releases. We also try to add changes to `lv_binding_micropython` instead of to `lv_micropython`, when possible. (for example we keep all drivers in `lv_binding_micropython`, etc.)
23
24
24
25
Eventually it turned out that many people prefer using `lv_micropython` directly and only a few use it as a reference to support LVGL on their own Micropython fork.
26
+
25
27
If you are only starting with Micropython+LVGL, it's recommended that you use `lv_micropython`, while porting a Micropython fork to LVGL is for advanced users.
26
28
29
+
Actual `lv_micropython` repo is using [LVGL binding](https://github.com/lvgl/lv_binding_micropython) as MicroPython C module.
30
+
31
+
More details: https://docs.micropython.org/en/latest/develop/cmodules.html
32
+
27
33
## Build Instructions
28
34
29
-
First step is always to clone lv_micropython and update its submodules recursively:
35
+
First step is always to clone `lv_micropython` and update its submodules recursively:
Some basic build and deploy scripts are added to `scripts` folder, to easily build and deploy firmware to your device (or use unix port).
42
46
43
-
Port specific steps usually include updating the port's submodules with `make submodules` and running make for the port itself.
47
+
You can of course build firmwares manually with `make` commands, if build script is missing for the port or you want to override some build parameters.
(you can configure ESP-IDF path in [scripts/env-variables-esp32.sh](./scripts/env-variables-esp32.sh) file)
92
+
93
+
Build and deploy with scripts:
94
+
95
+
```
96
+
cd scripts
97
+
./build-esp32.sh
98
+
./deploy-esp32.sh
99
+
```
100
+
101
+
Manual build:
102
+
74
103
Please run `esp-idf/export.sh` from your ESP-IDF installation directory as explained in the [Micropython ESP32 Getting Started documentation](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/#get-started-export)
75
104
ESP-IDF version needs to match Micropython expected esp-idf, otherwise a warning will be displayed (and build will probably fail)
76
105
For more details refer to [Setting up the toolchain and ESP-IDF](https://github.com/lvgl/lv_micropython/blob/master/ports/esp32/README.md#setting-up-the-toolchain-and-esp-idf)
@@ -80,7 +109,7 @@ Here is the command to build ESP32 + LVGL which is compatible with ILI9341 drive
80
109
81
110
```
82
111
make -C mpy-cross
83
-
make -C ports/esp32 LV_CFLAGS="-DLV_COLOR_DEPTH=16" BOARD=GENERIC_SPIRAM deploy
112
+
make -C ports/esp32 LV_CFLAGS="-DLV_COLOR_DEPTH=16" BOARD=ESP32_GENERIC VARIANT=SPIRAM deploy
84
113
```
85
114
86
115
Explanation about the parameters:
@@ -101,10 +130,10 @@ This port uses [Micropython infrastructure for C modules](https://docs.micropyth
0 commit comments