boards/espressif/esp32s2_devkitc/doc/index.html · boards/espressif/esp32s2_devkitc/doc/index.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · Espressif ESP32-S2

ESP32-S2-DevKitC

Secure boot와 flash encryption, 43개 GPIO와 USB OTG를 갖춘 single-core Wi-Fi 개발 보드입니다.

Official pathboards/espressif/esp32s2_devkitc/doc/index.html
Source fileboards/espressif/esp32s2_devkitc/doc/index.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

ESP32-S2-DevKitC는 RSA-3072 secure boot, AES-XTS-256 flash encryption, USB OTG와 다양한 I/O를 제공하는 low-power Wi-Fi board입니다.

Core

single core · Wi-Fi

I/O

43 GPIO · 14 touch

Security

RSA-3072 · AES-XTS-256

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 B98F0E43F2794DE1404885ACB41B8FCA02C80917206EFCF3AA1BCA657990A26E
.. _esp32s2_devkitc:

ESP32-S2
########

Overview
********

ESP32-S2 is a highly integrated, low-power, single-core Wi-Fi Microcontroller SoC, designed to be secure and
cost-effective, with a high performance and a rich set of IO capabilities. [1]_

The features include the following:

- RSA-3072-based secure boot
- AES-XTS-256-based flash encryption
- Protected private key and device secrets from software access
- Cryptographic accelerators for enhanced performance
- Protection against physical fault injection attacks
- Various peripherals:

  - 43x programmable GPIOs
  - 14x configurable capacitive touch GPIOs
  - USB OTG
  - LCD interface
  - camera interface
  - SPI
  - I2S
  - UART
  - ADC
  - DAC
  - LED PWM with up to 8 channels

Supported Features
==================

Current Zephyr's ESP32-S2-devkitc 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                                 |
+------------+------------+-------------------------------------+
| PCNT       | on-chip    | qdec                                |
+------------+------------+-------------------------------------+
| SPI DMA    | on-chip    | spi                                 |
+------------+------------+-------------------------------------+
| ADC        | on-chip    | adc                                 |
+------------+------------+-------------------------------------+
| DAC        | on-chip    | dac                                 |
+------------+------------+-------------------------------------+
| Wi-Fi      | 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
*******************

Simple boot
===========

The board could be loaded using the single binary image, without 2nd stage bootloader.
It is the default option when building the application without additional configuration.

.. note::

   Simple boot does not provide any security features nor OTA updates.

MCUboot bootloader
==================

User may choose to use MCUboot bootloader instead. In that case the bootloader
must be build (and flash) at least once.

There are two options to be used when building an application:

1. Sysbuild
2. Manual build

.. note::

   User can select the MCUboot bootloader by adding the following line
   to the board default configuration file.

   .. code:: cfg

      CONFIG_BOOTLOADER_MCUBOOT=y

Sysbuild
========

The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board with the ESP32 SoC.

To build the sample application using sysbuild use the command:

.. zephyr-app-commands::
   :tool: west
   :app: samples/hello_world
   :board: esp32s2_devkitc
   :goals: build
   :west-args: --sysbuild
   :compact:

By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
images. But it can be configured to create other kind of images.

Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:

.. code-block::

  build/
  ├── hello_world
  │   └── zephyr
  │       ├── zephyr.elf
  │       └── zephyr.bin
  ├── mcuboot
  │    └── zephyr
  │       ├── zephyr.elf
  │       └── zephyr.bin
  └── domains.yaml

.. note::

   With ``--sysbuild`` option the bootloader will be re-build and re-flash
   every time the pristine build is used.

For more information about the system build please read the :ref:`sysbuild` documentation.

Manual build
============

During the development cycle, it is intended to build & flash as quickly possible.
For that reason, images can be build one at a time using traditional build.

The instructions following are relevant for both manual build and sysbuild.
The only difference is the structure of the build directory.

.. note::

   Remember that bootloader (MCUboot) needs to be flash at least once.

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: esp32s2_devkitc
   :goals: build

The usual ``flash`` target will work with the ``esp32s2_devkitc`` board
configuration. Here is an example for the :ref:`hello_world`
application.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: esp32s2_devkitc
   :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! esp32s2_devkitc

Debugging
*********

ESP32-S2 support on OpenOCD is available upstream as of version 0.12.0.
Download and install OpenOCD from `OpenOCD`_.

The following table shows the pin mapping between ESP32-S2 board and JTAG interface.

+---------------+-----------+
| ESP32 pin     | JTAG pin  |
+===============+===========+
| MTDO / GPIO40 | TDO       |
+---------------+-----------+
| MTDI / GPIO41 | TDI       |
+---------------+-----------+
| MTCK / GPIO39 | TCK       |
+---------------+-----------+
| MTMS / GPIO42 | TMS       |
+---------------+-----------+

Further documentation can be obtained from the SoC vendor in `JTAG debugging for ESP32-S2`_.

