Hello, For me, it's still not clear why the include files (.h) are treated in such a cumbersome way in the uVision2 Project philosophy. When you have a project and you create a group -for instance- called 'Header files' then you have to specify that those files are Text documents to be able to add it to your project. The file types in the file open dialog box do not contain something separate for .h files, whereas this is the case for e.g. .c, .a* and .src files. Could someone explain me why is this? Wouldn't it be more logic, user-friendly and convenient if the .h-files would be treated the same way as .c- or .a51-files? Rgds, Geert
For a start, there is no need to add header files to your project; you only need to add files which are used directly by the build tools (Compiler, Assembler, Linker). You can open a header file by just right-clicking its name in the #include line and choosing 'Open Document' However, if you do want header files to be treated as 'C' source, just go to Project/File Extensions, Books and Environment, and add "*.h" to the list for 'C Source File' Remember: if you do this and add your header files to your project, you must clear the 'Include in Target Build' option for the file and/or the group. I usually add the following filetypes: C Source *.h; *.i Document *.lst; *.map; *.m51
"You can open a header file by just right-clicking its name in the #include line and choosing 'Open Document'" Unfortunately, uVision doesn't use the Include Path for this facility - so it doesn't work if the .h file is not in the same folder as the .c file. :-( NEIDE (Not Entirely Integrated Development Environment).
View all questions in Keil forum