Custom Build 작업 및 프로젝트 Clean

기술노트 83760

아키텍처:

All

컴포넌트:

IDE

업데이트:

2018-02-28 오전 2:38

Introduction

In a project using Custom Build, Custom Build actions may be done too late (or too early) after

Project -> Clean

has been done. The diagnostic message seen can be:

Fatal Error[Pe1696]: cannot open source file

Is this my issue?

Please try

• Project -> Clean
• Project -> Rebuild all

 IF your custom build actions appear too late in the build log, possibly together with

Fatal Error[Pe1696]: cannot open source file [...]

it is likely that you have this problem. You may need to change message filtering level (Tools -> Options) to see custom build actions in the build log.

Possible solution (From IarIdePm.exe version 7.1.5)

Use "Run this tool before all other tools" as illustrated in screen dump.

Possible solution (From IarIdePm.exe version 6.6)

Choose file names to get appropriate sort order, for example

  1. __custom_build_early.cfg
  2. depends_on_custom_build_early.c

Possible solution (older versions of IarIdePm.exe)

Solution 1

Avoid

Project -> Clean

(In most cases, with or without Custom Build actions

Project - > Rebuild all

should be enough. )

Solution 2

After

Project - > Clean

do

Project - > Make

until the dependency file (extension .dep) has been properly reconstructed. Twice should be enough in most cases (complex projects with multiple levels of custom build action dependencies may require more).

Example (IAR Embedded Workbench for ARM version 6.60)

Using the example project Example TN83760.zip:

  • Load workspace
Project -> Clean
Project -> Make

      __CustomBuild.h OK (created before it is needed)

     zzCustomBuild.h reported missing (created too late)

Project -> Make

     __CustomBuild and zzCustomBuild both OK
     Dependencies reconstructed.

Notes

  • The consequence of
  • Project -> Clean

     is that the dependency file (extension .dep) is cleared. When starting from scratch, dependencies are built incrementally.

  • Project -> Rebuild all
    does NOT clear the dependency file.
  • You may want to check the screen dump CustomBuild.png (in the zip-file) and/or
  • Project -> Options -> Custom build

     in the example project for details of the trivial Custom Build action used.

  • IAR internal references 399247s_IAR, IDE-1734

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

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