The compiler switches -I and -J control the searching order for header files. In ADS, "-I- and "-J-" were used to force the searching of the "in-memory file system" (where the ARM-supplied standard C \include header files were built-into the compiler). These allowed you to specify e.g. "armcc -J special_dir -J-", to force the compiler to search "special_dir" before the "in-memory file system". The "in-memory file system" was a part of the old ADS compiler front-end, but is no longer present in the new RVCT 2.0 front-end. In RVCT 2.0, use of "-I- or "-J-" now results in the compiler reporting: "Fatal error: C3465E: The in-memory file system is obsolete, use the normal include mechanisms". To convert your ADS makefiles or build scripts to work with RVCT 2.0, you will need to remove any occurences of "-I- or "-J-" and replace them with "-Idir or "-Jdir" as described in the RVCT 2.0 Compiler and Libraries Guide, section 2.2.2, "Included files". For application header files (#include "file.h"), the Idirs are searched first then Jdirs (and then RVCT20INC or ARMINC if set). For system header files (#include <file.h>), the Jdirs are searched first (then RVCT20INC or ARMINC if set) then Idirs. If you need to replace the ARM-supplied system header files (e.g. <stdio.h>) with your own, and force the compiler to search your own include directories before the ADS-supplied \include directories, then compile using -I and -J on the command-line like this (for Windows): -I"path to your application (double quote) headers" -J"path to your system (angle bracket) headers,%RVCT20INC%" For Unix, replace %RVCT20INC% with $RVCT20INC. If your application headers and system headers are in the same directory, then you can use just -J on its own like: -J"c:\myinclude,%RVCT20INC%" Note that the environment variable RVCT20INC is, by default, a path containing spaces (e.g. C:\Program Files\ARM\RVCT\Data\..), so needs to be enclosed within double quotes. RVCT 2.0 provides a new feature - 'Precompiled header files' which offers similar speed benefits to the old "in-memory file system". When compiling single source files with the --pch option, header files are only compiled once. Subsequent compilations are then performed faster by using the precompiled files. Please see Section 2.2.2 and Section 2.2.3 of the RVCT 2.0 Compiler and Libraries Guide for more information.
|