I seem to have run into a strange anomaly with ARM-Linux cross compilation on a Windows machine. I am using the Sourcery CodeBench Lite Edition (arm-none-linux-gnueabi-gcc) obtained from Mentor Graphic's website.
http://www.mentor.com/embedded-software/sourcery-tools/sourcery-codebench/editions/lite-edition/
Previously, I have built my code on a Ubuntu machine using an arm-linux compiler (sudo apt-get install g++-arm-linux-gnueabi -y || gcc-arm-linux-gnueabi). The tools work fine here, I can build object files and link them together no problem.
The problem is when I do the ARM-Linux cross compilation in Windows.. more specifically, the linking phase. Here is the linker command in my make file
%.elf: $(OBJ_C_OMAP)
@echo "linking to make ELF"
@echo $(OBJ_C_OMAP)
@echo "-------------------------------"
$(CC) $(CFLAGS) $(OBJ_C_OMAP) --output $@ $(LDFLAGS)
OBJ_C_OMAP contains a list of all the object files and their full paths, CFLAGS is a bunch of compiler flags and LDFLAGS is one linker flag. When it gets to this point the Linker churns through and it eventually throws out an error:
<full_path_to_an_object_file>: No such file or directory
When examining the <full_path_to_an_object_file> it seems there is a character missing. If i compare this string to what @echo $(OBJ_C_OMAP) gives us, there is a mis-match, the $(OBJ_C_OMAP) variable contains the correct path, but for whatever reason, the linker is mis-interperting it. As an example of what happens:
/ad2_ra/ap/modules/gps/gps_ubx_ucenter.o: No such file or directory
When the directory specified in $(OBJ_C_OMAP) shows
/ad2_raw/ap/modules/gps/gps_ubx_ucenter.o
In this example, the 'w' character is missing.
In addition to this strange behavior, if I remove this object file from the list, the problem persists on another .o file (another char removed from the path). It's as if there is some limitation on how many obj files I can pass in, once it reaches a certain # of obj files to pass in it starts removing characters from path and errors out.
This could be a bug or maybe some limitation in the Lite version of this compiler (which i'm using). Also note that I am linking quite a "few" objects (around ~66 files), I'm not sure if there are special considerations to be made when linking this many for this compiler.
Assistance appreciated, thanks