diff --git a/boards/m5stack/m5stack_cores3/Kconfig b/boards/m5stack/m5stack_cores3/Kconfig index 0fa82611253a5..26f6eed3551af 100644 --- a/boards/m5stack/m5stack_cores3/Kconfig +++ b/boards/m5stack/m5stack_cores3/Kconfig @@ -1,21 +1,7 @@ # Copyright (c) 2024 Zhang Xingtao # SPDX-License-Identifier: Apache-2.0 -if BOARD_M5STACK_CORES3_ESP32S3_PROCPU - config HEAP_MEM_POOL_ADD_SIZE_BOARD int - default $(UINT16_MAX) if WIFI && BT - default 51200 if WIFI - default 40960 if BT - default 4096 - -endif # BOARD_M5STACK_CORES3_ESP32S3_PROCPU - -if BOARD_M5STACK_CORES3_ESP32S3_APPCPU - -config HEAP_MEM_POOL_ADD_SIZE_BOARD - int - default 256 - -endif # BOARD_M5STACK_CORES3_ESP32S3_APPCPU + default 4096 if BOARD_M5STACK_CORES3_ESP32S3_PROCPU + default 256 if BOARD_M5STACK_CORES3_ESP32S3_APPCPU diff --git a/boards/m5stack/m5stack_cores3/Kconfig.sysbuild b/boards/m5stack/m5stack_cores3/Kconfig.sysbuild new file mode 100644 index 0000000000000..3a2d17ac5cfd0 --- /dev/null +++ b/boards/m5stack/m5stack_cores3/Kconfig.sysbuild @@ -0,0 +1,10 @@ +# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. +# SPDX-License-Identifier: Apache-2.0 + +choice BOOTLOADER + default BOOTLOADER_MCUBOOT +endchoice + +choice BOOT_SIGNATURE_TYPE + default BOOT_SIGNATURE_TYPE_NONE +endchoice diff --git a/boards/m5stack/m5stack_cores3/doc/index.rst b/boards/m5stack/m5stack_cores3/doc/index.rst index f1b1290d16c73..4ee0d8461b697 100644 --- a/boards/m5stack/m5stack_cores3/doc/index.rst +++ b/boards/m5stack/m5stack_cores3/doc/index.rst @@ -1,7 +1,4 @@ -.. _m5stack_cores3: - -M5Stack CoreS3 -############## +.. zephyr:board:: m5stack_cores3 Overview ******** @@ -27,13 +24,6 @@ M5Stack CoreS3 features consist of: - PMIC AXP2101 - Battery 500mAh 3.7 V -.. figure:: img/m5stack_cores3.webp - :align: center - :alt: M5Stack-CoreS3 - :width: 400 px - - M5Stack CoreS3 module - Start Application Development ***************************** @@ -99,19 +89,18 @@ message in the monitor: Debugging --------- -ESP32-S3 support on OpenOCD is available upstream as of version 0.12.0. -Download and install OpenOCD from `OpenOCD`_. +ESP32-S3 support on OpenOCD is available at `OpenOCD ESP32`_. 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. Further documentation can be obtained from the SoC vendor in `JTAG debugging for ESP32-S3`_. -.. _`OpenOCD`: https://github.com/openocd-org/openocd -.. _`JTAG debugging for ESP32-S3`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/ - +References +********** -Related Documents -***************** +.. target-notes:: -- `M5Stack CoreS3 official docs `_ -- `M5Stack CoreS3 schematic `_ (PDF) +.. _`M5Stack CoreS3 Documentation`: http://docs.m5stack.com/en/core/CoreS3 +.. _`M5Stack CoreS3 Schematic`: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/K128%20CoreS3/Sch_M5_CoreS3_v1.0.pdf +.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases +.. _`JTAG debugging for ESP32-S3`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/ diff --git a/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.dts b/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.dts index 02b85a6934278..236ffd0a3a85d 100644 --- a/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.dts +++ b/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.dts @@ -6,6 +6,8 @@ /dts-v1/; #include +#include +#include "m5stack_cores3-pinctrl.dtsi" / { model = "M5Stack CoreS3 APPCPU"; @@ -15,6 +17,8 @@ zephyr,sram = &sram0; zephyr,ipc_shm = &shm0; zephyr,ipc = &ipm0; + zephyr,flash = &flash0; + zephyr,code-partition = &slot0_appcpu_partition; }; }; @@ -25,42 +29,3 @@ &trng0 { status = "okay"; }; - -&flash0 { - status = "okay"; - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - /* Reserve 60kB for the bootloader */ - boot_partition: partition@1000 { - label = "mcuboot"; - reg = <0x00001000 0x0000F000>; - read-only; - }; - - /* Reserve 1024kB for the application in slot 0 */ - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x00100000>; - }; - - /* Reserve 1024kB for the application in slot 1 */ - slot1_partition: partition@110000 { - label = "image-1"; - reg = <0x00110000 0x00100000>; - }; - - /* Reserve 256kB for the scratch partition */ - scratch_partition: partition@210000 { - label = "image-scratch"; - reg = <0x00210000 0x00040000>; - }; - - storage_partition: partition@250000 { - label = "storage"; - reg = <0x00250000 0x00006000>; - }; - }; -}; diff --git a/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.yaml b/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.yaml index fcf856b1fa4cb..19e6b770c68f3 100644 --- a/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.yaml +++ b/boards/m5stack/m5stack_cores3/m5stack_cores3_appcpu.yaml @@ -1,7 +1,6 @@ identifier: m5stack_cores3/esp32s3/appcpu name: M5Stack CoreS3 APPCPU type: mcu -twister: false arch: xtensa toolchain: - zephyr diff --git a/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.dts b/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.dts index 9ac36cb8a86f0..2042ca2422a49 100644 --- a/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.dts +++ b/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.dts @@ -6,7 +6,8 @@ /dts-v1/; -#include +#include +#include #include "m5stack_cores3-pinctrl.dtsi" / { @@ -76,43 +77,6 @@ status = "okay"; }; -&flash0 { - status = "okay"; - reg = <0x0 DT_SIZE_M(16)>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 0x0000F000>; - read-only; - }; - - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x00100000>; - }; - - slot1_partition: partition@110000 { - label = "image-1"; - reg = <0x00110000 0x00100000>; - }; - - scratch_partition: partition@210000 { - label = "image-scratch"; - reg = <0x00210000 0x00040000>; - }; - - storage_partition: partition@250000 { - label = "storage"; - reg = <0x00250000 0x00006000>; - }; - }; -}; - &esp32_bt_hci { status = "okay"; }; diff --git a/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml b/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml index 15da2ed086727..e0e1f9c32cb7d 100644 --- a/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml +++ b/boards/m5stack/m5stack_cores3/m5stack_cores3_procpu.yaml @@ -1,7 +1,6 @@ identifier: m5stack_cores3/esp32s3/procpu name: M5Stack CoreS3 PROCPU type: mcu -twister: false arch: xtensa toolchain: - zephyr