Skip to content

Commit e54335a

Browse files
committed
Merge branch 'develop'
2 parents d29fae5 + 6faa57f commit e54335a

27 files changed

Lines changed: 3631 additions & 126 deletions

.github/actions/pio_test_build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ runs:
5959
shell: bash
6060
run: |
6161
python -m pip install --upgrade pip
62-
pip install --upgrade platformio
62+
pip install --upgrade platformio intelhex
6363
- name: Run PlatformIO
6464
shell: bash
6565
run: |

.github/workflows/Arduino-Lint-Check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
lint:
1919
name: Lint Check
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 12
22+
strategy:
23+
max-parallel: 20
24+
matrix:
25+
include:
26+
- shard: 1
2127
steps:
2228
- uses: actions/checkout@v4
2329
- uses: arduino/arduino-lint-action@v2

.github/workflows/clang-format-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ jobs:
4343
formatting-check:
4444
name: Formatting Check
4545
runs-on: ubuntu-latest
46+
timeout-minutes: 12
4647
strategy:
48+
max-parallel: 20
4749
matrix:
4850
path:
4951
#- check: './' # path to include
@@ -59,11 +61,9 @@ jobs:
5961
steps:
6062
- name: Checkout
6163
uses: actions/checkout@v4
62-
with:
63-
ref: ${{ github.event.pull_request.head.sha }}
6464

6565
- name: Run clang-format style check for C/C++/Protobuf programs.
66-
uses: jidicula/clang-format-action@v4.10.2 # Using include-regex 10.x or later
66+
uses: jidicula/clang-format-action@v4.16.0 # Using include-regex 10.x or later
6767
with:
6868
clang-format-version: '13'
6969
check-path: ${{ matrix.path['check'] }}

.github/workflows/doxygen-gh-pages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ concurrency:
1414
jobs:
1515
deploy:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 12
18+
strategy:
19+
max-parallel: 20
20+
matrix:
21+
include:
22+
- shard: 1
1723
steps:
1824
- name: Make document
1925
uses: m5stack/M5Utility/.github/actions/doxygen@develop

.github/workflows/platformio-build-check.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
branches:
99
- '*'
1010
paths:
11-
- 'src/unit/**.cpp'
12-
- 'src/unit/**.hpp'
13-
- 'src/unit/**.h'
14-
- 'src/unit/**.c'
11+
- 'src/**.cpp'
12+
- 'src/**.hpp'
13+
- 'src/**.h'
14+
- 'src/**.c'
1515
- 'test/**.cpp'
1616
- 'test/**.hpp'
1717
- 'test/**.h'
@@ -20,10 +20,10 @@ on:
2020
- '**/platformio.ini'
2121
pull_request:
2222
paths:
23-
- 'src/unit/**.cpp'
24-
- 'src/unit/**.hpp'
25-
- 'src/unit/**.h'
26-
- 'src/unit/**.c'
23+
- 'src/**.cpp'
24+
- 'src/**.hpp'
25+
- 'src/**.h'
26+
- 'src/**.c'
2727
- 'test/**.cpp'
2828
- 'test/**.hpp'
2929
- 'test/**.h'
@@ -42,10 +42,35 @@ concurrency:
4242

4343

4444
jobs:
45+
native-test:
46+
name: Native:Test
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 12
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v4
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v5
56+
with:
57+
python-version: '3.10'
58+
59+
- name: Install dependencies
60+
run: |
61+
python -m pip install --upgrade pip
62+
pip install --upgrade platformio
63+
sudo apt-get update
64+
sudo apt-get install -y libsdl2-dev
65+
66+
- name: Run native tests
67+
run: |
68+
pio test -e test_native -vv --project-dir ./ --project-conf ./platformio.ini
69+
4570
build:
4671
name: ${{ matrix.board }}:${{ matrix.framework }}:${{ matrix.espressif32 }}
4772
runs-on: ubuntu-latest
48-
timeout-minutes: 5
73+
timeout-minutes: 12
4974

5075
strategy:
5176
fail-fast: false
@@ -59,14 +84,18 @@ jobs:
5984
- Fire
6085
- StampS3
6186
- Dial
62-
- AtomMatrix
87+
- Atom
6388
- AtomS3
6489
- AtomS3R
6590
- NanoC6
91+
- NessoN1
6692
- StickCPlus
6793
- StickCPlus2
94+
- StickS3
95+
- Cardputer
6896
- Paper
6997
- CoreInk
98+
- M5Tab
7099

71100
framework:
72101
- Arduino
@@ -109,8 +138,6 @@ jobs:
109138
steps:
110139
- name: Checkout
111140
uses: actions/checkout@v4
112-
with:
113-
ref: ${{ github.event.pull_request.head.sha }}
114141

