Skip to content

Commit 0bbc1b2

Browse files
committed
boards: m5stack: cores3: Add CoreS3 SE variant
Add `se` variant to support the low-cost CoreS3 SE. - Add configuration files Add `m5stack_cores3_procpu_se(.dts|.yaml|defconfig)` files. Reorganize dts files to split common parts. - Update .yaml file Add gpio, can, counter, entropy, pwm, and pinmux to the supported feature group. Remove the `ignore_tags:` section. - Update documents Add and modify information about CoreS3 SE. Add more description about sysbuild. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent b1def71 commit 0bbc1b2

11 files changed

+293
-81
lines changed

boards/m5stack/m5stack_cores3/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33

44
config HEAP_MEM_POOL_ADD_SIZE_BOARD
55
int
6-
default 4096 if BOARD_M5STACK_CORES3_ESP32S3_PROCPU
6+
default 4096 if BOARD_M5STACK_CORES3_ESP32S3_PROCPU || \
7+
BOARD_M5STACK_CORES3_ESP32S3_PROCPU_SE
78
default 256 if BOARD_M5STACK_CORES3_ESP32S3_APPCPU

boards/m5stack/m5stack_cores3/Kconfig.m5stack_cores3

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55

66
config BOARD_M5STACK_CORES3
77
select SOC_ESP32S3
8-
select SOC_ESP32S3_PROCPU if BOARD_M5STACK_CORES3_ESP32S3_PROCPU
8+
select SOC_ESP32S3_PROCPU if BOARD_M5STACK_CORES3_ESP32S3_PROCPU || \
9+
BOARD_M5STACK_CORES3_ESP32S3_PROCPU_SE
910
select SOC_ESP32S3_APPCPU if BOARD_M5STACK_CORES3_ESP32S3_APPCPU

boards/m5stack/m5stack_cores3/board.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ board:
44
vendor: m5stack
55
socs:
66
- name: esp32s3
7+
variants:
8+
- name: se
9+
cpucluster: procpu
49.3 KB
Loading

boards/m5stack/m5stack_cores3/doc/index.rst

Lines changed: 177 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,27 @@ Overview
44
********
55

66
M5Stack CoreS3 is an ESP32-based development board from M5Stack. It is the third generation of the M5Stack Core series.
7+
M5Stack CoreS3 SE is the compact version of CoreS3. It has the same form factor as the original M5Stack,
8+
and some features were reduced from CoreS3.
79

8-
M5Stack CoreS3 features consist of:
10+
M5Stack CoreS3/CoreS3 SE features consist of:
911

1012
- ESP32-S3 chip (dual-core Xtensa LX7 processor @240MHz, WIFI, OTG and CDC functions)
1113
- PSRAM 8MB
1214
- Flash 16MB
1315
- LCD ISP 2", 320x240 pixel ILI9342C
1416
- Capacitive multi touch FT6336U
15-
- Camera 30W pixel GC0308
1617
- Speaker 1W AW88298
1718
- Dual Microphones ES7210 Audio decoder
1819
- RTC BM8563
1920
- USB-C
2021
- SD-Card slot
21-
- Geomagnetic sensor BMM150
22-
- Proximity sensor LTR-553ALS-WA
23-
- 6-Axis IMU BMI270
2422
- PMIC AXP2101
25-
- Battery 500mAh 3.7 V
23+
- Battery 500mAh 3.7 V (Not available for CoreS3 SE)
24+
- Camera 30W pixel GC0308 (Not available for CoreS3 SE)
25+
- Geomagnetic sensor BMM150 (Not available for CoreS3 SE)
26+
- Proximity sensor LTR-553ALS-WA (Not available for CoreS3 SE)
27+
- 6-Axis IMU BMI270 (Not available for CoreS3 SE)
2628

2729
Start Application Development
2830
*****************************
@@ -48,24 +50,145 @@ below to retrieve those files.
4850
It is recommended running the command above after :file:`west update`.
4951

