Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/guides/build-circuitpython-firmware-with-lvgl.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,21 @@ them. For a worked example with a partition table, see
`USER_C_MODULES`:

```bash
./build_mp.py --interpreter circuitpython --port unix \
--modules /path/to/omnipython-lvgl/ports/circuitpython,pygraphics
./build_mp.py --interpreter circuitpython --port unix --modules lvgl,pygraphics
```

`--modules` takes a short name for each module that lives in
micropython-pydevices and a full path for one that doesn't, such as this
port. The binary lands in `builds/circuitpython/unix/coverage/`.
`lvgl` is this port: `build_mp.py` fetches omnipython-lvgl at the commit its
`modules.lock` pins, or uses an `omnipython-lvgl` checkout beside it. To build
another checkout, name its port by path instead
(`--modules /path/to/omnipython-lvgl/ports/circuitpython,pygraphics`). The
binary lands in `builds/circuitpython/unix/coverage/`.

For a board, name CircuitPython's port and board, and put `CIRCUITPY_GIFIO=0`
at the end:

```bash
./build_mp.py --interpreter circuitpython --port espressif \
--board <board> --modules /path/to/omnipython-lvgl/ports/circuitpython CIRCUITPY_GIFIO=0
--board <board> --modules lvgl CIRCUITPY_GIFIO=0
```

## Check the build
Expand Down
9 changes: 9 additions & 0 deletions docs/guides/build-micropython-firmware-with-lvgl.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ several such files builds them all.
`build_mp.py` does that for you: name the modules and it builds them on a
port, with upstream's own boards.

```bash
./build_mp.py --port unix --modules lvgl,pygraphics
```

`lvgl` is this port: `build_mp.py` fetches omnipython-lvgl at the commit its
`modules.lock` pins, or uses an `omnipython-lvgl` checkout beside it. To build
another checkout, name its port by path instead
(`--modules /path/to/omnipython-lvgl/ports/micropython,pygraphics`).

Add `jpegio` when you want JPEG images:
[Show JPEG images](show-jpeg-images.md) says why.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/show-jpeg-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Name jpegio when you build with
[micropython-pydevices](https://github.com/PyDevices/micropython-pydevices):

```bash
./build_mp.py --port unix --variant pydevices --modules jpegio,lvgl-micropython
./build_mp.py --port unix --variant pydevices --modules jpegio,lvgl
```

On a build that has both, `jpegio.register_lvgl_decoder()` and
Expand Down
7 changes: 5 additions & 2 deletions ports/micropython/micropython.mk
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ USERMOD_DIRS += $(BINDINGS_DIR)
# py.mk sorts the module directories and strips the first that matches, so
# the root (a prefix of this directory) names every object here, this
# module's own src/ included. A MicroPython that strips only this directory
# names src/ by it, hence the second spelling.
LVMP_OBJ = $(BUILD)/$(patsubst $(BINDINGS_DIR)/%,$(notdir $(BINDINGS_DIR))/%,$(1)) $(BUILD)/$(patsubst $(LVMP_DIR)/%,$(notdir $(LVMP_DIR))/%,$(1)) $(if $(findstring :,$(1)),,$(BUILD)/$(1))
# names src/ by it, hence the second spelling. A spelling a pattern didn't
# match is still the absolute path, so every spelling whose part under
# $(BUILD) holds a colon is dropped, not only the third. $(BUILD) itself may
# hold a drive colon (an absolute build directory on Windows); that is fine.
LVMP_OBJ = $(addprefix $(BUILD)/,$(foreach o,$(patsubst $(BINDINGS_DIR)/%,$(notdir $(BINDINGS_DIR))/%,$(1)) $(patsubst $(LVMP_DIR)/%,$(notdir $(LVMP_DIR))/%,$(1)) $(1),$(if $(findstring :,$(o)),,$(o))))
$(foreach s,$(SOURCES),\
$(eval $(call LVMP_OBJ,$(s:.c=.o)): CFLAGS += $(LVMP_FLOAT_CFLAGS)))
$(eval $(call LVMP_OBJ,$(LVMP_C:.c=.o)): CFLAGS += $(LVMP_FLOAT_CFLAGS))
Expand Down
Loading