We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there
I'm new to the uVision environment and having some trouble with it. I hope someone can help. I'm working with a FX2 USB chip from Cypress and have downloaded a sample project from Cypress for uVision. I startet working with uVision 2 firstly but decided to upgrade to uVision 5 and buyed the compiler C51.
Compiling the sample project is done without any errors. But if I add an existing C file to the project, uVision does not find the header files which are included in this specific C file. Even adding the include paths to the project options does not help. The header files are located in the same folder as the C file is located. The funny thing is: some of the C files from the sample project uses the same header files as it is used in the C file I just added. But there is no problem in finding them.
Is there a way to tell uVision where to find this header files? What am I doing wrong?
The C file uses "" around the name to include the header file. Since other C files also use some of the same header files and are located in the same ./Source folder, there should be no problem with including them. I think this is a linker problem oder some kind of project setup problem.
The linker isn't involved in any use of header files.
Have you been editing the compilation options for this specific C file, or are all options specified on the project level?
Can you manage to produce a traditional Makefile, so you can visually see if there would be any difference in compiler options when processing this specific C file?
I've tried both: First I made the compilations options on project level. But I also tried to make the options for the specific C file. None of them worked.
As far as I know, uVision is not able to generate make files. I only have the option to generate a map file, but you don't see any information about the copiler settings for the C files in the project
These links might be relevant when looking for build differences between the different source files: http://www.keil.com/support/docs/868.htm http://www.keil.com/support/docs/2594.htm
I just discovered a new effect: I have removed the C file from the project and also deleted the C file in the source folder. My idea was to create the file from scratch, to resolve the problem with the included header files. But now, when I reopen the uVision project, add a new C file and name it exactly the same as it was named before, uVision automatically includes the header files in the project view. But there is not a single line written in the new C file. Is this a bug in uVision?
When building the source file, uVision detects include files and can - depending on configuration - show these include files in the project tree as childs to the individual C files.
But when you build, Keil should be able to update these dependencies to match the actual include files used.