samples/boards/esp32/spiram_test/README.html · samples/boards/esp32/spiram_test/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Boards · ESP32 Memory

ESP32 SPIRAM Test

Allocation size와 ESP_HEAP_MIN_EXTRAM_THRESHOLD 비교로 memory source가 결정됩니다.

Official pathsamples/boards/esp32/spiram_test/README.html
Source filesamples/boards/esp32/spiram_test/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

k_malloc/k_free 재할당과 ESP32·ESP32-S2 실행 결과를 설명합니다.

Small

Internal DRAM

Large

SPIRAM

Boundary

ESP_HEAP_MIN_EXTRAM_THRESHOLD

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 F5D5B10A9F293F08BB7FF2CC4DA97B51E8969978C472CF25B3AD6F6EDEC57778
.. _spiram_test:

Espressif ESP32 SPIRAM test
###########################

Overview
********

This sample allocates memory from internal DRAM and SPIRAM by calling
:c:func:`k_malloc`, frees allocated memory by calling :c:func:`k_free` and
checks if memory can be allocated again. Capability of allocated memory is
decided by ESP_HEAP_MIN_EXTRAM_THRESHOLD. If size is less than
ESP_HEAP_MIN_EXTRAM_THRESHOLD, memory is allocated from internal DRAM. If
size is greater than ESP_HEAP_MIN_EXTRAM_THRESHOLD, memory is allocated from
SPIRAM.

Supported SoCs
**************

The following SoCs are supported by this sample code so far:

* ESP32
* ESP32-S2

Building and Running
********************

Make sure you have your board connected over USB port.

.. code-block:: console

   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
command with a proper board name (e.g., `esp32s2_saola`).

Sample Output
=============

To check output of this sample, run ``west espressif monitor`` or any other serial
console program (e.g., minicom, putty, screen, etc).
This example uses ``west espressif monitor``, which automatically detects the serial
port at ``/dev/ttyUSB0``:

.. code-block:: console

   $ west espressif monitor

.. code-block:: console

    mem test ok! 209
    SPIRAM mem test pass
    mem test ok! 194
    Internal mem test pass

Part 3

한국어 전문 번역

개요

이 sample은 k_malloc()을 호출해 internal DRAM과 SPIRAM에서 memory를 할당하고, k_free()로 할당한 memory를 해제한 뒤 다시 할당할 수 있는지 확인합니다. 할당할 memory의 capability는 ESP_HEAP_MIN_EXTRAM_THRESHOLD가 결정합니다. Size가 threshold보다 작으면 internal DRAM에서, 크면 SPIRAM에서 memory를 할당합니다.

지원 SoC

현재 이 sample code는 다음 SoC를 지원합니다.

  • ESP32
  • ESP32-S2

Build와 실행

Board가 USB port에 연결되어 있는지 확인하십시오.

west build -b esp32_devkitc_wrover samples/boards/esp32/spiram_test
west flash

다른 지원 Espressif board를 사용한다면 위 명령의 board argument를 알맞은 이름으로 바꾸십시오. 예: esp32s2_saola.

Sample 출력

출력을 확인하려면 west espressif monitor 또는 minicom, PuTTY, screen 같은 serial console program을 실행합니다. 이 monitor 명령은 /dev/ttyUSB0를 자동 감지합니다.

$ west espressif monitor
mem test ok! 209
SPIRAM mem test pass
mem test ok! 194
Internal mem test pass

Source

출처

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