develop/optimizations/footprint.html · develop/optimizations/footprint.rst 공식 원문 ↗

Zephyr 3.7.0 · Develop · Optimizations

Footprint 최적화

기본 stack 크기와 사용하지 않는 기능을 검토해 application에 필요한 memory만 남깁니다.

Official pathdevelop/optimizations/footprint.html
Source filedevelop/optimizations/footprint.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

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

Part 1

요약·해설

다섯 가지 주요 stack Kconfig 기본값, 불필요한 GPIO·SPI와 debug option 비활성화, MPU/MMU 제거의 절감 효과와 보호 기능 손실을 함께 설명합니다.

Stack

ISR · main · idle · workqueue

Peripheral

GPIO · SPI configuration

Protection

MPU/MMU trade-off

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 9480206A27C7CED4C5473BC69A23732209656DD3A7D1271E541B2BFA7B27FDD8
.. _footprint:

Optimizing for Footprint
########################

Stack Sizes
***********

Stack sizes of various system threads are specified generously to allow for
usage in different scenarios on as many supported platforms as possible. You
should start the optimization process by reviewing all stack sizes and adjusting
them for your application:

:kconfig:option:`CONFIG_ISR_STACK_SIZE`
  Set to 2048 by default

:kconfig:option:`CONFIG_MAIN_STACK_SIZE`
  Set to 1024 by default

:kconfig:option:`CONFIG_IDLE_STACK_SIZE`
  Set to 320 by default

:kconfig:option:`CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE`
  Set to 1024 by default

:kconfig:option:`CONFIG_PRIVILEGED_STACK_SIZE`
  Set to 1024 by default, depends on userspace feature.


Unused Peripherals
******************

Some peripherals are enabled by default. You can disable unused
peripherals in your project configuration, for example::


        CONFIG_GPIO=n
        CONFIG_SPI=n

Various Debug/Informational Options
***********************************

The following options are enabled by default to provide more information about
the running application and to provide means for debugging and error handling:

:kconfig:option:`CONFIG_BOOT_BANNER`
  This option can be disabled to save a few bytes.

:kconfig:option:`CONFIG_DEBUG`
  This option can be disabled for production builds


MPU/MMU Support
***************

Depending on your application and platform needs, you can disable MPU/MMU
support to gain some memory and improve performance.  Consider the consequences
of this configuration choice though, because you'll lose advanced stack
checking and support.

Part 3

한국어 전문 번역

Footprint 최적화

Stack 크기

여러 system thread의 stack size는 가능한 많은 지원 platform과 다양한 사용 시나리오를 수용하도록 넉넉하게 지정되어 있습니다. 최적화를 시작할 때 모든 stack size를 검토하고 application에 맞게 조정해야 합니다.

CONFIG_ISR_STACK_SIZE
기본값은 2048입니다.
CONFIG_MAIN_STACK_SIZE
기본값은 1024입니다.
CONFIG_IDLE_STACK_SIZE
기본값은 320입니다.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE
기본값은 1024입니다.
CONFIG_PRIVILEGED_STACK_SIZE
기본값은 1024이며 userspace feature에 따라 달라집니다.

사용하지 않는 peripheral

일부 peripheral은 기본으로 활성화됩니다. 다음 예처럼 project configuration에서 사용하지 않는 peripheral을 비활성화할 수 있습니다.

CONFIG_GPIO=n
CONFIG_SPI=n

여러 debug·정보 option

실행 중인 application 정보를 더 제공하고 debug와 error handling 수단을 제공하기 위해 다음 option이 기본으로 활성화됩니다.

CONFIG_BOOT_BANNER
몇 byte를 절약하려면 비활성화할 수 있습니다.
CONFIG_DEBUG
Production build에서는 비활성화할 수 있습니다.

MPU/MMU 지원

Application과 platform 요구 사항에 따라 MPU/MMU 지원을 비활성화하면 일부 memory를 확보하고 성능을 높일 수 있습니다. 하지만 고급 stack 검사와 보호 기능을 잃게 되므로 이 configuration 선택의 결과를 신중히 고려하십시오.

Source

출처

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