I am working on an automatic build and continuous integration environment for embedded C codebase. I am using Keil's Real View Compiler (windows executable) as the cross compiler, and am building the entire continuous integration environment using Cygwin.
Keil's documentation says if using Cygwin, one has to set CYGPATH environment variable appropriately for the the compiler (i.e. the windows executable) to understand the Cygwin paths for stuff like include files. (http://www.keil.com/support/man/docs/ARMINTRO/armintro_pge1362395716635.htm)
The makefile looks something like this:
INCLUDE_DIR=-I$(PATH_TO_KEIL)/MDK-Middleware \
-I$(PATH_TO_KEIL)/ARM
a.o : a.c
echo
echo Compiling $<....;
echo cc -c $(INCLUDE_DIR) -o a.o a.c ;
cc -c $(INCLUDE_DIR) -o a.o a.c ;
When I execute
$cc -c -I/cygdrive/c/Keil_v5/MDK-Middleware -I/cygdrive/c/Keil_v5/ARM -o a.o a.c
directly on the Cygwin terminal, the cross compilation takes place successfully.
However, despite defining PATH_TO_KEIL as /cygdrive/c/Keil_v5 ,when running the makefile compiler complains that it cannot find the include file.(i.e.the one present in /cygdrive/c/Keil_v5/ARM or C:\Keil_v5)
Also, if it helps, I have no problems running cross compiling if I give the relative path of the include file.