CW10 + HCS08 + file not found

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CW10 + HCS08 + file not found

ソリューションへジャンプ
2,548件の閲覧回数
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

ラベル(1)
0 件の賞賛
1 解決策
849件の閲覧回数
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 件の賞賛
4 返答(返信)
849件の閲覧回数
Geoff_L
Contributor I

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

0 件の賞賛
849件の閲覧回数
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 件の賞賛
850件の閲覧回数
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 件の賞賛
849件の閲覧回数
ssinfod
Contributor IV

Thanks both solutions work fine.

 

ssinfod.

 

0 件の賞賛