boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the real word boards: - esp32_devkitc_wroom - esp32_devkitc_wrover (with PSRAM option) Signed-off-by: Marek Matej <marek.matej@espressif.com>
This commit is contained in:
parent
e033bf6e7a
commit
3776402f40
73 changed files with 696 additions and 50 deletions
|
@ -1,8 +0,0 @@
|
|||
# ESP32 board configuration
|
||||
|
||||
# Copyright (c) 2017 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_ESP32
|
||||
bool "ESP32 Development Board"
|
||||
depends on SOC_ESP32
|
6
boards/xtensa/esp32_devkitc_wroom/Kconfig.board
Normal file
6
boards/xtensa/esp32_devkitc_wroom/Kconfig.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_ESP32_DEVKITC_WROOM
|
||||
bool "ESP32-DEVKITC-WROOM Development Board"
|
||||
depends on SOC_ESP32
|
|
@ -4,8 +4,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD
|
||||
default "esp32"
|
||||
depends on BOARD_ESP32
|
||||
default "esp32_devkitc_wroom"
|
||||
depends on BOARD_ESP32_DEVKITC_WROOM
|
||||
|
||||
config ENTROPY_GENERATOR
|
||||
default y
|
|
@ -1,8 +1,10 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
|
||||
set(OPENOCD OPENOCD-NOTFOUND)
|
||||
endif()
|
||||
|
||||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
209
boards/xtensa/esp32_devkitc_wroom/doc/index.rst
Normal file
209
boards/xtensa/esp32_devkitc_wroom/doc/index.rst
Normal file
|
@ -0,0 +1,209 @@
|
|||
.. _esp32_devkitc_wroom:
|
||||
|
||||
ESP32-DEVKITC-WROOM
|
||||
###################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
ESP32-DEVKITC-WROOM is a series of low cost, low power system on a chip microcontrollers
|
||||
with integrated Wi-Fi & dual-mode Bluetooth. The ESP32 series employs a
|
||||
Tensilica Xtensa LX6 microprocessor in both dual-core and single-core
|
||||
variations. ESP32-WROOM is created and developed by Espressif Systems, a
|
||||
Shanghai-based Chinese company, and is manufactured by TSMC using their 40nm
|
||||
process. [1]_
|
||||
|
||||
The features include the following:
|
||||
|
||||
- Dual core Xtensa microprocessor (LX6), running at 160 or 240MHz
|
||||
- 520KB of SRAM
|
||||
- 802.11b/g/n/e/i
|
||||
- Bluetooth v4.2 BR/EDR and BLE
|
||||
- Various peripherals:
|
||||
|
||||
- 12-bit ADC with up to 18 channels
|
||||
- 2x 8-bit DACs
|
||||
- 10x touch sensors
|
||||
- Temperature sensor
|
||||
- 4x SPI
|
||||
- 2x I2S
|
||||
- 2x I2C
|
||||
- 3x UART
|
||||
- SD/SDIO/MMC host
|
||||
- Slave (SDIO/SPI)
|
||||
- Ethernet MAC
|
||||
- CAN bus 2.0
|
||||
- IR (RX/TX)
|
||||
- Motor PWM
|
||||
- LED PWM with up to 16 channels
|
||||
- Hall effect sensor
|
||||
|
||||
- Cryptographic hardware acceleration (RNG, ECC, RSA, SHA-2, AES)
|
||||
- 5uA deep sleep current
|
||||
|
||||
.. figure:: img/esp32_devkitc_wroom.jpg
|
||||
:align: center
|
||||
:alt: ESP32-DEVKITC-WROOM
|
||||
|
||||
ESP32-DevKitC-WROOM-32D DK
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
Current Zephyr's ESP32-WROOM board supports the following features:
|
||||
|
||||
+------------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+============+============+=====================================+
|
||||
+------------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port |
|
||||
+------------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+------------+------------+-------------------------------------+
|
||||
| PINMUX | on-chip | pinmux |
|
||||
+------------+------------+-------------------------------------+
|
||||
| USB-JTAG | on-chip | hardware interface |
|
||||
+------------+------------+-------------------------------------+
|
||||
| SPI Master | on-chip | spi |
|
||||
+------------+------------+-------------------------------------+
|
||||
| Timers | on-chip | counter |
|
||||
+------------+------------+-------------------------------------+
|
||||
| Watchdog | on-chip | watchdog |
|
||||
+------------+------------+-------------------------------------+
|
||||
| TRNG | on-chip | entropy |
|
||||
+------------+------------+-------------------------------------+
|
||||
| LEDC | on-chip | pwm |
|
||||
+------------+------------+-------------------------------------+
|
||||
| MCPWM | on-chip | pwm |
|
||||
+------------+------------+-------------------------------------+
|
||||
| PCNT | on-chip | qdec |
|
||||
+------------+------------+-------------------------------------+
|
||||
| SPI DMA | on-chip | spi |
|
||||
+------------+------------+-------------------------------------+
|
||||
| TWAI | on-chip | can |
|
||||
+------------+------------+-------------------------------------+
|
||||
| ADC | on-chip | adc |
|
||||
+------------+------------+-------------------------------------+
|
||||
| DAC | on-chip | dac |
|
||||
+------------+------------+-------------------------------------+
|
||||
| Wi-Fi | on-chip | |
|
||||
+------------+------------+-------------------------------------+
|
||||
| Bluetooth | on-chip | |
|
||||
+------------+------------+-------------------------------------+
|
||||
|
||||
System requirements
|
||||
===================
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
|
||||
below to retrieve those files.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
west blobs fetch hal_espressif
|
||||
|
||||
.. note::
|
||||
|
||||
It is recommended running the command above after :file:`west update`.
|
||||
|
||||
Building & Flashing
|
||||
-------------------
|
||||
|
||||
Build and flash applications as usual (see :ref:`build_an_application` and
|
||||
:ref:`application_run` for more details).
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: build
|
||||
|
||||
The usual ``flash`` target will work with the ``esp32_devkitc_wroom`` board
|
||||
configuration. Here is an example for the :ref:`hello_world`
|
||||
application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: flash
|
||||
|
||||
Open the serial monitor using the following command:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
west espressif monitor
|
||||
|
||||
After the board has automatically reset and booted, you should see the following
|
||||
message in the monitor:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
||||
Hello World! esp32_devkitc_wroom
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
||||
ESP32-DEVKITC-WROOM support on OpenOCD is available upstream as of version 0.12.0.
|
||||
Download and install OpenOCD from `OpenOCD`_.
|
||||
|
||||
On the ESP-WROOM-32 DevKitC board, the JTAG pins are not run to a
|
||||
standard connector (e.g. ARM 20-pin) and need to be manually connected
|
||||
to the external programmer (e.g. a Flyswatter2):
|
||||
|
||||
+------------+-----------+
|
||||
| ESP32 pin | JTAG pin |
|
||||
+============+===========+
|
||||
| 3V3 | VTRef |
|
||||
+------------+-----------+
|
||||
| EN | nTRST |
|
||||
+------------+-----------+
|
||||
| IO14 | TMS |
|
||||
+------------+-----------+
|
||||
| IO12 | TDI |
|
||||
+------------+-----------+
|
||||
| GND | GND |
|
||||
+------------+-----------+
|
||||
| IO13 | TCK |
|
||||
+------------+-----------+
|
||||
| IO15 | TDO |
|
||||
+------------+-----------+
|
||||
|
||||
Further documentation can be obtained from the SoC vendor in `JTAG debugging
|
||||
for ESP32`_.
|
||||
|
||||
Here is an example for building the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: build flash
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: debug
|
||||
|
||||
Note on Debugging with GDB Stub
|
||||
===============================
|
||||
|
||||
GDB stub is enabled on ESP32.
|
||||
|
||||
* When adding breakpoints, please use hardware breakpoints with command
|
||||
``hbreak``. Command ``break`` uses software breakpoints which requires
|
||||
modifying memory content to insert break/trap instructions.
|
||||
This does not work as the code is on flash which cannot be randomly
|
||||
accessed for modification.
|
||||
|
||||
.. _`JTAG debugging for ESP32`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/index.html
|
||||
.. _`OpenOCD`: https://github.com/openocd-org/openocd
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. [1] https://en.wikipedia.org/wiki/ESP32
|
||||
.. _ESP32 Technical Reference Manual: https://espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
|
||||
.. _Hardware Reference: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/index.html
|
160
boards/xtensa/esp32_devkitc_wroom/esp32_devkitc_wroom.dts
Normal file
160
boards/xtensa/esp32_devkitc_wroom/esp32_devkitc_wroom.dts
Normal file
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include <espressif/esp32/esp32_wroom_32ue_n4.dtsi>
|
||||
#include "esp32_devkitc_wroom-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Espressif ESP32-DEVKITC-WROOM-32D";
|
||||
compatible = "espressif,esp32";
|
||||
|
||||
aliases {
|
||||
uart-0 = &uart0;
|
||||
i2c-0 = &i2c0;
|
||||
sw0 = &button0;
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
|
||||
buttons {
|
||||
compatible = "gpio-keys";
|
||||
button0: button_0 {
|
||||
gpios = <&gpio0 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
||||
label = "BOOT Button";
|
||||
};
|
||||
};
|
||||
|
||||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
clock-frequency = <ESP32_CLK_CPU_240M>;
|
||||
cpu-power-states = <&light_sleep &deep_sleep>;
|
||||
};
|
||||
|
||||
&cpu1 {
|
||||
clock-frequency = <ESP32_CLK_CPU_240M>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart1_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart2_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||
sda-gpios = <&gpio0 21 GPIO_OPEN_DRAIN>;
|
||||
scl-gpios = <&gpio0 22 GPIO_OPEN_DRAIN>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&spi2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spim2_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spim3_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&timer0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&timer1 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&timer2 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&timer3 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&trng0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&psram0 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
&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>;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
identifier: esp32
|
||||
name: ESP-32
|
||||
identifier: esp32_devkitc_wroom
|
||||
name: ESP32-DevkitC-WROOM-32D
|
||||
type: mcu
|
||||
arch: xtensa
|
||||
toolchain:
|
|
@ -1,8 +1,9 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_XTENSA_RESET_VECTOR=n
|
||||
|
||||
CONFIG_BOARD_ESP32=y
|
||||
CONFIG_BOARD_ESP32_DEVKITC_WROOM=y
|
||||
CONFIG_SOC_ESP32=y
|
||||
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
6
boards/xtensa/esp32_devkitc_wrover/Kconfig.board
Normal file
6
boards/xtensa/esp32_devkitc_wrover/Kconfig.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_ESP32_DEVKITC_WROVER
|
||||
bool "ESP32-DEVKITC-WROVER-E Development board"
|
||||
depends on SOC_ESP32
|
18
boards/xtensa/esp32_devkitc_wrover/Kconfig.defconfig
Normal file
18
boards/xtensa/esp32_devkitc_wrover/Kconfig.defconfig
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD
|
||||
default "esp32_devkitc_wrover"
|
||||
depends on BOARD_ESP32_DEVKITC_WROVER
|
||||
|
||||
config ENTROPY_GENERATOR
|
||||
default y
|
||||
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 98304 if WIFI
|
||||
default 40960 if BT
|
||||
default 4096
|
||||
|
||||
choice BT_HCI_BUS_TYPE
|
||||
default BT_ESP32 if BT
|
||||
endchoice
|
10
boards/xtensa/esp32_devkitc_wrover/Kconfig.sysbuild
Normal file
10
boards/xtensa/esp32_devkitc_wrover/Kconfig.sysbuild
Normal file
|
@ -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
|
11
boards/xtensa/esp32_devkitc_wrover/board.cmake
Normal file
11
boards/xtensa/esp32_devkitc_wrover/board.cmake
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
|
||||
set(OPENOCD OPENOCD-NOTFOUND)
|
||||
endif()
|
||||
|
||||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
Binary file not shown.
After Width: | Height: | Size: 76 KiB |
|
@ -1,7 +1,7 @@
|
|||
.. _esp32:
|
||||
.. _esp32_devkitc_wrover:
|
||||
|
||||
ESP32
|
||||
#####
|
||||
ESP32-DEVKITC-WROVER
|
||||
####################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
@ -41,6 +41,12 @@ The features include the following:
|
|||
- Cryptographic hardware acceleration (RNG, ECC, RSA, SHA-2, AES)
|
||||
- 5uA deep sleep current
|
||||
|
||||
.. figure:: img/esp32_devkitc_wrover.jpg
|
||||
:align: center
|
||||
:alt: ESP32-DEVKITC-WROVER
|
||||
|
||||
ESP32-DevKitC-WROVER-IE
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
|
@ -142,7 +148,7 @@ To build the sample application using sysbuild use the command:
|
|||
.. zephyr-app-commands::
|
||||
:tool: west
|
||||
:app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wrover
|
||||
:goals: build
|
||||
:west-args: --sysbuild
|
||||
:compact:
|
||||
|
@ -191,16 +197,16 @@ Build and flash applications as usual (see :ref:`build_an_application` and
|
|||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wrover
|
||||
:goals: build
|
||||
|
||||
The usual ``flash`` target will work with the ``esp32`` board
|
||||
The usual ``flash`` target will work with the ``esp32_devkitc_wrover`` board
|
||||
configuration. Here is an example for the :ref:`hello_world`
|
||||
application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wrover
|
||||
:goals: flash
|
||||
|
||||
Open the serial monitor using the following command:
|
||||
|
@ -215,7 +221,7 @@ message in the monitor:
|
|||
.. code-block:: console
|
||||
|
||||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
||||
Hello World! esp32
|
||||
Hello World! esp32_devkitc_wrover
|
||||
|
||||
Debugging
|
||||
*********
|
||||
|
@ -252,14 +258,14 @@ Here is an example for building the :ref:`hello_world` application.
|
|||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wrover
|
||||
:goals: build flash
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wrover
|
||||
:goals: debug
|
||||
|
||||
Note on Debugging with GDB Stub
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
|
||||
#include <dt-bindings/pinctrl/esp32-pinctrl.h>
|
||||
#include <zephyr/dt-bindings/pinctrl/esp32-gpio-sigmap.h>
|
||||
|
||||
&pinctrl {
|
||||
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
pinmux = <UART0_TX_GPIO1>;
|
||||
output-high;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <UART0_RX_GPIO3>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart1_default: uart1_default {
|
||||
group1 {
|
||||
pinmux = <UART1_TX_GPIO10>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <UART1_RX_GPIO9>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
uart2_default: uart2_default {
|
||||
group1 {
|
||||
pinmux = <UART2_TX_GPIO17>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <UART2_RX_GPIO16>;
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
spim2_default: spim2_default {
|
||||
group1 {
|
||||
pinmux = <SPIM2_MISO_GPIO12>,
|
||||
<SPIM2_SCLK_GPIO14>,
|
||||
<SPIM2_CSEL_GPIO15>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <SPIM2_MOSI_GPIO13>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
spim3_default: spim3_default {
|
||||
group1 {
|
||||
pinmux = <SPIM3_MISO_GPIO19>,
|
||||
<SPIM3_SCLK_GPIO18>,
|
||||
<SPIM3_CSEL_GPIO5>;
|
||||
};
|
||||
group2 {
|
||||
pinmux = <SPIM3_MOSI_GPIO23>;
|
||||
output-low;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
pinmux = <I2C0_SDA_GPIO21>,
|
||||
<I2C0_SCL_GPIO22>;
|
||||
bias-pull-up;
|
||||
drive-open-drain;
|
||||
output-high;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -1,15 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Intel Corporation.
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/dts-v1/;
|
||||
|
||||
#include <espressif/esp32/esp32_wrover_e_n4r2.dtsi>
|
||||
#include "esp32-pinctrl.dtsi"
|
||||
#include <espressif/esp32/esp32_wrover_e_n4r8.dtsi>
|
||||
#include "esp32_devkitc_wrover-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "esp32";
|
||||
model = "Espressif ESP32-DEVKITC-WROVER-E";
|
||||
compatible = "espressif,esp32";
|
||||
|
||||
aliases {
|
23
boards/xtensa/esp32_devkitc_wrover/esp32_devkitc_wrover.yaml
Normal file
23
boards/xtensa/esp32_devkitc_wrover/esp32_devkitc_wrover.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
identifier: esp32_devkitc_wrover
|
||||
name: ESP32-DevkitC-WROVER-E
|
||||
type: mcu
|
||||
arch: xtensa
|
||||
toolchain:
|
||||
- zephyr
|
||||
supported:
|
||||
- adc
|
||||
- dac
|
||||
- gpio
|
||||
- i2c
|
||||
- watchdog
|
||||
- uart
|
||||
- nvs
|
||||
- pwm
|
||||
- dac
|
||||
- spi
|
||||
- counter
|
||||
- entropy
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_XTENSA_RESET_VECTOR=n
|
||||
|
||||
CONFIG_BOARD_ESP32_DEVKITC_WROVER=y
|
||||
CONFIG_SOC_ESP32=y
|
||||
|
||||
CONFIG_MAIN_STACK_SIZE=2048
|
||||
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
CONFIG_XTENSA_USE_CORE_CRT1=n
|
||||
|
||||
CONFIG_GPIO=y
|
||||
|
||||
CONFIG_GEN_ISR_TABLES=y
|
||||
CONFIG_GEN_IRQ_VECTOR_TABLE=n
|
||||
|
||||
CONFIG_CLOCK_CONTROL=y
|
5
boards/xtensa/esp32_devkitc_wrover/support/openocd.cfg
Normal file
5
boards/xtensa/esp32_devkitc_wrover/support/openocd.cfg
Normal file
|
@ -0,0 +1,5 @@
|
|||
set ESP_RTOS none
|
||||
set ESP32_ONLYCPU 1
|
||||
|
||||
source [find interface/ftdi/esp32_devkitj_v1.cfg]
|
||||
source [find target/esp32.cfg]
|
|
@ -35,16 +35,16 @@ Build and flash applications as usual (see :ref:`build_an_application` and
|
|||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: build
|
||||
|
||||
The usual ``flash`` target will work with the ``esp32`` board
|
||||
The usual ``flash`` target will work with the ``esp32_devkitc_wroom`` board
|
||||
configuration. Here is an example for the :ref:`hello_world`
|
||||
application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: flash
|
||||
|
||||
Open the serial monitor using the following command:
|
||||
|
@ -59,7 +59,7 @@ message in the monitor:
|
|||
.. code-block:: console
|
||||
|
||||
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
|
||||
Hello World! esp32
|
||||
Hello World! esp32_devkitc_wroom
|
||||
|
||||
Debugging
|
||||
---------
|
||||
|
@ -76,7 +76,7 @@ Here is an example for building the :ref:`hello_world` application.
|
|||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: build flash
|
||||
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
|
||||
|
||||
|
@ -84,7 +84,7 @@ You can debug an application in the usual way. Here is an example for the :ref:`
|
|||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: esp32
|
||||
:board: esp32_devkitc_wroom
|
||||
:goals: debug
|
||||
|
||||
Using JTAG
|
||||
|
|
|
@ -19,7 +19,7 @@ tests:
|
|||
- smp
|
||||
filter: (CONFIG_MP_MAX_NUM_CPUS > 1)
|
||||
platform_exclude:
|
||||
- esp32
|
||||
- esp32_devkitc_wroom
|
||||
- esp_wrover_kit
|
||||
- esp32_ethernet_kit
|
||||
- heltec_wifi_lora32_v2
|
||||
|
|
|
@ -53,7 +53,7 @@ In these other cases, however, manual wiring is necessary:
|
|||
- connect PWM1 (PA8) to an LED
|
||||
* - :ref:`nucleo_wb55rg_board`
|
||||
- connect PWM1 (PA8) to an LED
|
||||
* - :ref:`esp32`
|
||||
* - :ref:`esp32_devkitc_wroom`
|
||||
- connect GPIO2 to an LED
|
||||
* - :ref:`esp32s2_saola`
|
||||
- connect GPIO2 to an LED
|
||||
|
|
|
@ -16,6 +16,9 @@ common:
|
|||
type: one_line
|
||||
regex:
|
||||
- .*success
|
||||
platform_exclude:
|
||||
- esp32_net
|
||||
|
||||
|
||||
tests:
|
||||
# Minimal Libc
|
||||
|
|
|
@ -30,9 +30,9 @@ as wake-up source, deep sleep for 20 seconds, wake up.
|
|||
Requirements
|
||||
************
|
||||
|
||||
This example should be able to run on any commonly available :ref:`esp32`
|
||||
development board without any extra hardware if only ``Timer`` is used as
|
||||
wakeup source.
|
||||
This example should be able to run on any commonly available
|
||||
:ref:`esp32_devkitc_wroom` development board without any extra hardware if
|
||||
only ``Timer`` is used as wakeup source.
|
||||
|
||||
However, when ``EXT1`` is also enabled, GPIO2 and GPIO4 should be pulled-down
|
||||
by external resistors to avoid floating pins. When triggering a wake up, one
|
||||
|
|
|
@ -69,7 +69,7 @@ Make sure you have your board connected over USB port.
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
west build -b esp32 samples/boards/esp32/flash_encryption
|
||||
west build -b esp32_devkitc_wrover samples/boards/esp32/flash_encryption
|
||||
west flash
|
||||
|
||||
Sample Output
|
||||
|
|
|
@ -3,5 +3,5 @@ sample:
|
|||
name: flash_encryption
|
||||
tests:
|
||||
sample.board.esp32:
|
||||
platform_allow: esp32
|
||||
platform_allow: esp32_devkitc_wroom
|
||||
tags: esp32
|
||||
|
|
|
@ -29,7 +29,7 @@ Make sure you have your board connected over USB port.
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
west build -b esp32 samples/boards/esp32/spiram_test
|
||||
west build -b esp32_devkitc_wrover samples/boards/esp32/spiram_test
|
||||
west flash
|
||||
|
||||
If using another supported Espressif board, replace the argument in the above
|
||||
|
|
|
@ -3,5 +3,5 @@ sample:
|
|||
name: spiram_test
|
||||
tests:
|
||||
sample.board.esp32.spiram:
|
||||
platform_allow: esp32
|
||||
platform_allow: esp32_devkitc_wrover
|
||||
tags: esp32
|
||||
|
|
|
@ -18,7 +18,7 @@ tests:
|
|||
- gd32f450i_eval
|
||||
- gd32vf103v_eval
|
||||
- gd32f403z_eval
|
||||
- esp32
|
||||
- esp32_devkitc_wroom
|
||||
- esp32s2_saola
|
||||
- esp32c3_devkitm
|
||||
- gd32l233r_eval
|
||||
|
|
|
@ -11,7 +11,7 @@ tests:
|
|||
- bl654_dvk
|
||||
- bl5340_dvk_cpuapp
|
||||
- disco_l475_iot1
|
||||
- esp32
|
||||
- esp32_devkitc_wroom
|
||||
- esp32s2_saola
|
||||
- frdm_k22f
|
||||
- frdm_k64f
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
&ipm0 {
|
||||
status = "okay";
|
||||
};
|
|
@ -2,7 +2,7 @@ sample:
|
|||
name: ESP32 IPM Sample
|
||||
tests:
|
||||
sample.ipm.ipm_esp32:
|
||||
platform_allow: esp32
|
||||
platform_allow: esp32_devkitc_wroom
|
||||
tags:
|
||||
- samples
|
||||
- ipm
|
||||
|
|
12
samples/net/wifi/boards/esp32_devkitc_wrover.conf
Normal file
12
samples/net/wifi/boards/esp32_devkitc_wrover.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
CONFIG_WIFI=y
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=98304
|
||||
|
||||
CONFIG_NETWORKING=y
|
||||
CONFIG_NET_L2_ETHERNET=y
|
||||
|
||||
CONFIG_NET_IPV6=n
|
||||
CONFIG_NET_IPV4=y
|
||||
CONFIG_NET_DHCPV4=y
|
||||
CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4=y
|
||||
|
||||
CONFIG_NET_LOG=y
|
9
samples/net/wifi/boards/esp32_devkitc_wrover.overlay
Normal file
9
samples/net/wifi/boards/esp32_devkitc_wrover.overlay
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
};
|
|
@ -19,7 +19,7 @@ Make sure you have the ESP32 DevKitC connected over USB port.
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
west build -b esp32 tests/boards/espressif_esp32/cache_coex
|
||||
west build -b esp32_devkitc_wrover tests/boards/espressif_esp32/cache_coex
|
||||
west flash --esp-device /dev/ttyUSB0
|
||||
|
||||
Sample Output
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests:
|
||||
boards.esp32.cache_coex:
|
||||
platform_allow: esp32 esp32s2_saola
|
||||
platform_allow: esp32_devkitc_wrover esp32s2_saola
|
||||
tags:
|
||||
- spiram
|
||||
- spiflash
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Wolter HV <wolterhv@gmx.de>
|
||||
* Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
zephyr,user {
|
||||
/* adjust channel number according to pinmux in board.dts */
|
||||
io-channels = <&adc0 0>, <&adc0 1>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc0 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
|
@ -12,7 +12,7 @@ tests:
|
|||
extra_args: DTC_OVERLAY_FILE=twai-enable.overlay
|
||||
filter: dt_compat_enabled("espressif,esp32-twai")
|
||||
platform_allow:
|
||||
- esp32
|
||||
- esp32_devkitc_wroom
|
||||
- esp32c3_devkitm
|
||||
- esp32s2_saola
|
||||
- esp32s3_devkitm
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright 2022 Espressif (Shanghai)
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&dac {
|
||||
status = "okay";
|
||||
};
|
|
@ -62,7 +62,8 @@
|
|||
#define DAC_RESOLUTION 12
|
||||
#define DAC_CHANNEL_ID 0
|
||||
|
||||
#elif defined(CONFIG_BOARD_ESP32) || \
|
||||
#elif defined(CONFIG_BOARD_ESP32_DEVKITC_WROOM) || \
|
||||
defined(CONFIG_BOARD_ESP32_DEVKITC_WROVER) || \
|
||||
defined(CONFIG_BOARD_ESP_WROVER_KIT) || \
|
||||
defined(CONFIG_BOARD_ESP32S2_SAOLA) || \
|
||||
defined(CONFIG_BOARD_GD32A503V_EVAL) || \
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&flash0 {
|
||||
partitions {
|
||||
/*
|
||||
* Reduce storage_partition to make space for
|
||||
* coredump_partition
|
||||
*/
|
||||
|
||||
storage_partition: partition@250000 {
|
||||
label = "storage";
|
||||
reg = <0x00250000 0x00005000>;
|
||||
};
|
||||
|
||||
coredump_partition: partition@255000 {
|
||||
label = "coredump-partition";
|
||||
reg = <0x255000 DT_SIZE_K(4)>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
|
@ -20,7 +20,8 @@ tests:
|
|||
extra_args: CONF_FILE=prj_flash_partition.conf
|
||||
platform_allow:
|
||||
- qemu_x86
|
||||
- esp32
|
||||
- esp32_devkitc_wroom
|
||||
- esp32_devkitc_wrover
|
||||
- esp32s2_saola
|
||||
- esp32s3_devkitm
|
||||
- esp32c3_devkitm
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue