Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Make Problems, Windows XP

Help
wdolson1
2011-09-17
2013-03-12
  • wdolson1
    wdolson1
    2011-09-17

    I have been away from this project for a while doing some other tasks.  I've come back to a USB firmware for the Cypress FX2 that I started about 10 months ago.  I needed to make some changes and now I can't get the makefile to work.

    I tried a couple of different projects all with the same results.

    I am opening a command console window in the directory where the source files are located.  All source files are located in that directory.  All commands, compile, assembly, and link return

    Here is an example output:
    sdcc -c -verbose -opt-code-speed -mmc51 -DXDATA_START=0x2000 -I./include -o Build/fw.rel fw.c
    process_begin: CreateProcess(null), sdcc -c -verbose -opt-code-speed -mmc51 -DXDATA_START=0x2000 -I./include -o Build/fw.rel fw.c,  …> failed.
    make (e=2):  The system cannot find the file specified.
    make: ***  Error 2

    I have typed in the exact expanded command line shown when I run make and it will compile, assemble, or link (though the firmware doesn't work, which is another problem).  SDCC is in the path, I tried reinstalling the latest version (3.0), all with the same results.

    The following environment variables are set in the system:
    SDCCLIB_AS  sdas8051 -ios
    SDCCLIB_CC sdcc -c
    as well as the path has E:\Program Files\SDCC amended to the end.

    The makefile contents are below:

    PACKAGE = MTFirmware.bix

    XDATA_START = 0x2000

    ASFLGS = -olsxff
    CFLGS = -verbose -opt-code-speed -mmcs51 -DXDATA_START=$(XDATA_START)
    LDFLGS = -xram-loc $(XDATA_START)

    INCLUDE_DIR = ./include
    LIB_DIR = ./lib
    BUILD_DIR = Build
    CC = sdcc

    #HEX2BIX = 'Hex2bix.exe'
    HEX2BIX = Hex2bix.exe

    SRCS_C = \
    fw.c MT.c
    SRCS_ASM = \
    dscr.asm USBJmpTb.asm

    OBJS = $(SRCS_C:.c=.rel) $(SRCS_ASM:.asm=.rel)

    all : $(BUILD_DIR) $(PACKAGE)

    $(BUILD_DIR)/%.rel : %.c
    $(CC) -c $(CFLGS) -I$(INCLUDE_DIR) -o $@ $<

    $(BUILD_DIR)/%.rel : %.asm
    copy $< $(BUILD_DIR)
    cd $(BUILD_DIR)
    asx8051 -losg $(BUILD_DIR)\$<

    $(PACKAGE:.bix=.ihx) : $(patsubst %,$(BUILD_DIR)/%,$(OBJS))
    $(CC) $(LDFLGS) -o $@ -L$(LIB_DIR) -l ezusb $^

    %.hex : %.ihx
    copy $< $@

    $(PACKAGE) : $(PACKAGE:.bix=.hex)
    $(HEX2BIX) $<

    $(BUILD_DIR) :
    mkdir $@

    clean :
    del $(PACKAGE)
    del $(BUILD_DIR)\*.*

    run : all

    .PHONY : clean all

     
  • Is the same "make" being called or is make from some other toolchain earlier in the path?

    On Unix you'd do "which make" to see the full path to the make which is called. I don't know (and would be happy to know) a Windows equivalent for that.

     
  • wdolson1
    wdolson1
    2011-09-17

    According to a make reference I found, this error is usually caused by a program called from the makefile not being in the path.  sdcc is in the path.  I can type sdcc on the command line and it runs.

     
  • wdolson1
    wdolson1
    2011-09-17

    Looks like we both posted right about the same time.  You were right.  I moved SDCC up in the path and it works.  I need to find where that other make is.