명령 줄에서 빌드

기술노트 47884

아키텍처:

All

컴포넌트:

general

업데이트:

2018-02-28 오전 2:34

Introduction

This Technical Note might be helpful if you are looking for way to build your project outside the IAR Embedded Workbench IDE.

The alternatives below are exemplified for IAR Embedded Workbench for ARM, but can be easily be modified for another 'tool chain'.


Alternative 1 - run IarBuild.exe from the command line

If you have a project file named test.ewp with a configuration named Debug , the following command line can be used to build the project:

<installation dir>\common\bin\IarBuild.exe test.ewp Debug

Note: run IarBuild.exe without parameters to get Usage information

To re-build use the following command line (extended with an option to get logging of all compiler messages):

<installation dir>\common\bin\IarBuild.exe test.ewp -build Debug -log all

... which corresponds to ...

<installation dir>\common\bin\IarBuild.exe test.ewp -clean Debug -log all
<installation dir>\common\bin\IarBuild.exe test.ewp -make Debug -log all

 

Alternative 2 - run compiler and linker from the command line

You can run all .exe files in the <installation directory>\arm\bin folder from the command line. Run each of them, e.g. iccarm.exe, without parameters to get a list of available command line options.

You can make a .bat file that compiles each source file one-by-one if you know the command line parameters.

To see the command line parameters, enable the option IAR Embedded Workbench IDE > Tools > Options... > IDE Options > Messages > Show build messages > select 'All'.

To make a .bat file compiling one source file, enter the full path to iccarm.exe followed by the parameters (copy from the build window) using the format:

<installation dir>\arm\bin\iccarm.exe <source-file> <options>

When you get the command line working for one source file, you can add more command lines for the remaining source files.

If you want to invoke ilinkarm too, you can use the option -f <file> , for example

<installation dir>\arm\bin\ilinkarm.exe -f options.xcl

and in the file options.xcl put all the parameters from the build window (put the parameters on separate lines).

 

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

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