5052
Building & Flashing
51-
-------------------
53+
*******************
54+
55+
Simple boot
56+
===========
57+
58+
The board could be loaded using the single binary image, without 2nd stage bootloader.
59+
It is the default option when building the application without additional configuration.
60+
61+
.. note::
62+
63+
Simple boot does not provide any security features nor OTA updates.
64+
65+
MCUboot bootloader
66+
==================
67+
68+
User may choose to use MCUboot bootloader instead. In that case the bootloader
69+
must be built (and flashed) at least once.
70+
71+
There are two options to be used when building an application:
72+
73+
1. Sysbuild
74+
2. Manual build
75+
76+
.. note::
77+
78+
User can select the MCUboot bootloader by adding the following line
79+
to the board default configuration file.
80+
81+
.. code:: cfg
82+
83+
CONFIG_BOOTLOADER_MCUBOOT=y
84+
85+
Sysbuild
86+
========
87+
88+
The sysbuild makes possible to build and flash all necessary images needed to
89+
bootstrap the board with the ESP32 SoC.
90+
91+
To build the sample application using sysbuild use the command:
92+
93+
.. tabs::
94+
95+
.. group-tab:: M5Stack CoreS3
96+
97+
.. zephyr-app-commands::
98+
:tool: west
99+
:zephyr-app: samples/hello_world
100+
:board: m5stack_cores3/esp32s3/procpu
101+
:goals: build
102+
:west-args: --sysbuild
103+
:compact:
104+
105+
.. group-tab:: M5Stack CoreS3 SE
106+
107+
.. zephyr-app-commands::
108+
:tool: west
109+
:zephyr-app: samples/hello_world
110+
:board: m5stack_cores3/esp32s3/procpu/se
111+
:goals: build
112+
:west-args: --sysbuild
113+
:compact:
114+
115+
By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
116+
images. But it can be configured to create other kind of images.
117+
118+
Build directory structure created by sysbuild is different from traditional
119+
Zephyr build. Output is structured by the domain subdirectories:
120+
121+
.. code-block::
122+
123+
build/
124+
├── hello_world
125+
│ └── zephyr
126+
│ ├── zephyr.elf
127+
│ └── zephyr.bin
128+
├── mcuboot
129+
│ └── zephyr
130+
│ ├── zephyr.elf
131+
│ └── zephyr.bin
132+
└── domains.yaml
133+
134+
.. note::
135+
136+
With ``--sysbuild`` option the bootloader will be re-build and re-flash
137+
every time the pristine build is used.
138+
139+
For more information about the system build please read the :ref:`sysbuild` documentation.
140+
141+
Manual build
142+
============
143+
144+
During the development cycle, it is intended to build & flash as quickly possible.
145+
For that reason, images can be built one at a time using traditional build.
146+
147+
The instructions following are relevant for both manual build and sysbuild.
148+
The only difference is the structure of the build directory.
149+
150+
.. note::
151+
152+
Remember that bootloader (MCUboot) needs to be flash at least once.
52153

53154
Build and flash applications as usual (see :ref:`build_an_application` and
54155
:ref:`application_run` for more details).
55156

56-
.. zephyr-app-commands::
57-
:zephyr-app: samples/hello_world
58-
:board: m5stack_cores3/esp32s3/procpu
59-
:goals: build
157+
.. tabs::
158+
159+
.. group-tab:: M5Stack CoreS3
160+
161+
.. zephyr-app-commands::
162+
:zephyr-app: samples/hello_world
163+
:board: m5stack_cores3/esp32s3/procpu
164+
:goals: build
165+
166+
.. group-tab:: M5Stack CoreS3 SE
167+
168+
.. zephyr-app-commands::
169+
:zephyr-app: samples/hello_world
170+
:board: m5stack_cores3/esp32s3/procpu/se
171+
:goals: build
60172

61173
The usual ``flash`` target will work with the ``m5stack_cores3/esp32s3/procpu`` board
62174
configuration. Here is an example for the :zephyr:code-sample:`hello_world`
63175
application.
64176

65-
.. zephyr-app-commands::
66-
:zephyr-app: samples/hello_world
67-
:board: m5stack_cores3/esp32s3/procpu
68-
:goals: flash
177+
.. tabs::
178+
179+
.. group-tab:: M5Stack CoreS3
180+
181+
.. zephyr-app-commands::
182+
:zephyr-app: samples/hello_world
183+
:board: m5stack_cores3/esp32s3/procpu
184+
:goals: flash
185+
186+
.. group-tab:: M5Stack CoreS3 SE
187+
188+
.. zephyr-app-commands::
189+
:zephyr-app: samples/hello_world
190+
:board: m5stack_cores3/esp32s3/procpu/se
191+
:goals: flash
69192

70193
The baud rate of 921600bps is set by default. If experiencing issues when flashing,
71194
try using different values by using ``--esp-baud-rate <BAUD>`` option during
@@ -85,22 +208,59 @@ message in the monitor:
85208
*** Booting Zephyr OS build vx.x.x-xxx-gxxxxxxxxxxxx ***
86209
Hello World! m5stack_cores3/esp32s3/procpu
87210
88-
89211
Debugging
90-
---------
212+
*********
91213

92214
ESP32-S3 support on OpenOCD is available at `OpenOCD ESP32`_.
93215

94216
ESP32-S3 has a built-in JTAG circuitry and can be debugged without any additional chip. Only an USB cable connected to the D+/D- pins is necessary.
95217

96218
Further documentation can be obtained from the SoC vendor in `JTAG debugging for ESP32-S3`_.
97219

