Skip to content

Commit 7d54852

Browse files
committed
boards: esp32s3_devkitm: initial soc board support
Adds support to ESP32-S3 devkitm as initial SoC board. Signed-off-by: Sylvio Alves <[email protected]>
1 parent 066eab1 commit 7d54852

File tree

10 files changed

+352
-1
lines changed

10 files changed

+352
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ESP32S3 DevKitM board configuration
2+
3+
# Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_ESP32S3_DEVKITM
7+
bool "ESP32S3 DevKitM Board"
8+
depends on SOC_ESP32S3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ESP32S3 DevKitM board configuration
2+
3+
# Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD
7+
default "esp32s3_devkitm"
8+
depends on BOARD_ESP32S3_DEVKITM
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
4+
set(OPENOCD OPENOCD-NOTFOUND)
5+
endif()
6+
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
7+
8+
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
.. _esp32s3_devkitm:
2+
3+
ESP32S3-DevKitM
4+
###############
5+
6+
Overview
7+
********
8+
9+
The ESP32-S3-DevKitM is an entry-level development board equipped with either ESP32-S3-MINI-1
10+
or ESP32-S3-MINI-1U, a module named for its small size. This board integrates complete Wi-Fi
11+
and Bluetooth Low Energy functions. For more information, check `ESP32-S3 DevKitM`_
12+
13+
Hardware
14+
********
15+
16+
ESP32-S3 is a low-power MCU-based system on a chip (SoC) with integrated 2.4 GHz Wi-Fi
17+
and Bluetooth® Low Energy (Bluetooth LE). It consists of high-performance dual-core microprocessor
18+
(Xtensa® 32-bit LX7), a low power coprocessor, a Wi-Fi baseband, a Bluetooth LE baseband,
19+
RF module, and numerous peripherals.
20+
21+
ESP32-S3 DevKitM includes the following features:
22+
23+
- Dual core 32-bit Xtensa Microprocessor (Tensilica LX7), running up to 240MHz
24+
- Additional vector instructions support for AI acceleration
25+
- 512KB of SRAM
26+
- 384KB of ROM
27+
- Wi-Fi 802.11b/g/n
28+
- Bluetooth LE 5.0 with long-range support and up to 2Mbps data rate
29+
30+
Digital interfaces:
31+
32+
- 45 programmable GPIOs
33+
- 4x SPI
34+
- 1x LCD interface (8-bit ~16-bit parallel RGB, I8080 and MOTO6800), supporting conversion between RGB565, YUV422, YUV420 and YUV411
35+
- 1x DVP 8-bit ~16-bit camera interface
36+
- 3x UART
37+
- 2x I2C
38+
- 2x I2S
39+
- 1x RMT (TX/RX)
40+
- 1x pulse counter
41+
- LED PWM controller, up to 8 channels
42+
- 1x full-speed USB OTG
43+
- 1x USB Serial/JTAG controller
44+
- 2x MCPWM
45+
- 1x SDIO host controller with 2 slots
46+
- General DMA controller (GDMA), with 5 transmit channels and 5 receive channels
47+
- 1x TWAI® controller, compatible with ISO 11898-1 (CAN Specification 2.0)
48+
- Addressable RGB LED, driven by GPIO48.
49+
50+
Analog interfaces:
51+
52+
- 2x 12-bit SAR ADCs, up to 20 channels
53+
- 1x temperature sensor
54+
- 14x touch sensing IOs
55+
56+
Timers:
57+
58+
- 4x 54-bit general-purpose timers
59+
- 1x 52-bit system timer
60+
- 3x watchdog timers
61+
62+
Low Power:
63+
64+
- Power Management Unit with five power modes
65+
- Ultra-Low-Power (ULP) coprocessors: ULP-RISC-V and ULP-FSM
66+
67+
Security:
68+
69+
- Secure boot
70+
- Flash encryption
71+
- 4-Kbit OTP, up to 1792 bits for users
72+
- Cryptographic hardware acceleration: (AES-128/256, Hash, RSA, RNG, HMAC, Digital signature)
73+
74+
For more information, check the datasheet at `ESP32-S3 Datasheet`_.
75+
76+
Supported Features
77+
==================
78+
79+
Current Zephyr's ESP32-S3-DevKitM board supports the following features:
80+
81+
+------------+------------+-------------------------------------+
82+
| Interface | Controller | Driver/Component |
83+
+============+============+=====================================+
84+
+------------+------------+-------------------------------------+
85+
| UART | on-chip | serial port |
86+
+------------+------------+-------------------------------------+
87+
| GPIO | on-chip | gpio |
88+
+------------+------------+-------------------------------------+
89+
| PINMUX | on-chip | pinmux |
90+
+------------+------------+-------------------------------------+
91+
| USB-JTAG | on-chip | hardware interface |
92+
+------------+------------+-------------------------------------+
93+
94+
Prerequisites
95+
-------------
96+
97+
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
98+
below to retrieve those files.
99+
100+
.. code-block:: console
101+
102+
west blobs fetch hal_espressif
103+
104+
.. note::
105+
106+
It is recommended running the command above after :file:`west update`.
107+
108+
Building & Flashing
109+
-------------------
110+
111+
Build and flash applications as usual (see :ref:`build_an_application` and
112+
:ref:`application_run` for more details).
113+
114+
.. zephyr-app-commands::
115+
:zephyr-app: samples/hello_world
116+
:board: esp32s3_devkitm
117+
:goals: build
118+
119+
The usual ``flash`` target will work with the ``esp32s3_devkitm`` board
120+
configuration. Here is an example for the :ref:`hello_world`
121+
application.
122+
123+
.. zephyr-app-commands::
124+
:zephyr-app: samples/hello_world
125+
:board: esp32s3_devkitm
126+
:goals: flash
127+
128+
Open the serial monitor using the following command:
129+
130+
.. code-block:: shell
131+
132+
west espressif monitor
133+
134+
After the board has automatically reset and booted, you should see the following
135+
message in the monitor:
136+
137+
.. code-block:: console
138+
139+
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
140+
Hello World! esp32s3_devkitm
141+
142+
Debugging
143+
---------
144+
145+
As with much custom hardware, the ESP32 modules require patches to
146+
OpenOCD that are not upstreamed yet. Espressif maintains their own fork of
147+
the project. The custom OpenOCD can be obtained at `OpenOCD ESP32`_
148+
149+
The Zephyr SDK uses a bundled version of OpenOCD by default. You can overwrite that behavior by adding the
150+
``-DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>``
151+
parameter when building.
152+
153+
Here is an example for building the :ref:`hello_world` application.
154+
155+
.. zephyr-app-commands::
156+
:zephyr-app: samples/hello_world
157+
:board: esp32s3_devkitm
158+
:goals: build flash
159+
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
160+
161+
You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
162+
163+
.. zephyr-app-commands::
164+
:zephyr-app: samples/hello_world
165+
:board: esp32s3_devkitm
166+
:goals: debug
167+
168+
References
169+
**********
170+
171+
.. _`ESP32-S3 DevKitM`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitm-1.html
172+
.. _`ESP32-S3 Datasheet`: https://www.espressif.com/sites/default/files/documentation/esp32-s3-mini-1_mini-1u_datasheet_en.pdf
173+
.. _`ESP32 Technical Reference Manual`: https://www.espressif.com/sites/default/files/documentation/esp32-s3_technical_reference_manual_en.pdf
174+
.. _`JTAG debugging for ESP32-S3`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/
175+
.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
8+
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
9+
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
10+
11+
&pinctrl {
12+
uart0_default: uart0_default {
13+
group1 {
14+
pinmux = <UART0_TX_GPIO43>;
15+
};
16+
group2 {
17+
pinmux = <UART0_RX_GPIO44>;
18+
bias-pull-up;
19+
};
20+
};
21+
};
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/*
2+
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/dts-v1/;
7+
8+
#include <espressif/esp32s3.dtsi>
9+
#include "esp32s3_devkitm-pinctrl.dtsi"
10+
11+
/ {
12+
model = "esp32s3_devkitm";
13+
compatible = "espressif,esp32s3";
14+
15+
chosen {
16+
zephyr,sram = &sram0;
17+
zephyr,console = &uart0;
18+
zephyr,shell-uart = &uart0;
19+
zephyr,flash = &flash0;
20+
};
21+
22+
aliases {
23+
uart-0 = &uart0;
24+
sw0 = &button0;
25+
};
26+
27+
buttons {
28+
compatible = "gpio-keys";
29+
button0: button_0 {
30+
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
31+
label = "BOOT Button";
32+
};
33+
};
34+
};
35+
36+
&cpu0 {
37+
clock-frequency = <ESP32_CLK_CPU_240M>;
38+
};
39+
40+
&cpu1 {
41+
clock-frequency = <ESP32_CLK_CPU_240M>;
42+
};
43+
44+
&uart0 {
45+
status = "okay";
46+
current-speed = <115200>;
47+
pinctrl-0 = <&uart0_default>;
48+
pinctrl-names = "default";
49+
};
50+
51+
&gpio0 {
52+
status = "okay";
53+
};
54+
55+
&gpio1 {
56+
status = "okay";
57+
};
58+
59+
&flash0 {
60+
status = "okay";
61+
partitions {
62+
compatible = "fixed-partitions";
63+
#address-cells = <1>;
64+
#size-cells = <1>;
65+
66+
/* Reserve 64kB for the bootloader */
67+
boot_partition: partition@0 {
68+
label = "mcuboot";
69+
reg = <0x00000000 0x00010000>;
70+
read-only;
71+
};
72+
73+
/* Reserve 1024kB for the application in slot 0 */
74+
slot0_partition: partition@10000 {
75+
label = "image-0";
76+
reg = <0x00010000 0x00100000>;
77+
};
78+
79+
/* Reserve 1024kB for the application in slot 1 */
80+
slot1_partition: partition@110000 {
81+
label = "image-1";
82+
reg = <0x00110000 0x00100000>;
83+
};
84+
85+
/* Reserve 256kB for the scratch partition */
86+
scratch_partition: partition@210000 {
87+
label = "image-scratch";
88+
reg = <0x00210000 0x00040000>;
89+
};
90+
91+
storage_partition: partition@250000 {
92+
label = "storage";
93+
reg = <0x00250000 0x00006000>;
94+
};
95+
};
96+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
identifier: esp32s3_devkitm
2+
name: ESP32-S3 DevKitM
3+
type: mcu
4+
arch: xtensa
5+
toolchain:
6+
- espressif
7+
supported:
8+
- gpio
9+
- uart
10+
testing:
11+
ignore_tags:
12+
- net
13+
- bluetooth
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_XTENSA_RESET_VECTOR=n
4+
CONFIG_BOARD_ESP32S3_DEVKITM=y
5+
CONFIG_SOC_ESP32S3=y
6+
CONFIG_MAIN_STACK_SIZE=2048
7+
CONFIG_CONSOLE=y
8+
CONFIG_SERIAL=y
9+
CONFIG_UART_CONSOLE=y
10+
CONFIG_XTENSA_USE_CORE_CRT1=n
11+
CONFIG_GPIO=y
12+
CONFIG_GEN_ISR_TABLES=y
13+
CONFIG_GEN_IRQ_VECTOR_TABLE=n
14+
CONFIG_CLOCK_CONTROL=y
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set ESP_RTOS none
2+
set ESP32_ONLYCPU 1
3+
4+
# Source the JTAG interface configuration file
5+
source [find interface/esp_usb_jtag.cfg]
6+
# Source the ESP32-S3 configuration file
7+
source [find target/esp32s3.cfg]

tests/lib/heap/testcase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
tests:
99
libraries.heap:
1010
tags: heap
11-
platform_exclude: m2gl025_miv qemu_xtensa esp32s2_saola
11+
platform_exclude: m2gl025_miv qemu_xtensa esp32s2_saola esp32s3_devkitm
1212
filter: not CONFIG_SOC_NSIM
1313
timeout: 480

0 commit comments

Comments
 (0)