115142
- name: Build examples
116143
uses: m5stack/M5Utility/.github/actions/pio_test_build@develop

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"url": "https://github.com/m5stack/M5Utility.git"
1212
},
1313
"dependencies": [],
14-
"version": "0.0.9",
14+
"version": "0.0.10",
1515
"frameworks": [
1616
"arduino"
1717
],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5Utility
2-
version=0.0.9
2+
version=0.0.10
33
author=M5Stack
44
maintainer=M5Stack
55
sentence=Library for other M5 libraries and products

platformio.ini

Lines changed: 107 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@ upload_speed = 1500000
2222
test_speed = 115200
2323
test_filter= embedded/*
2424
test_ignore= native/*
25-
platform = espressif32 @6.8.1
26-
framework = arduino
2725

2826
[Core]
2927
extends = m5base
30-
board = m5stack-grey
31-
;m5stack-core-esp32-16M ;;6.8.0 or later
32-
;m5stack-core-esp32
28+
board = m5stack-core-esp32-16M
3329
lib_deps = ${env.lib_deps}
3430

3531
[Core2]
@@ -59,7 +55,7 @@ board = m5stack-stamps3
5955
lib_deps = ${env.lib_deps}
6056
m5stack/M5Dial
6157

62-
[AtomMatrix]
58+
[Atom]
6359
extends = m5base
6460
board = m5stack-atom
6561
lib_deps = ${env.lib_deps}
@@ -79,10 +75,7 @@ lib_deps = ${env.lib_deps}
7975
[NanoC6]
8076
extends = m5base
8177
board = m5stack-nanoc6
82-
platform = https://github.com/platformio/platform-espressif32.git
83-
platform_packages =
84-
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.7
85-
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
78+
; nanoc6_latest
8679
board_build.partitions = default.csv
8780
lib_deps = ${env.lib_deps}
8881

@@ -97,6 +90,44 @@ extends = m5base
9790
board = m5stick-cplus2
9891
lib_deps = ${env.lib_deps}
9992

93+
[StickS3]
94+
extends = m5base
95+
board = esp32-s3-devkitc-1
96+
board_build.arduino.partitions = default_8MB.csv
97+
board_build.arduino.memory_type = qio_opi
98+
build_flags =
99+
-DESP32S3
100+
-DBOARD_HAS_PSRAM
101+
-mfix-esp32-psram-cache-issue
102+
-DARDUINO_USB_CDC_ON_BOOT=1
103+
-DARDUINO_USB_MODE=1
104+
lib_deps = ${env.lib_deps}
105+
106+
[Cardputer]
107+
extends = m5base
108+
board = esp32-s3-devkitc-1
109+
build_flags =
110+
-DESP32S3
111+
-DARDUINO_USB_CDC_ON_BOOT=1
112+
-DARDUINO_USB_MODE=1
113+
lib_deps = ${env.lib_deps}
114+
115+
[M5Tab]
116+
extends = m5base
117+
board = esp32-p4-evboard
118+
board_build.mcu = esp32p4
119+
board_build.flash_mode = qio
120+
build_flags =
121+
-DBOARD_HAS_PSRAM
122+
-DARDUINO_USB_CDC_ON_BOOT=1
123+
-DARDUINO_USB_MODE=1
124+
lib_deps = ${env.lib_deps}
125+
126+
[NessoN1]
127+
extends = m5base
128+
board = arduino_nesso_n1
129+
lib_deps = ${env.lib_deps}
130+
100131
[Paper]
101132
extends = m5base
102133
board = m5stack-fire
@@ -107,18 +138,42 @@ extends = m5base
107138
board = m5stack-coreink
108139
lib_deps = ${env.lib_deps}
109140

110-
[sdl]
111-
build_flags = -O3 -xc++ -std=c++14 -lSDL2
112-
-arch arm64 ; for arm mac
113-
-I"/usr/local/include/SDL2" ; for intel mac homebrew SDL2
114-
-L"/usr/local/lib" ; for intel mac homebrew SDL2
115-
-I"${sysenv.HOMEBREW_PREFIX}/include/SDL2" ; for arm mac homebrew SDL2
116-
-L"${sysenv.HOMEBREW_PREFIX}/lib" ; for arm mac homebrew SDL2
141+
[sdl_common]
142+
build_flags = -O3 -xc++ -std=c++14 -lSDL2
117143
platform = native
118144
test_filter= native/*
119145
test_ignore= embedded/*
120146
lib_deps = ${env.lib_deps}
121147

148+
[sdl]
149+
extends = sdl_common
150+
151+
[sdl_macos]
152+
extends = sdl_common
153+
build_flags = ${sdl_common.build_flags}
154+
-arch arm64
155+
-I"/usr/local/include/SDL2"
156+
-L"/usr/local/lib"
157+
-I"${sysenv.HOMEBREW_PREFIX}/include/SDL2"
158+
-L"${sysenv.HOMEBREW_PREFIX}/lib"
159+
160+
; --------------------------------
161+
;Choose framework
162+
[arduino_latest]
163+
platform = espressif32 @ 6.12.0
164+
framework = arduino
165+
166+
[nanoc6_latest]
167+
platform = espressif32 @ 6.12.0
168+
platform_packages =
169+
platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.7
170+
platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
171+
framework = arduino
172+
173+
[pioarduino_latest]
174+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.36/platform-espressif32.zip
175+
framework = arduino
176+
122177
; --------------------------------
123178
;Choose build options
124179
[option_release]
@@ -159,58 +214,78 @@ build_flags = ${env.build_flags}
159214
extends = sdl, option_release
160215
build_flags = ${sdl.build_flags} ${option_release.build_flags}
161216

217+
[env:test_native_macos]
218+
extends = sdl_macos, option_release
219+
build_flags = ${sdl_macos.build_flags} ${option_release.build_flags}
220+
162221
[env:test_Core]
163-
extends=Core, option_release
222+
extends=Core, option_release, arduino_latest
164223
build_flags = ${env.build_flags} ${option_release.build_flags}
165224

166225
[env:test_Core2]
167-
extends=Core2, option_release
226+
extends=Core2, option_release, arduino_latest
168227
build_flags = ${env.build_flags} ${option_release.build_flags}
169228

170229
[env:test_CoreS3]
171-
extends=CoreS3, option_release
230+
extends=CoreS3, option_release, arduino_latest
172231
build_flags = ${env.build_flags} ${option_release.build_flags}
173232

174233
[env:test_Fire]
175-
extends=Fire, option_release
234+
extends=Fire, option_release, arduino_latest
176235
build_flags = ${env.build_flags} ${option_release.build_flags}
177236

178237
[env:test_StampS3]
179-
extends=StampS3, option_release
238+
extends=StampS3, option_release, arduino_latest
180239
build_flags = ${env.build_flags} ${option_release.build_flags}
181240

182241
[env:test_Dial]
183-
extends=Dial, option_release
242+
extends=Dial, option_release, arduino_latest
184243
build_flags = ${env.build_flags} ${option_release.build_flags}
185244

186-
[env:test_AtomMatrix]
187-
extends=AtomMatrix, option_release
245+
[env:test_Atom]
246+
extends=Atom, option_release, arduino_latest
188247
build_flags = ${env.build_flags} ${option_release.build_flags}
189248

190249
[env:test_AtomS3]
191-
extends=AtomS3, option_release
250+
extends=AtomS3, option_release, arduino_latest
192251
build_flags = ${env.build_flags} ${option_release.build_flags}
193252

194253
[env:test_AtomS3R]
195-
extends=AtomS3R, option_release
254+
extends=AtomS3R, option_release, arduino_latest
196255
build_flags = ${env.build_flags} ${option_release.build_flags}
197256

198257
[env:test_NanoC6]
199-
extends=NanoC6, option_release
258+
extends=NanoC6, option_release, nanoc6_latest
200259
build_flags = ${env.build_flags} ${option_release.build_flags}
201260

202261
[env:test_StickCPlus]
203-
extends=StickCPlus, option_release
262+
extends=StickCPlus, option_release, arduino_latest
204263
build_flags = ${env.build_flags} ${option_release.build_flags}
205264

206265
[env:test_StickCPlus2]
207-
extends=StickCPlus2, option_release
266+
extends=StickCPlus2, option_release, arduino_latest
267+
build_flags = ${env.build_flags} ${option_release.build_flags}
268+
269+
[env:test_StickS3]
270+
extends=StickS3, option_release, arduino_latest
271+
build_flags = ${env.build_flags} ${option_release.build_flags}
272+
273+
[env:test_Cardputer]
274+
extends=Cardputer, option_release, arduino_latest
275+
build_flags = ${env.build_flags} ${option_release.build_flags}
276+
277+
[env:test_M5Tab]
278+
extends=M5Tab, option_release, pioarduino_latest
279+
build_flags = ${env.build_flags} ${option_release.build_flags}
280+
281+
[env:test_NessoN1]
282+
extends=NessoN1, option_release, pioarduino_latest
208283
build_flags = ${env.build_flags} ${option_release.build_flags}
209284

210285
[env:test_Paper]
211-
extends=Paper, option_release
286+
extends=Paper, option_release, arduino_latest
212287
build_flags = ${env.build_flags} ${option_release.build_flags}
213288

214289
[env:test_CoreInk]
215-
extends=CoreInk, option_release
290+
extends=CoreInk, option_release, arduino_latest
216291
build_flags = ${env.build_flags} ${option_release.build_flags}

0 commit comments

Comments
 (0)