CW10 + HCS08 + file not found

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

CW10 + HCS08 + file not found

Jump to solution
2,938 Views
ssinfod
Contributor IV

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

Labels (1)
0 Kudos
Reply
1 Solution
1,239 Views
CompilerGuru
NXP Employee
NXP Employee

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

View solution in original post

0 Kudos
Reply
4 Replies
1,239 Views
Geoff_L
Contributor I

Are you sure that it isn't <hidef.h> or "derivative.h" that it can't find?

0 Kudos
Reply
1,239 Views
ssinfod
Contributor IV

 

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

0 Kudos
Reply
1,240 Views
CompilerGuru
NXP Employee
NXP Employee

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

0 Kudos
Reply
1,239 Views
ssinfod
Contributor IV

Thanks both solutions work fine.

 

ssinfod.

 

0 Kudos
Reply