6

I am working on IAR project, and my problem is which file in an IAR project can be ignored by git repository. All the project setting files and source files mixed together in git log is veeery boring and is not good for version control, could anyone give a good suggestion?

Thanks a million.

roMoon
  • 339
  • 1
  • 5
  • 12

2 Answers2

7

I would not recommend putting any compiled binaries under source control. Here is guidance directly from IAR: Technical Note "IAR Embedded Workbench files to be version controlled"

This is not a comprehensive list, but below are some extensions which I have come across, and placed inside .gitignore (I have multiple IAR projects in the same repo, so I need to use the ** wildcard). Also, be sure to use the regular C/C++ ignore extensions, as well.

# IAR Settings  
**/settings/*.crun  
**/settings/*.dbgdt  
**/settings/*.cspy  
**/settings/*.cspy.*  
**/settings/*.xcl  
**/settings/*.dni  
**/settings/*.wsdt  
**/settings/*.wspos  

# IAR Debug Exe  
**/Exe/*.sim  

# IAR Debug Obj  
**/Obj/*.pbd  
**/Obj/*.pbd.*  
**/Obj/*.pbi  
**/Obj/*.pbi.*  
Blue
  • 820
  • 4
  • 17
skobovm
  • 186
  • 1
  • 6
5

I typically ignore all files except the *.ewp and *.eww files. The ewp file contains all the information to compile your project, and all the associated files with it are for things like debugger settings (which you may want, I believe it is the ewd file) and the parsing database (for "go to definition" links). I keep the eww file in version control because I typically have multiple projects as a part of a workspace, and I use the batch builds feature, all of which is stored in the workspace file. The other files associated with a workspace contain information about the sizing of windows and are not required.

Also stored relative to the project file are the outputs. I typically version control the *.out file, as it will have debug information, along with any other formats used (srecord, binary, Intel hex), all by default in the configurations Exe directory. I also control the *.map file, which is optionally generated and found by default in the configurations Lst directory. Between the out file and map file, this gives you what you need to debug an issue with a probe (out file combined with source), or if you have the provisions, by accessing memory (map file to know where your data is stored).

rjp
  • 1,760
  • 13
  • 15