Skip to content

Commit 7ba4bc6

Browse files
sylvioalvesnordicjm
authored andcommitted
boards: xtensa: m5stickc_plus: Convert to v2
Converts the board to hwmv2 Signed-off-by: Sylvio Alves <[email protected]>
1 parent 090e471 commit 7ba4bc6

15 files changed

+135
-22
lines changed

boards/m5stack/m5stickc_plus/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_M5STICKC_PLUS
5+
select SOC_ESP32_PROCPU if BOARD_M5STICKC_PLUS_ESP32_PROCPU
6+
select SOC_ESP32_APPCPU if BOARD_M5STICKC_PLUS_ESP32_APPCPU

boards/boards_legacy/xtensa/m5stickc_plus/Kconfig.defconfig renamed to boards/m5stack/m5stickc_plus/Kconfig.defconfig

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
# Copyright (c) 2022 AVSystem Sławomir Wolf Sp.j. (AVSystem)
44
# SPDX-License-Identifier: Apache-2.0
55

6-
config BOARD
7-
default "m5stickc_plus"
8-
depends on BOARD_M5STICKC_PLUS
9-
10-
config ENTROPY_GENERATOR
11-
default y
6+
if BOARD_M5STICKC_PLUS_ESP32_PROCPU
127

138
config HEAP_MEM_POOL_ADD_SIZE_BOARD
149
int
@@ -20,3 +15,12 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD
2015
choice BT_HCI_BUS_TYPE
2116
default BT_ESP32 if BT
2217
endchoice
18+
19+
endif # BOARD_M5STICKC_PLUS_ESP32_PROCPU
20+
21+
if BOARD_M5STICKC_PLUS_ESP32_APPCPU
22+
23+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
24+
default 256
25+
26+
endif # BOARD_M5STICKC_PLUS_ESP32_APPCPU

boards/boards_legacy/xtensa/m5stickc_plus/Kconfig.board renamed to boards/m5stack/m5stickc_plus/Kconfig.m5stickc_plus

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,4 @@
44
# SPDX-License-Identifier: Apache-2.0
55

66
config BOARD_M5STICKC_PLUS
7-
bool "M5StickC PLUS Development Board"
8-
depends on SOC_SERIES_ESP32
9-
10-
choice SOC_PART_NUMBER
11-
default SOC_ESP32_PICO_D4
12-
endchoice
7+
select SOC_ESP32_PICO_D4
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: m5stickc_plus
3+
vendor: m5stack
4+
socs:
5+
- name: esp32

boards/boards_legacy/xtensa/m5stickc_plus/doc/index.rst renamed to boards/m5stack/m5stickc_plus/doc/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ Zephyr build. Output is structured by the domain subdirectories:
139139
140140
build/
141141
├── hello_world
142-
   └── zephyr
143-
   ├── zephyr.elf
144-
   └── zephyr.bin
142+
└── zephyr
143+
├── zephyr.elf
144+
└── zephyr.bin
145145
├── mcuboot
146146
│ └── zephyr
147147
│ ├── zephyr.elf
@@ -173,7 +173,7 @@ Build and flash applications as usual (see :ref:`build_an_application` and
173173

174174
.. zephyr-app-commands::
175175
:zephyr-app: samples/hello_world
176-
:board: m5stickc_plus
176+
:board: m5stickc_plus/esp32/procpu
177177
:goals: build
178178

179179
The usual ``flash`` target will work with the ``m5stickc_plus`` board
@@ -182,7 +182,7 @@ application.
182182

183183
.. zephyr-app-commands::
184184
:zephyr-app: samples/hello_world
185-
:board: m5stickc_plus
185+
:board: m5stickc_plus/esp32/procpu
186186
:goals: flash
187187

188188
The default baud rate for the M5StickC PLUS is set to 1500000bps. If experiencing issues when flashing,
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/dts-v1/;
7+
8+
#include <espressif/esp32/esp32_appcpu.dtsi>
9+
10+
/ {
11+
model = "M5StickC Plus APPCPU";
12+
compatible = "espressif,esp32";
13+
14+
chosen {
15+
zephyr,sram = &sram0;
16+
zephyr,ipc_shm = &shm0;
17+
zephyr,ipc = &ipm0;
18+
};
19+
};
20+
21+
&cpu0 {
22+
clock-frequency = <ESP32_CLK_CPU_240M>;
23+
};
24+
25+
&cpu1 {
26+
clock-frequency = <ESP32_CLK_CPU_240M>;
27+
};
28+
29+
&ipm0 {
30+
status = "okay";
31+
};
32+
33+
&trng0 {
34+
status = "okay";
35+
};
36+
37+
&flash0 {
38+
status = "okay";
39+
partitions {
40+
compatible = "fixed-partitions";
41+
#address-cells = <1>;
42+
#size-cells = <1>;
43+
44+
/* Reserve 60kB for the bootloader */
45+
boot_partition: partition@1000 {
46+
label = "mcuboot";
47+
reg = <0x00001000 0x0000F000>;
48+
read-only;
49+
};
50+
51+
/* Reserve 1024kB for the application in slot 0 */
52+
slot0_partition: partition@10000 {
53+
label = "image-0";
54+
reg = <0x00010000 0x00100000>;
55+
};
56+
57+
/* Reserve 1024kB for the application in slot 1 */
58+
slot1_partition: partition@110000 {
59+
label = "image-1";
60+
reg = <0x00110000 0x00100000>;
61+
};
62+
63+
/* Reserve 256kB for the scratch partition */
64+
scratch_partition: partition@210000 {
65+
label = "image-scratch";
66+
reg = <0x00210000 0x00040000>;
67+
};
68+
69+
storage_partition: partition@250000 {
70+
label = "storage";
71+
reg = <0x00250000 0x00006000>;
72+
};
73+
};
74+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
identifier: m5stickc_plus/esp32/appcpu
2+
name: M5StickC PLUS
3+
type: mcu
4+
arch: xtensa
5+
toolchain:
6+
- zephyr
7+
supported:
8+
- uart
9+
testing:
10+
ignore_tags:
11+
- net
12+
- bluetooth
13+
- flash
14+
- cpp
15+
- posix
16+
- watchdog
17+
- logging
18+
- kernel
19+
- pm
20+
- gpio
21+
- crypto
22+
- eeprom
23+
- heap
24+
- cmsis_rtos
25+
- jwt
26+
- zdsp
27+
vendor: m5stack

0 commit comments

Comments
 (0)