Gmake错误,但仅限于某些Windows计算机上

时间:2016-03-03 20:30:01

标签: gnu-make

使用gmake在Windows中运行makefile时出现以下错误。 它只发生在组中5台PC上 - 其他4台运行完美,而且没有找到"#34;肯定是在文件系统中 - 我可以使用相同的路径从命令行运行汇编,它工作正常。

C:\ Eclipse \ tools \ gmake \ gmake.exe BUILD_TYPE = RAM all

07:43:14 **** Build of configuration Debug for project U500 ****
"C:\\Eclipse\\tools\\gmake\\gmake.exe" BUILD_TYPE=RAM all 
mkdir -p "object_flash" 
mkdir -p "object" 
mkdir -p "../TSP for iNav/Builds/iNav RAM/output"
mkdir -p "../TSP for iNav/Builds/Flash Release/output"
AS object/CpuCore.o
here is the curdir C:/work/Insulet/PhoenixII/robert_test_workspace/U500/Debug
C:/Eclipse/tools/codesourcery_arm_3.4.2/bin/arm-none-eabi-as -o object/CpuCore.o -gdwarf2 -meabi=4 -I"../../source/CPU" ../../source/CPU/CpuCore.s
Assembler messages:
**Can't open ../../source/CPU/CpuCore.s
for reading: Invalid argument**

