samples/subsys/fs/format/README.html · samples/subsys/fs/format/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · File Systems · Format

File system format

Flash·RAM disk별 configuration으로 file system format을 확인합니다.

Official pathsamples/subsys/fs/format/README.html
Source filesamples/subsys/fs/format/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

두 scenario의 board·configuration·build command와 성공 출력을 보존합니다.

Flash

littleFS · nRF52 DK

RAM disk

FAT · MIMXRT1064-EVK

Result

Format successful

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 C3B3FA6EE82F96DEF98298375B9883FEEC966A28A197E3DD87230B069C9F9FE6
.. zephyr:code-sample:: fs-format
   :name: Format filesystem
   :relevant-api: file_system_api

   Format different storage devices for different file systems.

Overview
***********

This sample shows how to format different storage
devices for different file systems. There are 2 scenarios prepared for this
sample:

* littleFS on flash device
* FAT file system on RAM disk

Building and running
********************

To run this sample, build it for the desired board and scenario and flash it.

The Flash scenario is supported on the nrf52dk/nrf52832 board.
The RAM disk scenario is supported on the mimxrt1064_evk board.
To build the RAM disk sample, the configuration `prj_ram.conf` needs to be used by setting `CONF_FILE=prj_ram.conf`.

The Flash sample for the nrf 52DK board can be build as follow:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/fs/format
   :board: nrf52dk/nrf52832
   :goals: build flash
   :compact:

The RAM disk sample for the MIMXRT1064-EVK board can be build as follow:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/fs/format
   :board: mimxrt1064_evk
   :conf: "prj_ram.conf"
   :goals: build flash
   :compact:

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

When the sample runs successfully you should see following message on the screen:
.. code-block:: console

  I: LittleFS version 2.4, disk version 2.0
  I: FS at flash-controller@4001e000:0x7a000 is 6 0x1000-byte blocks with 512 cycle
  I: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
  I: Format successful

Part 3

한국어 전문 번역

개요

서로 다른 file system에 맞게 여러 storage device를 format하는 방법을 보여 주는 sample입니다. 준비된 scenario는 flash device의 littleFS와 RAM disk의 FAT file system 두 가지입니다.

빌드 및 실행

원하는 board와 scenario를 선택해 sample을 build한 뒤 flash합니다. Flash scenario는 nrf52dk/nrf52832, RAM disk scenario는 mimxrt1064_evk에서 지원됩니다.

RAM disk sample은 CONF_FILE=prj_ram.conf를 설정해 prj_ram.conf configuration을 사용해야 합니다.

nRF52 DK의 flash sample은 다음과 같이 build하고 flash합니다.

west build -b nrf52dk/nrf52832 samples/subsys/fs/format
west flash

MIMXRT1064-EVK의 RAM disk sample은 다음과 같이 별도 configuration을 넘겨 build하고 flash합니다.

west build -b mimxrt1064_evk samples/subsys/fs/format -- -DCONF_FILE="prj_ram.conf"
west flash

Sample 출력

Sample이 성공적으로 실행되면 LittleFS·disk version, flash 영역과 block 크기, read·program·cache·lookahead 크기를 표시한 뒤 format 성공을 알립니다. 공식 원문에서 이 부분은 directive 앞의 빈 줄이 빠져 일반 인용문으로 렌더링되므로, 줄 내용은 다음과 같이 그대로 보존합니다.

I: LittleFS version 2.4, disk version 2.0
I: FS at flash-controller@4001e000:0x7a000 is 6 0x1000-byte blocks with 512 cycle
I: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
I: Format successful

Source

출처

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