Hello,
I just installed CW10 for Microcontroller (HCS08).
I created a project with the wizard and the basic generated code works fine.
Anyhow, now I want to use a simple header (.h) and source(.c) files. When I try to compile, I have the error message : C5200 file not found.
My project is very simple. I only include the file "f.h" in the main.
FILE main.c :
#include <hidef.h> /* for EnableInterrupts macro */#include "derivative.h" /* include peripheral declarations */#include "f.h"void main(void) { EnableInterrupts; /* include your code here */ for(;;) { __RESET_WATCHDOG(); /* feeds the dog */ } /* loop forever */ /* please make sure that you never leave main */}
The file f.h and f.c only have a simple function which does a basic addition.
int fxx(int x){ return x;}
What is wrong with this code ?
Ican see the file in the IDE under the Sources directory but it seems CW10 (Eclipse) needs more information.
How do you add a simple header/source file in CW10 ?
Thanks for your time
ssinfod
解決済! 解決策の投稿を見る。
The compiler include path only contains Project_Headers, but not the sources folder.
Therefore either move the header file into Project_Headers or add an include path to the Source folder.
The include paths for the compiler are defined in the properties of the project,
"C/C++ Build/Settings" Tab, select "HCS08 Compiler/Input" click on the "+" Button in Include File Path (-I) box
and add "${ProjDirPath}/Sources"
Daniel
Are you sure that it isn't <hidef.h> or "derivative.h" that it can't find?
No it says "f.h" file not found.
Here is a copy of the message.
C5200 f.h file not found main.c Test/Sources line 4 C/C++ Problem
I have attached the project with this post.
Thanks !
ssinfod
The compiler include path only contains Project_Headers, but not the sources folder.
Therefore either move the header file into Project_Headers or add an include path to the Source folder.
The include paths for the compiler are defined in the properties of the project,
"C/C++ Build/Settings" Tab, select "HCS08 Compiler/Input" click on the "+" Button in Include File Path (-I) box
and add "${ProjDirPath}/Sources"
Daniel
Thanks both solutions work fine.
ssinfod.