Skip to content

Commit 6afa2ff

Browse files
committed
Merge branch 'develop' of https://github.com/m5stack/uiflow-micropython into develop
2 parents df8b2ef + 9b5fd25 commit 6afa2ff

File tree

239 files changed

+8167
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+8167
-79
lines changed

.github/workflows/nightly-build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Nightly Build
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * *
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- uses: actions/[email protected]
16+
- name: Install packages
17+
run: source tools/ci.sh && ci_esp32_idf44_setup
18+
- name: Build
19+
run: source tools/ci.sh && ci_esp32_nightly_build
20+
- name: Deliver AtomS3 firmware
21+
uses: actions/upload-artifact@v3
22+
with:
23+
name: M5STACK_AtomS3_firmware
24+
path: ./m5stack/build-M5STACK_AtomS3/uiflow-*.bin
25+
- name: Deliver AtomS3-Lite firmware
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: M5STACK_AtomS3-Lite_firmware
29+
path: ./m5stack/build-M5STACK_AtomS3_Lite/uiflow-*.bin
30+
- name: Deliver StampS3 firmware
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: M5STACK_StampS3_firmware
34+
path: ./m5stack/build-M5STACK_StampS3/uiflow-*.bin
35+
- name: Deliver CoreS3 firmware
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: M5STACK_CoreS3_firmware
39+
path: ./m5stack/build-M5STACK_CoreS3/uiflow-*.bin
40+
- name: Deliver AtomS3U firmware
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: M5STACK_AtomS3U_firmware
44+
path: ./m5stack/build-M5STACK_AtomS3U/uiflow-*.bin
45+
- name: Deliver Core2 firmware
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: M5STACK_Core2_firmware
49+
path: ./m5stack/build-M5STACK_Core2/uiflow-*.bin
50+
- name: Deliver StickC_PLUS2 firmware
51+
uses: actions/upload-artifact@v3
52+
with:
53+
name: M5STACK_StickC_PLUS2_firmware
54+
path: ./m5stack/build-M5STACK_StickC_PLUS2/uiflow-*.bin
55+
- name: Deliver StickC_PLUS firmware
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: M5STACK_StickC_PLUS_firmware
59+
path: ./m5stack/build-M5STACK_StickC_PLUS/uiflow-*.bin
60+
- name: Deliver Fire firmware
61+
uses: actions/upload-artifact@v3
62+
with:
63+
name: M5STACK_Fire_firmware
64+
path: ./m5stack/build-M5STACK_Fire/uiflow-*.bin
65+
- name: Deliver Basic firmware
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: M5STACK_Basic_firmware
69+
path: ./m5stack/build-M5STACK_Basic/uiflow-*.bin
70+
- name: Deliver Basic(4MB Flash) firmware
71+
uses: actions/upload-artifact@v3
72+
with:
73+
name: M5STACK_Basic_4MB_Flash_firmware
74+
path: ./m5stack/build-M5STACK_Basic_4MB/uiflow-*.bin
75+
- name: Deliver Capsule firmware
76+
uses: actions/upload-artifact@v3
77+
with:
78+
name: M5STACK_Capsule_firmware
79+
path: ./m5stack/build-M5STACK_Capsule/uiflow-*.bin

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 M5Stack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# uiflow_micropython
22

33
## How to build
4+
45
### Setting up ESP-IDF and the build environment
6+
57
```shell
68
mkdir uiflow_workspace && cd uiflow_workspace
79
git clone https://github.com/m5stack/esp-idf.git
@@ -12,11 +14,61 @@ git -C esp-idf submodule update --init --recursive
1214
```
1315

