Skip to content

Commit e31143e

Browse files
committed
boards: m5stack_cores3: fix board configuration
This board has a few issues handled by this PR: - Fix DTS entries to meet necessary flash partitions - Fix wrong kconfig entries realted to SoC model Signed-off-by: Sylvio Alves <[email protected]>
1 parent f537cf3 commit e31143e

File tree

4 files changed

+18
-93
lines changed

4 files changed

+18
-93
lines changed
Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
# Copyright (c) 2024 Zhang Xingtao <[email protected]>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if BOARD_M5STACK_CORES3_ESP32S3_PROCPU
5-
64
config HEAP_MEM_POOL_ADD_SIZE_BOARD
75
int
8-
default $(UINT16_MAX) if WIFI && BT
9-
default 51200 if WIFI
10-
default 40960 if BT
11-
default 4096
12-
13-
endif # BOARD_M5STACK_CORES3_ESP32S3_PROCPU
14-
15-
if BOARD_M5STACK_CORES3_ESP32S3_APPCPU
16-
17-
config HEAP_MEM_POOL_ADD_SIZE_BOARD
18-
int
19-
default 256
20-
21-
endif # BOARD_M5STACK_CORES3_ESP32S3_APPCPU
6+
default 4096 if BOARD_M5STACK_CORES3_ESP32S3_PROCPU
7+
default 256 if BOARD_M5STACK_CORES3_ESP32S3_APPCPU
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
choice BOOTLOADER
5+
default BOOTLOADER_MCUBOOT
6+
endchoice
7+
8+
choice BOOT_SIGNATURE_TYPE
9+
default BOOT_SIGNATURE_TYPE_NONE
10+
endchoice

boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.dts

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/dts-v1/;
77

88
#include <espressif/esp32s3/esp32s3_appcpu.dtsi>
9+
#include <espressif/partitions_0x0_amp.dtsi>
10+
#include "m5stack_cores3-pinctrl.dtsi"
911

1012
/ {
1113
model = "M5Stack CoreS3 APPCPU";
@@ -15,6 +17,8 @@
1517
zephyr,sram = &sram0;
1618
zephyr,ipc_shm = &shm0;
1719
zephyr,ipc = &ipm0;
20+
zephyr,flash = &flash0;
21+
zephyr,code-partition = &slot0_appcpu_partition;
1822
};
1923
};
2024

@@ -25,42 +29,3 @@
2529
&trng0 {
2630
status = "okay";
2731
};
28-
29-
&flash0 {
30-
status = "okay";
31-
partitions {
32-
compatible = "fixed-partitions";
33-
#address-cells = <1>;
34-
#size-cells = <1>;
35-
36-
/* Reserve 60kB for the bootloader */
37-
boot_partition: partition@1000 {
38-
label = "mcuboot";
39-
reg = <0x00001000 0x0000F000>;
40-
read-only;
41-
};
42-
43-
/* Reserve 1024kB for the application in slot 0 */
44-
slot0_partition: partition@10000 {
45-
label = "image-0";
46-
reg = <0x00010000 0x00100000>;
47-
};
48-
49-
/* Reserve 1024kB for the application in slot 1 */
50-
slot1_partition: partition@110000 {
51-
label = "image-1";
52-
reg = <0x00110000 0x00100000>;
53-
};
54-
55-
/* Reserve 256kB for the scratch partition */
56-
scratch_partition: partition@210000 {
57-
label = "image-scratch";
58-
reg = <0x00210000 0x00040000>;
59-
};
60-
61-
storage_partition: partition@250000 {
62-
label = "storage";
63-
reg = <0x00250000 0x00006000>;
64-
};
65-
};
66-
};

boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.dts

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
/dts-v1/;
88

9-
#include <espressif/esp32s3/esp32s3.dtsi>
9+
#include <espressif/esp32s3/esp32s3_wroom_n16r8.dtsi>
10+
#include <espressif/partitions_0x0_amp.dtsi>
1011
#include "m5stack_cores3-pinctrl.dtsi"
1112

1213
/ {
@@ -76,43 +77,6 @@
7677
status = "okay";
7778
};
7879

79-
&flash0 {
80-
status = "okay";
81-
reg = <0x0 DT_SIZE_M(16)>;
82-
83-
partitions {
84-
compatible = "fixed-partitions";
85-
#address-cells = <1>;
86-
#size-cells = <1>;
87-
88-
boot_partition: partition@0 {
89-
label = "mcuboot";
90-
reg = <0x00000000 0x0000F000>;
91-
read-only;
92-
};
93-
94-
slot0_partition: partition@10000 {
95-
label = "image-0";
96-
reg = <0x00010000 0x00100000>;
97-
};
98-
99-
slot1_partition: partition@110000 {
100-
label = "image-1";
101-
reg = <0x00110000 0x00100000>;
102-
};
103-
104-
scratch_partition: partition@210000 {
105-
label = "image-scratch";
106-
reg = <0x00210000 0x00040000>;
107-
};
108-
109-
storage_partition: partition@250000 {
110-
label = "storage";
111-
reg = <0x00250000 0x00006000>;
112-
};
113-
};
114-
};
115-
11680
&esp32_bt_hci {
11781
status = "okay";
11882
};

0 commit comments

Comments
 (0)