스타트업 코드 삭제

기술노트 13062

아키텍처:

All

컴포넌트:

linker

업데이트:

2018-02-28 오전 2:53

Introduction

The application consists of two IAR Embedded Workbench projects, where the 1st project is linking the 2nd application as a binary image.

Issue

The startup code of the 2nd application is also included in the binary image. The issue is to reduce the size of the linked output. Only the startup code of the main project is needed, as it is in the 1st application execution starts.

Wanted behavior

Get the unwanted startup code of the 2nd project removed from the binary image.

Suggestion

By default, the label where the linker starts checking which symbols that are needed is __iar_program_start, (that is, the beginning of the startup code).

Override the default behavior by specifying your own entry symbol in the project options, for example:

  • IAR Embedded Workbench for AVR:
    Options > Linker > Config > Override default program entry > Entry symbol
  • IAR Embedded Workbench for ARM:
    Options > Linker > Library > Override default program entry > Entry symbol

Example for ARM

There exists an example project. Go to Technical Note 28924 and check the project 'Common', in which there is an override of the 'Entry symbol'. (And it specifies a function that do not contain any functionality.)

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.