How to "Exclude from Build" header files

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to "Exclude from Build" header files

Jump to solution
3,924 Views
mevon
Contributor II

Hello,

 

I' ve been trying to use KDS to build a project I had working on CW_IDE 10.6 and straight import to KDS doesn't work without includes missinge from the CW_IDE project. Now, I'm trying to rebuild my project from scratch in the KDS ide but I have some ProcessorExpert files generated that I need to "Exclude from Build" in the resources and supply my own modified version in the Sources folder. In CW I had no trouble managing which files to exclude from the build in the Project Navigator panel now in KDS seems its whole other ball game. Can somebody tell why I cannot "Exclude from Build" header files (.h) but I can with code files (.c)? Or is there a way to exclude the headers like in CodeWarrior?

 

Thanks in advance,

Mike

Labels (1)
0 Kudos
1 Solution
2,180 Views
BlackNight
NXP Employee
NXP Employee

Hi Mike,

Both KDS and CodeWarrior are using GNU gcc, so there is no difference. So if you have your own header file, and you need that included instead the one generated, then I suggest you change the order of the include directores in the compiler folder, so it uses your other path first?

Erich

View solution in original post

0 Kudos
4 Replies
2,180 Views
BlackNight
NXP Employee
NXP Employee

It is the same for all Eclipse. It is just that CodeWarrior implemented an extension that you have these check marks in the project view. But the underlying system is all the same.

See http://mcuoneclipse.com/2014/07/22/exclude-source-files-from-build-in-eclipse/

It covers as well the aspects of header files (which I think you do not want to exclude file by file?).

I hope this helps,

Erich

0 Kudos
2,180 Views
mevon
Contributor II

Hello Erich,

Thanks again for the help. As I stated, the header file is generated by ProcessorExpert and is generated each time I regenerate PEx components. It makes sens to exclude from the build header files if you find an error in a PEx component and you want to supply your own header in Sources folder to replace the faulty one. Please refer to this http://mcuoneclipse.com/2013/07/10/usb-msd-host-for-the-frdm-k20d50m-board/ and go to comment made on June 5 2014. You are right, it's some kind of "hacking" that was possible with CodeWarrior and now is impossible with KDS but I guess I have to wait for the Component suppllier to address this bug (wink wink)... or go back to CodeWarrior. I guess I have to ask Freescale to if they ever tried to overclock their Cpu component and if it ever worked for them too.

Mike

0 Kudos
2,181 Views
BlackNight
NXP Employee
NXP Employee

Hi Mike,

Both KDS and CodeWarrior are using GNU gcc, so there is no difference. So if you have your own header file, and you need that included instead the one generated, then I suggest you change the order of the include directores in the compiler folder, so it uses your other path first?

Erich

0 Kudos
2,180 Views
mevon
Contributor II

Hey Erich,

Thanks for bringing me back on the right path, I will try that for sure! Maybe I'll even create a folder just for headers that will be in the top of the list.

Thank you very much!

Mike

0 Kudos