Skip to content

Commit 9ea54bd

Browse files
committed
Add NanoH2 board json and test envs
1 parent 0ed20b9 commit 9ea54bd

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

boards/m5stack-nanoh2.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"build": {
3+
"core": "esp32",
4+
"extra_flags": [
5+
"-DARDUINO_M5STACK_NANO_H2"
6+
],
7+
"f_cpu": "96000000L",
8+
"f_flash": "16000000L",
9+
"flash_mode": "qio",
10+
"mcu": "esp32h2",
11+
"variant": "esp32h2"
12+
},
13+
"connectivity": [
14+
"bluetooth",
15+
"zigbee"
16+
],
17+
"debug": {
18+
"openocd_target": "esp32h2.cfg"
19+
},
20+
"frameworks": [
21+
"arduino",
22+
"espidf"
23+
],
24+
"name": "M5Stack NanoH2",
25+
"upload": {
26+
"flash_size": "4MB",
27+
"maximum_ram_size": 327680,
28+
"maximum_size": 4194304,
29+
"require_upload_port": true,
30+
"speed": 460800
31+
},
32+
"url": "https://docs.m5stack.com/en/core/NanoH2",
33+
"vendor": "M5Stack"
34+
}

platformio.ini

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ test_framework = googletest
99
test_build_src = true
1010
lib_ldf_mode = deep
1111
lib_deps=m5stack/M5Unified
12+
m5stack/M5Utility
13+
m5stack/M5HAL
1214

1315
; --------------------------------
1416
; Board definitions
@@ -81,6 +83,15 @@ build_flags =
8183
-DARDUINO_USB_MODE=1
8284
lib_deps = ${env.lib_deps}
8385

86+
; Using ./boards/m5stack-nanoh2.json
87+
[NanoH2]
88+
extends = m5base
89+
board = m5stack-nanoh2
90+
build_flags =
91+
-DARDUINO_USB_CDC_ON_BOOT=1
92+
-DARDUINO_USB_MODE=1
93+
lib_deps = ${env.lib_deps}
94+
8495
[StickCPlus]
8596
extends = m5base
8697
board = m5stick-c
@@ -253,6 +264,13 @@ build_flags = ${NanoC6.build_flags}
253264
lib_ignore = ${test_base.lib_ignore}
254265
bsec2
255266

267+
[env:test_NanoH2]
268+
extends=NanoH2, option_release, test_base, pioarduino_latest
269+
build_flags = ${NanoH2.build_flags}
270+
${option_release.build_flags}
271+
lib_ignore = ${test_base.lib_ignore}
272+
bsec2
273+
256274
[env:test_StickCPlus]
257275
extends=StickCPlus, option_release, test_base, arduino_latest
258276

@@ -333,6 +351,11 @@ extends=NanoC6, readme_base, pioarduino_latest
333351
build_flags = ${NanoC6.build_flags}
334352
${option_release.build_flags}
335353

354+
[env:test_readme_NanoH2]
355+
extends=NanoH2, readme_base, pioarduino_latest
356+
build_flags = ${NanoH2.build_flags}
357+
${option_release.build_flags}
358+
336359
[env:test_readme_StickCPlus]
337360
extends=StickCPlus, readme_base, arduino_latest
338361

0 commit comments

Comments
 (0)