makefile是(查找导致问题的规则的####)

====

ifeq ($(BUILD_TYPE),RAM)
BUILDDIR = ../TSP for iNav/Builds/iNav RAM
MAPFILE = iNav_RAM.map
LDFILE = iNav_RAM.ld
IMGNAME = iNav_RAM.elf
DEBUGFLAGS = -DDEBUG_DEVELOPMENT_MODE
OBJDIR = ./object
DRIVERDIR =objects/ ``
#UT_OBJECTS = UnitTest.o
else 
ifeq ($(BUILD_TYPE),FLASH)
BUILDDIR = ../TSP for iNav/Builds/FLASH Release
MAPFILE = FLASH_Release.map
LDFILE = FLASH_Release.ld
IMGNAME = FLASH_Release.elf
#POSTPROCESSING = sh -c 'pushd ../TSP\ for\ iNav/Batch\ Files/;\
                        cmd.exe /c "ProcessFlashReleaseImage.bat";\
                        popd'
#POSTPROCESSING = sh -c '$(OBJCOPY) -R .lcdmem -O binary -S $(IMG) $(APP_FLASH_IMG)'
#
#                       copy /b $(APP_FLASH_IMG) + $(UPGRADER_IMG)  $(COMBINED_FLASH_IMG);\
#                       ../TSP\ for\ iNav/Build\ Tools/ProcessImage_iNavMainApp $(COMBINED_FLASH_IMG)'
APP_FLASH_IMG = "$(BUILDDIR)/Output/Pre_FLASH_Release.bin"
UPGRADER_IMG = "../TSP for iNav/UpgraderBin/Upgrader.bin"
COMBINED_FLASH_IMG = "$(BUILDDIR)/Output/FLASH_Release.bin"
OBJDIR = ./object_flash
OBJDIR1 = .\objects
#DEBUGFLAGS = -D__CSURF__
else
#This is to build the boot ROM
ifeq ($(BUILD_TYPE),FLASH_BOOT)
#### mods for boot flash needed
BUILDDIR = ../TSP for iNav/Builds/iNav Flash Boot
MAPFILE = BOOT_FLASH_Release.map
LDFILE = BOOT_FLASH_Release.ld
IMGNAME = BOOT_FLASH_Release.elf
#POSTPROCESSING = sh -c 'pushd ../TSP\ for\ iNav/Batch\ Files/;\
                        cmd.exe /c "ProcessFlashReleaseImage.bat";\
                        popd'
#POSTPROCESSING = sh -c '$(OBJCOPY) -R .lcdmem -O binary -S $(IMG) $(APP_FLASH_IMG)'
#
#                       copy /b $(APP_FLASH_IMG) + $(UPGRADER_IMG)  $(COMBINED_FLASH_IMG);\
#                       ../TSP\ for\ iNav/Build\ Tools/ProcessImage_iNavMainApp $(COMBINED_FLASH_IMG)'
APP_FLASH_IMG = "$(BUILDDIR)/Output/Pre_FLASH_Release.bin"
UPGRADER_IMG = "../TSP for iNav/UpgraderBin/Upgrader.bin"
COMBINED_FLASH_IMG = "$(BUILDDIR)/Output/FLASH_Release.bin"
OBJDIR = ./object_flash
OBJDIR1 = .\objects
else
error:
    @echo 'invalid build type: $(BUILD_TYPE)'
endif
endif
endif
IMG = "$(BUILDDIR)/Output/$(IMGNAME)"

#export C_COLON = /c
export C_COLON = /cygdrive/c
#export TOOL_LOCATION = $(C_COLON)/mgc/embedded/tools/codesourcery_arm_3.4.2/bin
export TOOL_LOCATION = C:/Eclipse/tools/codesourcery_arm_3.4.2/bin
export CC = $(TOOL_LOCATION)/arm-none-eabi-gcc
export AS = $(TOOL_LOCATION)/arm-none-eabi-as
export LD = $(TOOL_LOCATION)/arm-none-eabi-ld
export AR = $(TOOL_LOCATION)/arm-none-eabi-ar
export OBJCOPY = $(TOOL_LOCATION)/arm-none-eabi-objcopy
export RM = rm -f
export CP = cp


INCLUDDIRS = -I"../../source" -I"../../source/Drivers" -I"../../source/CPU" -I"../../source/smx/XFD" -I"../../source/smx/XFS" -I"../../source/smx/xusbd" -I"../../source/smx/xusbd/Core" -I"../../source/smx/xusbd/DCD" -I"../../source/smx/xusbd/Function" -I"."
CFLAGS = $(DEBUGFLAGS) -gdwarf-2 -mcpu=arm9 -fno-short-enums -fno-zero-initialized-in-bss -fsigned-char $(INCLUDDIRS) -Wall -Wno-missing-braces $(EXTRA_CFLAGS)
LDLIBS = --start-group  "./TSP_for_iNav/CSL-ARM-GNU-Debug/Output/TSP_for_iNav.lib" "../TSP for iNav/GNU Libraries/libgcc.a" "../TSP for iNav/GNU Libraries/libc.a" --end-group
MAP = "$(BUILDDIR)/Output/$(MAPFILE)"
LINKSCRIPT = "./TSP_for_iNav/src/csgnu_arm/$(LDFILE)"
LDFLAGS = -Map $(MAP) -T$(LINKSCRIPT)

_APP_OBJECTS = alarm.o SdDiag.o alarm_repair.o beep.o cgmLog.o comm.o cond_state.o confirm.o confirm_calc.o confirm_pump.o conversion.o critical.o cursor_list.o diag.o display.o eeprom.o entry.o entry_bg.o font.o fooddb.o graph.o h_main.o handlers.o history.o history_page.o icons.o language.o language_Compiler_verify.o lcd.o list.o log.o logs.o mainloop.o menu.o pending.o prog_view.o pump.o pump_alert.o pump_cmd.o pumpmfg.o pumpverify.o queue.o ram.o rtc.o sched.o screen.o serial.o state.o state_alert.o state_bg_setup.o state_bgmeter.o state_bkgd_ck.o state_cgm.o state_comm.o state_fooddb.o state_presets.o state_sw.o suggbol.o suggbol_hist.o swtimer.o usb.o view.o view_bg.o
#APP_OBJECTS = $(patsubst %,$(OBJDIR)/%,$(_APP_OBJECTS))
APP_OBJECTS = $(addprefix $(OBJDIR)/,$(_APP_OBJECTS))
_DRIVER_OBJECTS = BGBoard.o BGMeter.o Flash.o init_lcd.o Interrupt.o MX21Config.o MX21_RTC.o MicroManager.o crc16-123.o eNavCGM.o gpio.o h_diag.o h_eeprom.o h_icons.o h_lcd.o h_rtc.o h_sys.o h_usb.o h_usbevt.o h_usbints.o h_usbos.o h_usbotg.o h_usbphy.o h_usbregs.o h_usbtrace.o hwTimer.o i2c.o key.o pwm.o rf.o secui.o spi.o super.o trans.o uart.o wdog.o
DRIVER_OBJECTS =$(addprefix $(OBJDIR)/,$(_DRIVER_OBJECTS))
_CPU_OBJECTS = AITC.o RunTimeInit.o
CPU_OBJECTS =$(addprefix $(OBJDIR)/,$(_CPU_OBJECTS))
_USB_OBJECTS = norfd.o norio_insulet.o fapi.o fcache.o fdnor.o fdram.o fdwin.o ffind.o fmount.o fpath.o fport.o funicode.o udhdw.o udinit.o uddcd.o uddevice.o udep0.o udfunc.o udutil.o udmx21.o udcompos.o udftempl.o udmouse.o udmstor.o udserial.o
USB_OBJECTS =$(addprefix $(OBJDIR)/,$(_USB_OBJECTS))
_ASM_OBJECTS = CpuCore.o CpuException.o
ASM_OBJECTS =$(addprefix $(OBJDIR)/,$(_ASM_OBJECTS))
OBJECTS = $(APP_OBJECTS) $(DRIVER_OBJECTS) $(CPU_OBJECTS) $(USB_OBJECTS) $(ASM_OBJECTS)
ARCHIVES = app.a Drivers.a CPU.a smx.a




.PHONY: all clean img TSP_lib

all: img

-include $(OBJECTS:.o=.d)

img: $(ASM_OBJECTS) $(ARCHIVES) TSP_lib
    @echo LD $@
    $(LD) -o $(IMG) $(ASM_OBJECTS) $(ARCHIVES) $(LDLIBS) $(LDFLAGS)
#   $(POSTPROCESSING)
#   @../TSP\ for\ iNav/Batch\ Files/ProcessFlashReleaseImage.bat

TSP_lib:
    $(MAKE) -C "./TSP_for_iNav"

app.a: $(APP_OBJECTS)
    @echo AR $@
    $(AR) rc $@ $(APP_OBJECTS)

Drivers.a: $(DRIVER_OBJECTS)
    @echo AR $@
    $(AR) rc $@ $(DRIVER_OBJECTS)

CPU.a: $(CPU_OBJECTS)
    @echo AR $@
    $(AR) rc $@ $(CPU_OBJECTS)

smx.a: $(USB_OBJECTS)
    @echo AR $@
    $(AR) rc $@ $(USB_OBJECTS)
########### rule causing problems ###########
$(OBJDIR)/CpuCore.o: ../../source/CPU/CpuCore.s
    -mkdir -p "object_flash" 
    -mkdir -p "object" 
    -mkdir -p "../TSP for iNav/Builds/iNav RAM/output"
    -mkdir -p "../TSP for iNav/Builds/Flash Release/output"
    @echo AS $@
    @echo here is the curdir ${CURDIR} 
    $(AS) -o $@ -gdwarf2 -meabi=4 -I"../../source/CPU" $<

$(OBJDIR)/CpuException.o: ../../source/CPU/CpuException.s
    @echo AS $@
    $(AS) -o $@ -gdwarf2 -meabi=4 -I"../../source/CPU" $<

lcd.o: lcd.c
    @echo CC $@
    $(CC) $(CFLAGS) -O3 -c -o $@ $<
#$(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/drivers/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/drivers/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/CPU/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/XFD/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/XFS/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/xusbd/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/xusbd/core/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/xusbd/DCD/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

$(OBJDIR)/%.o: ../../source/SMX/xusbd/Function/%.c
    @echo CC $@
    $(CC) $(CFLAGS) -c -o $@ $<
#   $(CC) -MM -MT '$(@:.o=.d) $@' $(CFLAGS) $< > $(<:.c=.d)

clean:
    @echo CLEAN
    rm -f $(OBJECTS)
    rm -f ../../TSP\ for\ iNav/Builds/Flash\ Release/output/BOOT_FLASH_Release.elf
    rm -f ../../TSP\ for\ iNav/Builds/Flash\ Release/output/BOOT_FLASH_Release.map
    rm -f ../../TSP\ for\ iNav/Builds/Flash\ Release/output/FLASH_Release.elf
    rm -f ../../TSP\ for\ iNav/Builds/Flash\ Release/output/FLASH_Release.map
    rm -f ../../TSP\ for\ iNav/Builds/iNAV\ RAM/output/iNAV_RAM.map
    rm -f ../../TSP\ for\ iNav/Builds/iNAV\ RAM/output/iNAV_RAM.elf
#   del $(OBJECTS) $(OBJECTS:.o=.d) $(ARCHIVES) $(IMG)
#   $(MAKE) clean -C "../../TSP for iNav"

cleanobj:
    @echo CLEANOBJ
    $(RM) $(OBJECTS)

1 个答案:

答案 0 :(得分:0)

事实证明,男人们的道路上有些可疑,所以一切都很好。