1416
### Building the firmware
17+
1518
```shell
1619
git clone https://github.com/m5stack/uiflow_micropython
1720
cd uiflow_micropython/m5stack
1821
make submodules # Only need once
1922
make littlefs
2023
make mpy-cross
24+
# atoms3, atoms3-lite
2125
make BOARD=M5STACK_S3_8MB BOARD_TYPE=atoms3 flash # Build and flash to atoms3 baord
26+
# stamps3
27+
make BOARD=M5STACK_S3_8MB BOARD_TYPE=stamps3 flash
28+
# cores3
29+
make BOARD=M5STACK_S3_SPIRAM_16MB BOARD_TYPE=cores3 flash
30+
# atoms3u
31+
make BOARD=M5STACK_S3_8MB BOARD_TYPE=atoms3u flash
32+
# core2,tough
33+
make BOARD=M5STACK_SPIRAM_16MB BOARD_TYPE=core2 flash
34+
# stickcplus2
35+
make BOARD=M5STACK_SPIRAM_8MB BOARD_TYPE=stickcplus2 flash
36+
# stickcplus
37+
make BOARD=M5STACK_4MB BOARD_TYPE=stickcplus flash
2238
```
39+
40+
## License
41+
42+
- [micropython][] Copyright (c) 2013-2023 Damien P. George and licensed under MIT License.
43+
- [umqtt][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
44+
- [urequests][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
45+
- [ir][] Copyright (c) 2020 Peter Hinch and licensed under MIT License.
46+
- [neopixel][] Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
47+
- [bh1750fvi][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
48+
- [bmp280][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
49+
- [checksum][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
50+
- [dht12][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
51+
- [pcf8563][] Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
52+
- [qmp6988][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
53+
- [scd40][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
54+
- [sgp30][] Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
55+
- [sht4x][] Copyright (c) 2021 ladyada for Adafruit and licensed under MIT License.
56+
- [vl53l0x][] Copyright (c) 2017 Tony DiCola for Adafruit Industries and licensed under MIT License.
57+
- [camera][] Copyright (c) 2021 Mauro Riva and licensed under Apache License Version 2.0.
58+
59+
[micropython]: https://github.com/micropython/micropython
60+
[umqtt]: https://github.com/micropython/micropython-lib
61+
[urequests]: https://github.com/micropython/micropython-lib
62+
[ir]: https://github.com/peterhinch/micropython_ir
63+
[neopixel]: https://github.com/micropython/micropython-lib
64+
[bh1750fvi]: https://github.com/gandro/micropython-m5stamp-c3u
65+
[bmp280]: https://github.com/gandro/micropython-m5stickc-plus
66+
[checksum]: https://github.com/gandro/micropython-m5stamp-c3u
67+
[dht12]: https://github.com/gandro/micropython-m5stickc-plus
68+
[pcf8563]: https://github.com/gandro/micropython-m5stickc-plus
69+
[qmp6988]: https://github.com/gandro/micropython-m5stamp-c3u
70+
[scd40]: https://github.com/gandro/micropython-m5stamp-c3u
71+
[sgp30]: https://github.com/gandro/micropython-m5stamp-c3u
72+
[sht4x]: https://github.com/adafruit/Adafruit_CircuitPython_SHT4x
73+
[vl53l0x]: https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X
74+
[camera]: https://github.com/lemariva/micropython-camera-driver

docs/zh_CN/COPYRIGHT.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ Third Party
1515

1616
* `micropython`_ Copyright (c) 2013-2023 Damien P. George and licensed under MIT License.
1717
* `umqtt`_ Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
18+
* `urequests`_ Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
19+
* `ir`_ Copyright (c) 2020 Peter Hinch and licensed under MIT License.
20+
* `neopixel`_ Copyright (c) 2013-2014 micropython-lib contributors and licensed under MIT License.
21+
* `bh1750fvi`_ Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
22+
* `bmp280`_ Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
23+
* `checksum`_ Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
24+
* `dht12`_ Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
25+
* `pcf8563`_ Copyright (c) 2020 Sebastian Wicki and licensed under MIT License.
26+
* `qmp6988`_ Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
27+
* `scd40`_ Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
28+
* `sgp30`_ Copyright (c) 2022 Sebastian Wicki and licensed under MIT License.
29+
* `sht4x`_ Copyright (c) 2021 ladyada for Adafruit and licensed under MIT License.
1830

1931
Documentation
2032
==============

docs/zh_CN/refs/COPYRIGHT.ref

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
.. _micropython: https://github.com/micropython/micropython
2-
.. _umqtt: https://github.com/micropython/micropython-lib
2+
.. _umqtt: https://github.com/micropython/micropython-lib
3+
.. _urequests: https://github.com/micropython/micropython-lib
4+
.. _ir: https://github.com/peterhinch/micropython_ir
5+
.. _neopixel: https://github.com/micropython/micropython-lib
6+
.. _bh1750fvi: https://github.com/gandro/micropython-m5stamp-c3u
7+
.. _bmp280: https://github.com/gandro/micropython-m5stickc-plus
8+
.. _checksum: https://github.com/gandro/micropython-m5stamp-c3u
9+
.. _dht12: https://github.com/gandro/micropython-m5stickc-plus
10+
.. _pcf8563: https://github.com/gandro/micropython-m5stickc-plus
11+
.. _qmp6988: https://github.com/gandro/micropython-m5stamp-c3u
12+
.. _scd40: https://github.com/gandro/micropython-m5stamp-c3u
13+
.. _sgp30: https://github.com/gandro/micropython-m5stamp-c3u
14+
.. _sht4x: https://github.com/adafruit/Adafruit_CircuitPython_SHT4x

m5stack/Makefile

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,56 @@
99

1010
BOARD ?= M5STACK_8MB
1111

12+
boards := \
13+
M5STACK_AtomS3:atoms3 \
14+
M5STACK_AtomS3_Lite:atoms3-lite \
15+
M5STACK_StampS3:stamps3 \
16+
M5STACK_CoreS3:cores3 \
17+
M5STACK_AtomS3U:atoms3u \
18+
M5STACK_Core2:core2 \
19+
M5STACK_StickC_PLUS2:stickcplus2 \
20+
M5STACK_StickC_PLUS:stickcplus \
21+
M5STACK_Fire:fire \
22+
M5STACK_Basic:basic \
23+
M5STACK_Basic_4MB:basic \
24+
M5STACK_Capsule:capsule
25+
26+
define find_board
27+
$(if $(filter $(1):%,$(boards)),$(word 2,$(subst :, ,$(filter $(1):%,$(boards)))),none)
28+
endef
1229

1330
# Board type list
14-
BOARD_TYPE_DEF := none atoms3 stamps3 cores3 atoms3u core2 stickcplus2 stickcplus
31+
BOARD_TYPE_DEF := \
32+
none \
33+
atoms3 \
34+
atoms3-lite \
35+
stamps3 \
36+
cores3 \
37+
atoms3u \
38+
core2 \
39+
stickcplus2 \
40+
stickcplus \
41+
fire \
42+
basic \
43+
capsule
1544

1645
# Select the board type to build, default is None
1746
# This value affects which folder in the "./fs/system/" directory is pack into "fs-system.bin"
1847
# If use default value, it means no directory will pack into "fs-system.bin"
19-
BOARD_TYPE ?= none
48+
BOARD_TYPE ?= $(call find_board,$(BOARD))
2049

2150
ifneq ($(filter $(BOARD_TYPE),$(BOARD_TYPE_DEF)),)
2251
else
2352
$(error Board type $(BOARD_TYPE) does not exist in list [$(BOARD_TYPE_DEF)])
2453
endif
2554

55+
TINY_BOARD_TYPE_DEF = M5STACK_StickC_PLUS M5STACK_Basic_4MB
56+
ifneq ($(filter $(BOARD),$(TINY_BOARD_TYPE_DEF)),)
57+
TINY_FLAG ?= 1
58+
else
59+
TINY_FLAG ?= 0
60+
endif
61+
2662
# esp32c3's bootloader is different with esp32
2763
ifeq (C3, $(findstring C3,${BOARD}))
2864
CHIP ?= esp32c3
@@ -131,7 +167,7 @@ nvs:
131167
@$(PYTHON) ./../tools/nvs_partition_gen.py generate partition_nvs.csv $(BUILD)/nvs.bin 0x6000
132168

133169
# Build the system and user filesystem firmware.
134-
ifeq ($(BOARD_TYPE),stickcplus)
170+
ifeq ($(TINY_FLAG),1)
135171
fs: build
136172
@if [ ! -d $(BUILD)/base-files ]; then \
137173
mkdir -p $(BUILD)/base-files; \
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"deploy": [
3+
"../deploy_s3.md"
4+
],
5+
"docs": "",
6+
"features": [
7+
"BLE",
8+
"WiFi"
9+
],
10+
"images": [
11+
"generic_s3.jpg"
12+
],
13+
"mcu": "esp32s3",
14+
"product": "M5Stack S3 Serials",
15+
"thumbnail": "",
16+
"url": "https://www.espressif.com/en/products/modules",
17+
"vendor": "M5Stack"
18+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include("$(MPY_DIR)/../m5stack/modules/startup/manifest_atoms3.py")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
set(IDF_TARGET esp32s3)
2+
3+
set(SDKCONFIG_DEFAULTS
4+
./boards/M5STACK_S3_8MB/sdkconfig.board
5+
./boards/sdkconfig.base
6+
./boards/sdkconfig.240mhz
7+
./boards/sdkconfig.disable_iram
8+
./boards/sdkconfig.ble
9+
./boards/sdkconfig.usb
10+
./boards/sdkconfig.flash_8mb
11+
)
12+
13+
# If not enable LVGL, ignore this...
14+
set(LV_CFLAGS -DLV_COLOR_DEPTH=16 -DLV_COLOR_16_SWAP=0)
15+
16+
if(NOT MICROPY_FROZEN_MANIFEST)
17+
set(MICROPY_FROZEN_MANIFEST ${CMAKE_SOURCE_DIR}/boards/manifest.py)
18+
endif()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#define MICROPY_HW_BOARD_NAME "M5STACK"
2+
#define MICROPY_HW_MCU_NAME "ESP32S3"
3+
4+
#define MICROPY_PY_MACHINE_DAC (0)
5+
6+
// Enable UART REPL for modules that have an external USB-UART and don't use native USB.
7+
#define MICROPY_HW_ENABLE_UART_REPL (1)
8+
9+
#define MICROPY_HW_I2C0_SCL (9)
10+
#define MICROPY_HW_I2C0_SDA (8)
11+
12+
// If not enable LVGL, ignore this...
13+
#include "./../mpconfiglvgl.h"

0 commit comments

Comments
 (0)