How to "Exclude from Build" header files

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to "Exclude from Build" header files

跳至解决方案
3,983 次查看
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

标签 (1)
0 项奖励
1 解答
2,239 次查看
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 项奖励
4 回复数
2,239 次查看
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 项奖励
2,239 次查看
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 项奖励
2,240 次查看
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 项奖励
2,239 次查看
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 项奖励