Here is an example for building the :ref:`hello_world` application.

.. zephyr-app-commands::
   :zephyr-app: samples/hello_world
   :board: esp32s2_devkitc
   :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: esp32s2_devkitc
   :goals: debug

.. _`OpenOCD`: https://github.com/openocd-org/openocd
.. _`JTAG debugging for ESP32-S2`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/index.html


References
**********

.. [1] https://www.espressif.com/en/products/socs/esp32-s2
.. _ESP32-S2 DevKitC User Guide: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-s2-devkitc-1.html
.. _ESP32S2 Technical Reference Manual: https://espressif.com/sites/default/files/documentation/esp32-s2_technical_reference_manual_en.pdf
.. _ESP32S2 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf

Part 3

한국어 전문 번역

개요

ESP32-S2는 high performance와 풍부한 I/O capability를 갖추면서 security와 cost-effectiveness를 목표로 설계된 highly integrated, low-power, single-core Wi-Fi microcontroller SoC입니다.

주요 기능은 다음과 같습니다.

  • RSA-3072 기반 secure boot
  • AES-XTS-256 기반 flash encryption
  • software access로부터 private key와 device secret 보호
  • 성능 향상을 위한 cryptographic accelerator
  • physical fault-injection attack 방어
  • programmable GPIO 43개
  • configurable capacitive-touch GPIO 14개
  • USB OTG
  • LCD interface와 camera interface
  • SPI, I2S, UART, ADC, DAC
  • 최대 8 channel의 LED PWM

지원 기능

현재 Zephyr의 ESP32-S2-DevKitC board는 다음 interface와 driver를 지원합니다.

InterfaceControllerDriver/Component
UARTon-chipserial port
GPIOon-chipgpio
PINMUXon-chippinmux
USB-JTAGon-chiphardware interface
SPI Masteron-chipspi
Timerson-chipcounter
Watchdogon-chipwatchdog
TRNGon-chipentropy
LEDCon-chippwm
PCNTon-chipqdec
SPI DMAon-chipspi
ADCon-chipadc
DACon-chipdac
Wi-Fion-chip

시스템 요구 사항

사전 준비

Espressif HAL이 동작하려면 Wi-Fi와 Bluetooth binary blob이 필요합니다. 다음 명령으로 해당 file을 가져오며 west update 뒤 실행하는 것이 좋습니다.

west blobs fetch hal_espressif

빌드와 플래시

Simple boot

2nd-stage bootloader 없이 single binary image로 board를 load할 수 있습니다. 별도 configuration 없이 application을 build할 때의 default option입니다.

MCUboot bootloader

MCUboot를 선택할 수 있으며 bootloader를 적어도 한 번 build하고 flash해야 합니다. Application은 sysbuild 또는 manual build 방식으로 만들 수 있습니다.

CONFIG_BOOTLOADER_MCUBOOT=y

Sysbuild

Sysbuild는 ESP32 SoC board를 bootstrap하는 데 필요한 모든 image를 build하고 flash합니다.

west build --sysbuild -b esp32s2_devkitc samples/hello_world

기본적으로 bootloader(MCUboot)와 application image를 생성하지만 다른 image도 생성하도록 구성할 수 있습니다. Build output은 domain subdirectory별로 구성됩니다.

build/
├── hello_world
│   └── zephyr
│       ├── zephyr.elf
│       └── zephyr.bin
├── mcuboot
│    └── zephyr
│       ├── zephyr.elf
│       └── zephyr.bin
└── domains.yaml

더 자세한 내용은 Zephyr의 sysbuild documentation을 참조하십시오.

Manual build

개발 중에는 가능한 한 빠르게 build·flash하기 위해 전통적인 build 방식으로 image를 하나씩 만들 수 있습니다. 아래 지침은 manual build와 sysbuild에 모두 적용되며 build directory 구조만 다릅니다. MCUboot는 적어도 한 번 먼저 flash해야 합니다.

west build -b esp32s2_devkitc samples/hello_world
west flash

다음 명령으로 serial monitor를 엽니다.

west espressif monitor

Board가 자동 reset·boot되면 다음 message가 나타납니다.

***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
Hello World! esp32s2_devkitc

디버깅

ESP32-S2의 OpenOCD support는 version 0.12.0부터 upstream에서 제공됩니다. OpenOCD를 내려받아 설치하십시오.

ESP32-S2 board와 JTAG interface의 pin mapping은 다음과 같습니다.

ESP32 pinJTAG pin
MTDO / GPIO40TDO
MTDI / GPIO41TDI
MTCK / GPIO39TCK
MTMS / GPIO42TMS

자세한 내용은 Espressif의 JTAG debugging for ESP32-S2를 참조하십시오.

hello_world를 build·flash하거나 debug하는 예는 다음과 같습니다.

west build -b esp32s2_devkitc samples/hello_world
west flash
west debug

참고 자료

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.