Avoiding full path(s) in the output file

Technical Note 59374

Targets:
All

Component:
General

Updated:
1/27/2015 2:18 PM

Introduction

The output file contain full paths to source files. This is not wanted behaviour.

Comments

The typical reason for this problem is that the application uses the assert macro which in turn uses the macro __FILE__ which expands to the full path of the current file.

Suggestions

  • Avoid Assert - By using conditional compilation, assert-messages can be avoided.
    The file "\arm\inc\c\assert.h" uses this construction to avoid assert-messages to be built into the output file/image:
  •  #ifdef NDEBUG
    #define assert(test) ((void)0)
  • Exclude path in macros - This can be done by using the command line option :
    --no_path_in_file_macros
    Add it to "Project > Options > C/C++ Compiler > Extra Options".


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

Related Tech Notes

© IAR Systems 1995-2016 - All rights reserved.