Skip to content

Commit dabd7fd

Browse files
committed
Fix mistakes, add new make command and update the README.md
1. Correct the Coreink board ID link 2. Add patch and unpatch command to Makefile 3. Update the README.md
1 parent 9c76ee2 commit dabd7fd

File tree

4 files changed

+32
-66
lines changed

4 files changed

+32
-66
lines changed

README.md

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
```shell
88
mkdir uiflow_workspace && cd uiflow_workspace
9-
git clone https://github.com/m5stack/esp-idf.git
10-
git -C esp-idf checkout 8fbf4ba6058bcf736317d8a7aa75d0578563c38b
9+
git clone -b uiflow/v2.0-idf5.0.4 https://github.com/m5stack/esp-idf.git
1110
git -C esp-idf submodule update --init --recursive
1211
./esp-idf/install.sh
1312
. ./esp-idf/export.sh
@@ -18,38 +17,17 @@ git -C esp-idf submodule update --init --recursive
1817
```shell
1918
git clone https://github.com/m5stack/uiflow_micropython
2019
cd uiflow_micropython/m5stack
21-
make submodules # Only need once
20+
make submodules
21+
make patch
2222
make littlefs
2323
make mpy-cross
24-
# Build and flash
25-
# atoms3
26-
make BOARD=M5STACK_AtomS3 pack_all flash
27-
# atoms3-lite
28-
make BOARD=M5STACK_AtomS3_Lite pack_all flash
29-
# atoms3u
30-
make BOARD=M5STACK_AtomS3U pack_all flash
31-
# core(BASIC/M5GO/GRAY) (Falsh 16MB)
32-
make BOARD=M5STACK_Basic pack_all flash
33-
# core(BASIC/M5GO/GRAY) (Falsh 4MB)
34-
make BOARD=M5STACK_Basic_4MB pack_all flash
35-
# capsule
36-
make BOARD=M5STACK_Capsule pack_all flash
37-
# core2,tough
38-
make BOARD=M5STACK_Core2 pack_all flash
39-
# cores3
40-
make BOARD=M5STACK_CoreS3 pack_all flash
41-
# dial
42-
make BOARD=M5STACK_Dial pack_all flash
43-
# fire
44-
make BOARD=M5STACK_Fire pack_all flash
45-
# stamps3
46-
make BOARD=M5STACK_StampS3 pack_all flash
47-
# stickcplus
48-
make BOARD=M5STACK_StickC_PLUS pack_all flash
49-
# stickcplus2
50-
make BOARD=M5STACK_StickC_PLUS2 pack_all flash
24+
make flash_all
5125
```
5226

27+
The default board build the M5STACK_AtomS3 one, You can specify a different board by passing `BOARD=<board>` to the make commands. More BOARD type define is under [m5satck/boards](./m5stack/boards/) path.
28+
29+
More command support, you can check the [Makefile](./m5stack/Makefile).
30+
5331
## Documentation
5432

5533
API documentation for this library can be found on [Read the Docs](https://uiflow-micropython.readthedocs.io/en/latest/).

m5stack/Makefile

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
#
33
# This is a simple, convenience wrapper around idf.py (which uses cmake).
44

5-
# Select the mcu type to build, default is M5STACK_8MB
6-
# M5STACK_xxx -> ESP32
7-
# M5STACK_C3_xxx -> ESP32 C3
8-
# M5STACK_S3_xxx -> ESP32 S3
95
-include .workenv
106

117
BOARD ?= M5STACK_AtomS3
@@ -83,7 +79,6 @@ endif
8379
BUILD ?= build-$(BOARD)
8480

8581
# Device serial settings.
86-
#PORT ?= /dev/ttyS8
8782
PORT ?= /dev/ttyUSB0
8883
BAUD ?= 1500000
8984

@@ -102,6 +97,7 @@ endif
10297

10398
IDFPY_FLAGS += -DMICROPY_BOARD=$(BOARD) -DBUILD_WITH_LVGL=$(LVGL) -B$(BUILD) $(CMAKE_ARGS)
10499
IDFPY_FLAGS += -DBOARD_TYPE=$(BOARD_TYPE)
100+
105101
ifdef FROZEN_MANIFEST
106102
IDFPY_FLAGS += -D MICROPY_FROZEN_MANIFEST=$(FROZEN_MANIFEST)
107103
endif
@@ -138,53 +134,48 @@ all: nvs fs pack
138134

139135
$(BUILD)/bootloader/bootloader.bin $(BUILD)/partition_table/partition-table.bin $(BUILD)/micropython.bin: FORCE
140136

141-
# config the menu
137+
# Config menu
142138
menu:
143139
idf.py $(IDFPY_FLAGS) menuconfig
144140

141+
# Show the size summary
145142
size:
146143
idf.py $(IDFPY_FLAGS) size
147144

148-
# Build the MicroPython firmware.
145+
# Build the MicroPython firmware
149146
build: nvs
150147
idf.py $(IDFPY_FLAGS) build
151148

152-
# Deploy the MicroPython.
149+
# Deploy the MicroPython firmware
153150
deploy: build
154151
idf.py $(IDFPY_FLAGS) -p $(PORT) -b $(BAUD) flash
155152

156-
# Deploy the MicroPython and system filesystem.
153+
# Deploy the MicroPython and system filesystem
157154
flash: pack
158155
esptool.py --chip $(CHIP) --port $(PORT) --baud $(BAUD) write_flash 0x0 $(BUILD)/uiflow-$(GIT_VERSION).bin
159156

160-
# Deploy the MicroPython, system filesystem and user filesystem.
157+
# Deploy the MicroPython, system filesystem and user filesystem
161158
flash_all: pack_all
162159
esptool.py --chip $(CHIP) --port $(PORT) --baud $(BAUD) write_flash 0x0 $(BUILD)/uiflow-$(GIT_VERSION).bin
163160

164-
# Clean the build directory.
161+
# Clean the build directory
165162
clean:
166163
idf.py $(IDFPY_FLAGS) fullclean
167-
# cd ./../micropython && \
168-
# git apply --reverse ./../m5stack/patches/0001_mpconfigport_lvgl_support.patch && cd -
169-
cd ./components/lv_bindings && \
170-
git apply --reverse ./../../patches/0002_avoid_lv_bindings_compile_error.patch && cd -
171-
cd ./components/M5Unified/M5Unified && \
172-
git apply --reverse ./../../../patches/2003-Support-LTR553.patch && cd -
173164

174-
# Erase the flash chip.
165+
# Erase the flash chip
175166
erase:
176167
idf.py $(IDFPY_FLAGS) -p $(PORT) -b $(BAUD) erase_flash
177168

178-
# Run the serial monitor.
169+
# Run the serial monitor
179170
monitor:
180171
idf.py $(IDFPY_FLAGS) -p $(PORT) -b $(BAUD) monitor
181172

182-
# Build the NVS partition firmware.
173+
# Build the NVS partition firmware
183174
# fixed size 0x6000
184175
nvs:
185176
@$(PYTHON) ./../tools/nvs_partition_gen.py generate partition_nvs.csv $(BUILD)/nvs.bin 0x6000
186177

187-
# Build the system and user filesystem firmware.
178+
# Build the system and user filesystem firmware
188179
ifeq ($(TINY_FLAG),1)
189180
fs: build
190181
@if [ ! -d $(BUILD)/base-files ]; then \
@@ -216,8 +207,6 @@ fs: build
216207
$(BUILD)/partition_table/partition-table.bin
217208
endif
218209

219-
220-
221210
# Pack the firmware into a single binary without user filesystem.
222211
# Released firmware needn't user filesystem.
223212
pack: fs
@@ -238,7 +227,6 @@ mpy-cross:
238227
# The two submodules do not belong to the same repository
239228
# micropython submodule belong to uiflow_micropython
240229
# berkeley-db-1.xx submodule belong to micropython submodule
241-
# TODO: need update this :)
242230
submodules:
243231
git submodule update --init ../tools/littlefs/mbed-littlefs
244232
git submodule update --init ./components/esp32-camera
@@ -247,7 +235,17 @@ submodules:
247235
git submodule update --init --recursive ./components/lv_bindings
248236
git submodule update --init ../micropython
249237
cd ./../micropython && git submodule update --init $(addprefix ./,$(GIT_SUBMODULES)) && cd -
238+
239+
# Apply patches
240+
patch:
250241
cd ./components/lv_bindings && \
251242
git apply ./../../patches/0002_avoid_lv_bindings_compile_error.patch && cd -
252243
cd ./components/M5Unified/M5Unified && \
253244
git apply ./../../../patches/2003-Support-LTR553.patch && cd -
245+
246+
# Unapply patches
247+
unpatch:
248+
cd ./components/lv_bindings && \
249+
git apply -R ./../../patches/0002_avoid_lv_bindings_compile_error.patch && cd -
250+
cd ./components/M5Unified/M5Unified && \
251+
git apply -R ./../../../patches/2003-Support-LTR553.patch && cd -

m5stack/boards/M5STACK_CoreInk/mpconfigboard.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# stickc-plus https://github.com/m5stack/m5stack-board-id/blob/558d0c4e4fc55a72805827c65a5255aa4b844515/board.csv#L6
1+
# coreink https://github.com/m5stack/m5stack-board-id/blob/558d0c4e4fc55a72805827c65a5255aa4b844515/board.csv#L8
22
set(BOARD_ID 6)
33

44
set(SDKCONFIG_DEFAULTS
@@ -7,7 +7,7 @@ set(SDKCONFIG_DEFAULTS
77
./boards/sdkconfig.ble
88
./boards/sdkconfig.240mhz
99
./boards/sdkconfig.disable_iram
10-
./boards/M5STACK_StickC_PLUS/sdkconfig.board
10+
./boards/M5STACK_CoreInk/sdkconfig.board
1111
)
1212

1313
# If not enable LVGL, ignore this...

m5stack/modules/startup/manifest_atoms3lite.py.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)