220+
Here is an example for building the :zephyr:code-sample:`hello_world` application.
221+
222+
.. tabs::
223+
224+
.. group-tab:: M5Stack CoreS3
225+
226+
.. zephyr-app-commands::
227+
:zephyr-app: samples/hello_world
228+
:board: m5stack_cores3/esp32s3/procpu
229+
:goals: debug
230+
231+
.. group-tab:: M5Stack CoreS3 SE
232+
233+
.. zephyr-app-commands::
234+
:zephyr-app: samples/hello_world
235+
:board: m5stack_cores3/esp32s3/procpu/se
236+
:goals: debug
237+
238+
You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` application.
239+
240+
.. tabs::
241+
242+
.. group-tab:: M5Stack CoreS3
243+
244+
.. zephyr-app-commands::
245+
:zephyr-app: samples/hello_world
246+
:board: m5stack_cores3/esp32s3/procpu
247+
:goals: debug
248+
249+
.. group-tab:: M5Stack CoreS3 SE
250+
251+
.. zephyr-app-commands::
252+
:zephyr-app: samples/hello_world
253+
:board: m5stack_cores3/esp32s3/procpu/se
254+
:goals: debug
255+
98256
References
99257
**********
100258

101259
.. target-notes::
102260

103261
.. _`M5Stack CoreS3 Documentation`: http://docs.m5stack.com/en/core/CoreS3
104262
.. _`M5Stack CoreS3 Schematic`: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/K128%20CoreS3/Sch_M5_CoreS3_v1.0.pdf
263+
.. _`M5Stack CoreS3 SE Documentation`: https://docs.m5stack.com/en/core/M5CoreS3%20SE
264+
.. _`M5Stack CoreS3 SE Schematic`: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/core/M5CORES3%20SE/M5_CoreS3SE.pdf
105265
.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases
106266
.. _`JTAG debugging for ESP32-S3`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/
Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,24 @@
11
/*
2-
* Copyright (c) 2024 Zhang Xingtao <[email protected]>
2+
* Copyright (c) 2024 TOKITA Hiroshi
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/dts-v1/;
88

9-
#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi>
10-
#include <espressif/partitions_0x0_amp.dtsi>
11-
#include "m5stack_cores3-pinctrl.dtsi"
9+
#include "m5stack_cores3_procpu_common.dtsi"
1210

1311
/ {
1412
model = "M5Stack CoreS3 PROCPU";
1513
compatible = "m5stack,cores3";
1614

17-
chosen {
18-
zephyr,sram = &sram0;
19-
zephyr,console = &usb_serial;
20-
zephyr,shell-uart = &usb_serial;
21-
zephyr,flash = &flash0;
22-
zephyr,code-partition = &slot0_partition;
23-
zephyr,bt-hci = &esp32_bt_hci;
24-
};
25-
2615
aliases {
27-
i2c-0 = &i2c0;
28-
watchdog0 = &wdt0;
2916
accel0 = &bmi270;
3017
magn0 = &bmm150;
3118
};
3219
};
3320

34-
&usb_serial {
35-
status = "okay";
36-
};
37-
38-
&uart0 {
39-
status = "okay";
40-
current-speed = <115200>;
41-
pinctrl-0 = <&uart0_default>;
42-
pinctrl-names = "default";
43-
};
44-
4521
&i2c0 {
46-
status = "okay";
47-
clock-frequency = <I2C_BITRATE_STANDARD>;
48-
pinctrl-0 = <&i2c0_default>;
49-
pinctrl-names = "default";
50-
5122
bmi270: bmi270@69 {
5223
compatible = "bosch,bmi270";
5324
reg = <0x69>;
@@ -59,24 +30,3 @@
5930
reg = <0x10>;
6031
};
6132
};
62-
63-
&spi2 {
64-
#address-cells = <1>;
65-
#size-cells = <0>;
66-
status = "okay";
67-
pinctrl-0 = <&spim2_default>;
68-
pinctrl-names = "default";
69-
};
70-
71-
&wdt0 {
72-
status = "okay";
73-
};
74-
75-
&psram0 {
76-
reg = <0x3c000000 DT_SIZE_M(8)>;
77-
status = "okay";
78-
};
79-
80-
&esp32_bt_hci {
81-
status = "okay";
82-
};

boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ arch: xtensa
55
toolchain:
66
- zephyr
77
supported:
8-
- dma
8+
- gpio
9+
- uart
910
- i2c
1011
- spi
11-
- uart
12+
- can
13+
- counter
1214
- watchdog
13-
testing:
14-
ignore_tags:
15-
- bluetooth
16-
- gpio
17-
- net
18-
- pinmux
19-
- pwm
20-
- regulator
15+
- entropy
16+
- pwm
17+
- dma
18+
- pinmux
2119
vendor: m5stack

0 commit comments

Comments
 (0)