cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

Anonymous
Not applicable

 Hello Everyone,

   

I have tried adding the delay.h and delay.asm files to my project but when i try to include delay.h and use the commands and build my project I receive the error "cannot include source file "delay.h"; file not found"  I've tried following the steps from the followng page 

   

http://www.cypress.com/?id=4&rID=47960

   

but I am still having no luck.  Can someone help me?

   

 

   

Sincerely,

   

Mikey the D

0 Likes
Reply
6 Replies
JoMe_264151
Expert II

Did you copy both files to your project folder where main.c is?

   

Did you add the file to the project files?

   

 

   

Bob

0 Likes
Reply
ETRO_SSN583
Esteemed Contributor

If you do not put the files in default root project directory you can, in project settings,

   

add search path to compiler and linker to inform them of location.

   

 

   

Regards, Dana.

0 Likes
Reply
JoMe_264151
Expert II

In workspace explorer you have to right-click on Source or Header-Files and select the files to include. That should do the job

   

 

   

Bob

0 Likes
Reply
Anonymous
Not applicable

I had to put the files into the project file and not in the original folder that the Project >> Add File directed me to.

   

 

   

Thanks everyone I appreciate the help.

   

 

   

Sincerely,

   

Mike

0 Likes
Reply
Anonymous
Not applicable

Bob, I understand the add file method, but thought one can inform the

   

linker with an additional search path in settings to pick up anything in that

   

path. I tried that, does not seem to work ? Like in a case where one has to

   

add a lot of files, tedious to do it using "add".

   

 

   

Regards, Dana.

0 Likes
Reply
JoMe_264151
Expert II

The linker does not work with your sources, but the debugger does. The project file has got the information which files (including path) participate on the project. The fact that a file resides in a folder that is declared as to be searched for files does not work for every step of the complete code-generation.

   

I would suggest to trust in the Workspace Explorer's listing which shows all the project files known and to add all new files exactly at this place. Problems can arise when the file lies not within the project path (or even on a network) since the linker has to be informed where the output file of the compile-step lies. That is the reason wy I usually copy those files althoug this is not very helpful for building up a common codebase.

   

 

   

Bob

0 Likes
Reply