Forums

`/etc/startup.mk' not found

Started by kbshah_2000 March 7, 2006
Hi guys.
I am new with GNU arm. (I have used IAR).
After downloading I have installed winarm and tried to compile example 
code but I get following message...
Any body having similar issue (I have downloaded winarm from 
jan17,2006 ...
Any solution suggestion. I have defined my winarm/bin path 
> "make.exe" all
make.exe:  Error -- configuration file `/etc/startup.mk' not found

> Process Exit Code: 255
> Time Taken: 00:00
	Thanks
kb shah
	

An Engineer's Guide to the LPC2100 Series

maybe your makefile tries to find this dependency. Please, send your
makefile so
I can see what it needs to build your target.

Thiago Takehara
Computer Engineer
Engworks Industrial LTDA - R&D Division
  ----- Original Message ----- 
  From: kbshah_2000 
  To: lpc2000@lpc2... 
  Sent: Tuesday, March 07, 2006 4:25 PM
  Subject: [lpc2000] `/etc/startup.mk' not found
	  Hi guys.
  I am new with GNU arm. (I have used IAR).
  After downloading I have installed winarm and tried to compile example 
  code but I get following message...
  Any body having similar issue (I have downloaded winarm from 
  jan17,2006 ...
  Any solution suggestion. I have defined my winarm/bin path 
  > "make.exe" all
  make.exe:  Error -- configuration file `/etc/startup.mk' not found

  > Process Exit Code: 255
  > Time Taken: 00:00
	  Thanks
  kb shah
	  SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
        Pic microcontrollers
	------
  YAHOO! GROUPS LINKS 

    a..
	------
	
	
Here is the make  file :(I have modifed paths  for my winarm]
(This file came with the example that are installed with installation.)
I am also sending example code .
Thanks in advance...
(There are mode examples i have tried other 2-3 with similar result)
I have attached project as well as reproduced the make file here for reference.
****************************************************************************************************************
# Hey Emacs, this is a -*- makefile -*-
#
# WinARM template makefile 
# by Martin Thomas, Kaiserslautern, Germany 
# <eversmith@ever...>
#
# based on the WinAVR makefile written by Eric B. Weddington, Jg Wunsch, et
al.
# Released to the Public Domain
# Please read the make user manual!
#
#
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make program = Download the hex file to the device, using lpc21isp
#
# (TODO: make filename.s = Just compile filename.c into the assembler code only)
#
# To rebuild project do "make clean" then "make all".
#
# Changelog:
# - 17. Feb. 2005  - added thumb-interwork support (mth)
# - 28. Apr. 2005  - added C++ support (mth)
# - 29. Arp. 2005  - changed handling for lst-Filename (mth)
#

# MCU name and submodel
MCU = arm7tdmi
SUBMDL = LPC2106

#THUMB    = -mthumb
#THUMB_IW = -mthumb-interwork
	## Create ROM-Image (final)
RUN_MODE=ROM_RUN
## Create RAM-Image (debugging)
#RUN_MODE=RAM_RUN
	# Output format. (can be srec, ihex, binary)
FORMAT = ihex
	# Target file name (without extension).
TARGET = ledswitch
	# List C source files here. (C dependencies are automatically generated.)
# use file-extension c for "c-only"-files
SRC = $(TARGET).c
#SRC 
# List C source files here which must be compiled in ARM-Mode.
# use file-extension c for "c-only"-files
SRCARM 
# List C++ source files here.
# use file-extension cpp for C++-files
CPPSRC 
# List C++ source files here which must be compiled in ARM-Mode.
# use file-extension cpp for C++-files
# CPPSRCARM = $(TARGET).cpp
CPPSRCARM 
# List Assembler source files here.
# Make them always end in a capital .S.  Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC 
# List Assembler source files here which must be assembled in ARM-Mode..
ASRCARM = build/crt0.S 

# Optimization level, can be [0, 1, 2, 3, s]. 
# 0 = turn off optimization. s = optimize for size.
# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
OPT = s

# Debugging format.
# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
#DEBUG = stabs
DEBUG = dwarf-2

# List any extra directories to look for include files here.
#     Each directory must be seperated by a space.
#EXTRAINCDIRS = ./include
EXTRAINCDIRS 
# Compiler flag to set the C Standard level.
# c89   - "ANSI" C
# gnu89 - c89 plus GCC extensions
# c99   - ISO C99 standard (not yet fully implemented)
# gnu99 - c99 plus GCC extensions
CSTANDARD = -std=gnu99

# Place -D or -U options for C here
CDEFS =  -D$(RUN_MODE)

# Place -I options here
CINCS 
# Place -D or -U options for ASM here
ADEFS =  -D$(RUN_MODE)
	# Compiler flags.
#  -g*:          generate debugging information
#  -O*:          optimization level
#  -f...:        tuning, see GCC manual and avr-libc documentation
#  -Wall...:     warning level
#  -Wa,...:      tell GCC to pass this to the assembler.
#    -adhlns...: create assembler listing
#
# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
CFLAGS = -g$(DEBUG)
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -Wall -Wcast-align -Wcast-qual -Wimplicit 
CFLAGS += -Wpointer-arith -Wswitch
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
#CFLAGS += -Wa,-adhlns=$(<:.c=.lst) 
CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<) 
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))

# flags only for C
CONLYFLAGS  = -Wstrict-prototypes -Wmissing-declarations
CONLYFLAGS += -Wmissing-prototypes -Wnested-externs 
CONLYFLAGS += $(CSTANDARD)

# flags only for C++ (arm-elf-g++)
CPPFLAGS 
# Assembler flags.
#  -Wa,...:   tell GCC to pass this to the assembler.
#  -ahlms:    create listing
#  -gstabs:   have the assembler create line number information; note that
#             for use in COFF files, additional information about filenames
#             and function names needs to be present in the assembler source
#             files -- see avr-libc docs [FIXME: not yet described there]
##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)

#Additional libraries.

#Support for newlibc-lpc (file: libnewlibc-lpc.a)
#NEWLIBLPC = -lnewlib-lpc
NEWLIBCLPC 
MATH_LIB = -lm

# Linker flags.
#  -Wl,...:     tell GCC to pass this to linker.
#    -Map:      create map file
#    --cref:    add cross reference to  map file
LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref
LDFLAGS += -lc
LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
LDFLAGS += -lc -lgcc

# Set Linker-Script Depending On Selected Memory
ifeq ($(RUN_MODE),RAM_RUN)
LDFLAGS +=-Tbuild/$(SUBMDL)-RAM.ld
else 
LDFLAGS +=-Tbuild/$(SUBMDL)-ROM.ld
endif
	# ---
# Flash-Programming support using lpc21isp by Martin Maurer 

# Settings and variables:
LPC21ISP = lpc21isp
#LPC21ISP = lpc21isp_beta
LPC21ISP_PORT = com1
LPC21ISP_BAUD = 115200
LPC21ISP_XTAL = 14746
LPC21ISP_FLASHFILE = $(TARGET).hex
# verbose output:
## LPC21ISP_DEBUG = -debug
# enter bootloader via RS232 DTR/RTS (only if hardware supports this
# feature - see Philips AppNote):
LPC21ISP_CONTROL = -control
	# ---
#********* Following section was changed by me as per my install
configuration*****
# Define directories, if needed.
 DIRARM = d:\WinARM\
 DIRARMBIN = $(DIRARM)\bin\
 DIRARMUTILS = $(DIRARM)\utils\bin\
#********* above section was changed by me as per my install configuration*****
# Define programs and commands.
SHELL = sh
CC = arm-elf-gcc
CPP = arm-elf-g++
OBJCOPY = arm-elf-objcopy
OBJDUMP = arm-elf-objdump
SIZE = arm-elf-size
NM = arm-elf-nm
REMOVE = rm -f
COPY = cp
	# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = --------  end  --------
MSG_SIZE_BEFORE = Size before: 
MSG_SIZE_AFTER = Size after:
MSG_FLASH = Creating load file for Flash:
MSG_EXTENDED_LISTING = Creating Extended Listing:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING = Compiling C:
MSG_COMPILING_ARM = "Compiling C (ARM-only):"
MSG_COMPILINGCPP = Compiling C++:
MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
MSG_ASSEMBLING = Assembling:
MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
MSG_CLEANING = Cleaning project:
MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode
now.
	# Define all object files.
COBJ      = $(SRC:.c=.o) 
AOBJ      = $(ASRC:.S=.o)
COBJARM   = $(SRCARM:.c=.o)
AOBJARM   = $(ASRCARM:.S=.o)
CPPOBJ    = $(CPPSRC:.cpp=.o) 
CPPOBJARM = $(CPPSRCARM:.cpp=.o)

# Define all listing files.
LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)

# Compiler flags to generate dependency files.
### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d

# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
	# Default target.
all: begin gccversion sizebefore build sizeafter finished end

build: elf hex lss sym

elf: $(TARGET).elf
hex: $(TARGET).hex
lss: $(TARGET).lss 
sym: $(TARGET).sym

# Eye candy.
begin:
 @echo
 @echo $(MSG_BEGIN)

finished:
 @echo $(MSG_ERRORS_NONE)

end:
 @echo $(MSG_END)
 @echo
	# Display size of file.
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
sizebefore:
 @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo;
fi

sizeafter:
 @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo;
fi
	# Display compiler version information.
gccversion : 
 @$(CC) --version
	# Program the device.  
program: $(TARGET).hex
 @echo
 @echo $(MSG_LPC21_RESETREMINDER)
 $(LPC21ISP) $(LPC21ISP_CONTROL) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE)
$(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
	# Create final output files (.hex, .eep) from ELF output file.
# TODO: handling the .eeprom-section should be redundant
%.hex: %.elf
 @echo
 @echo $(MSG_FLASH) $@
 $(OBJCOPY) -O $(FORMAT) $< $@
	# Create extended listing file from ELF output file.
# testing: option -C
%.lss: %.elf
 @echo
 @echo $(MSG_EXTENDED_LISTING) $@
 $(OBJDUMP) -h -S -C $< > $@
	# Create a symbol table from ELF output file.
%.sym: %.elf
 @echo
 @echo $(MSG_SYMBOL_TABLE) $@
 $(NM) -n $< > $@
	# Link: create ELF output file from object files.
.SECONDARY : $(TARGET).elf
.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
%.elf:  $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
 @echo
 @echo $(MSG_LINKING) $@
 $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ)
$(CPPOBJARM) --output $@ $(LDFLAGS)
# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ)
$(CPPOBJARM) --output $@ $(LDFLAGS)

# Compile: create object files from C source files. ARM/Thumb
$(COBJ) : %.o : %.c
 @echo
 @echo $(MSG_COMPILING) $<
 $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@ 

# Compile: create object files from C source files. ARM-only
$(COBJARM) : %.o : %.c
 @echo
 @echo $(MSG_COMPILING_ARM) $<
 $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@ 

# Compile: create object files from C++ source files. ARM/Thumb
$(CPPOBJ) : %.o : %.cpp
 @echo
 @echo $(MSG_COMPILINGCPP) $<
 $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@ 

# Compile: create object files from C++ source files. ARM-only
$(CPPOBJARM) : %.o : %.cpp
 @echo
 @echo $(MSG_COMPILINGCPP_ARM) $<
 $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
	# Compile: create assembler files from C source files. ARM/Thumb
## does not work - TODO - hints welcome
##$(COBJ) : %.s : %.c
## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
	# Assemble: create object files from assembler source files. ARM/Thumb
$(AOBJ) : %.o : %.S
 @echo
 @echo $(MSG_ASSEMBLING) $<
 $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
	# Assemble: create object files from assembler source files. ARM-only
$(AOBJARM) : %.o : %.S
 @echo
 @echo $(MSG_ASSEMBLING_ARM) $<
 $(CC) -c $(ALL_ASFLAGS) $< -o $@
	# Target: clean project.
clean: begin clean_list finished end
	clean_list :
 @echo
 @echo $(MSG_CLEANING)
 $(REMOVE) $(TARGET).hex
 $(REMOVE) $(TARGET).obj
 $(REMOVE) $(TARGET).elf
 $(REMOVE) $(TARGET).map
 $(REMOVE) $(TARGET).obj
 $(REMOVE) $(TARGET).a90
 $(REMOVE) $(TARGET).sym
 $(REMOVE) $(TARGET).lnk
 $(REMOVE) $(TARGET).lss
 $(REMOVE) $(COBJ)
 $(REMOVE) $(CPPOBJ)
 $(REMOVE) $(AOBJ)
 $(REMOVE) $(COBJARM)
 $(REMOVE) $(CPPOBJARM)
 $(REMOVE) $(AOBJARM)
 $(REMOVE) $(LST)
 $(REMOVE) $(SRC:.c=.s)
 $(REMOVE) $(SRC:.c=.d)
 $(REMOVE) $(SRCARM:.c=.s)
 $(REMOVE) $(SRCARM:.c=.d)
 $(REMOVE) $(CPPSRC:.cpp=.s) 
 $(REMOVE) $(CPPSRC:.cpp=.d)
 $(REMOVE) $(CPPSRCARM:.cpp=.s) 
 $(REMOVE) $(CPPSRCARM:.cpp=.d)
 $(REMOVE) .dep/*
	# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
	# Listing of phony targets.
.PHONY : all begin finish end sizebefore sizeafter gccversion \
build elf hex lss sym clean clean_list program
	K B Shah

  ----- Original Message ----- 
  From: Thiago Takehara 
  To: lpc2000@lpc2... 
  Sent: Tuesday, March 07, 2006 3:39 PM
  Subject: Re: [lpc2000] `/etc/startup.mk' not found
	  maybe your makefile tries to find this dependency. Please, send your makefile
so
  I can see what it needs to build your target.

  Thiago Takehara
  Computer Engineer
  Engworks Industrial LTDA - R&D Division
    ----- Original Message ----- 
    From: kbshah_2000 
    To: lpc2000@lpc2... 
    Sent: Tuesday, March 07, 2006 4:25 PM
    Subject: [lpc2000] `/etc/startup.mk' not found
	    Hi guys.
    I am new with GNU arm. (I have used IAR).
    After downloading I have installed winarm and tried to compile example 
    code but I get following message...
    Any body having similar issue (I have downloaded winarm from 
    jan17,2006 ...
    Any solution suggestion. I have defined my winarm/bin path 
    > "make.exe" all
    make.exe:  Error -- configuration file `/etc/startup.mk' not found

    > Process Exit Code: 255
    > Time Taken: 00:00
	    Thanks
    kb shah
	    SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
          Pic microcontrollers
	  ------
    YAHOO! GROUPS LINKS 

      a..
	  ------
	  
	  SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
        Pic microcontrollers
	------
  YAHOO! GROUPS LINKS 

    a..
	------
	------
	  
	
	
I believe this error you got has nothing with your makefile, even with your
source codes. Ive googled a little about this error message and found answers
like "copy the startup.mk file from /samples to /etc". Are you running
your make.exe from the same path where your makefile is? Have you ever tried to
force your make.exe to use your makefile, i.e., 'make.exe -f makefile'? Maybe it
works for you.

I have not found anything weird in you makefile, neither found references for
'startup.mk', so I believe it has nothing with your source files.

I couldnt get the files you said you sent, maybe Yahoo blocked out the
attaches.

Good luck, if I find any clue Ill tell you.

Regards,

Thiago Takehara
Computer Engineer
Engworks Industrial LTDA - R&D Division

  ----- Original Message ----- 
  From: K B Shah-lascaux 
  To: lpc2000@lpc2... 
  Sent: Tuesday, March 07, 2006 6:00 PM
  Subject: Re: [lpc2000] `/etc/startup.mk' not found
	  Here is the make  file :(I have modifed paths  for my winarm]
  (This file came with the example that are installed with installation.)
  I am also sending example code .
  Thanks in advance...
  (There are mode examples i have tried other 2-3 with similar result)
  I have attached project as well as reproduced the make file here for
reference.
 
****************************************************************************************************************
  # Hey Emacs, this is a -*- makefile -*-
  #
  # WinARM template makefile 
  # by Martin Thomas, Kaiserslautern, Germany 
  # <eversmith@ever...>
  #
  # based on the WinAVR makefile written by Eric B. Weddington, Jg Wunsch, et
al.
  # Released to the Public Domain
  # Please read the make user manual!
  #
  #
  # On command line:
  #
  # make all = Make software.
  #
  # make clean = Clean out built project files.
  #
  # make program = Download the hex file to the device, using lpc21isp
  #
  # (TODO: make filename.s = Just compile filename.c into the assembler code
only)
  #
  # To rebuild project do "make clean" then "make all".
  #
  # Changelog:
  # - 17. Feb. 2005  - added thumb-interwork support (mth)
  # - 28. Apr. 2005  - added C++ support (mth)
  # - 29. Arp. 2005  - changed handling for lst-Filename (mth)
  #

  # MCU name and submodel
  MCU = arm7tdmi
  SUBMDL = LPC2106

  #THUMB    = -mthumb
  #THUMB_IW = -mthumb-interwork
	  ## Create ROM-Image (final)
  RUN_MODE=ROM_RUN
  ## Create RAM-Image (debugging)
  #RUN_MODE=RAM_RUN
	  # Output format. (can be srec, ihex, binary)
  FORMAT = ihex
	  # Target file name (without extension).
  TARGET = ledswitch
	  # List C source files here. (C dependencies are automatically generated.)
  # use file-extension c for "c-only"-files
  SRC = $(TARGET).c
  #SRC 
  # List C source files here which must be compiled in ARM-Mode.
  # use file-extension c for "c-only"-files
  SRCARM 
  # List C++ source files here.
  # use file-extension cpp for C++-files
  CPPSRC 
  # List C++ source files here which must be compiled in ARM-Mode.
  # use file-extension cpp for C++-files
  # CPPSRCARM = $(TARGET).cpp
  CPPSRCARM 
  # List Assembler source files here.
  # Make them always end in a capital .S.  Files ending in a lowercase .s
  # will not be considered source files but generated files (assembler
  # output from the compiler), and will be deleted upon "make clean"!
  # Even though the DOS/Win* filesystem matches both .s and .S the same,
  # it will preserve the spelling of the filenames, and gcc itself does
  # care about how the name is spelled on its command-line.
  ASRC 
  # List Assembler source files here which must be assembled in ARM-Mode..
  ASRCARM = build/crt0.S 

  # Optimization level, can be [0, 1, 2, 3, s]. 
  # 0 = turn off optimization. s = optimize for size.
  # (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
  OPT = s

  # Debugging format.
  # Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
  # AVR (extended) COFF requires stabs, plus an avr-objcopy run.
  #DEBUG = stabs
  DEBUG = dwarf-2

  # List any extra directories to look for include files here.
  #     Each directory must be seperated by a space.
  #EXTRAINCDIRS = ./include
  EXTRAINCDIRS 
  # Compiler flag to set the C Standard level.
  # c89   - "ANSI" C
  # gnu89 - c89 plus GCC extensions
  # c99   - ISO C99 standard (not yet fully implemented)
  # gnu99 - c99 plus GCC extensions
  CSTANDARD = -std=gnu99

  # Place -D or -U options for C here
  CDEFS =  -D$(RUN_MODE)

  # Place -I options here
  CINCS 
  # Place -D or -U options for ASM here
  ADEFS =  -D$(RUN_MODE)
	  # Compiler flags.
  #  -g*:          generate debugging information
  #  -O*:          optimization level
  #  -f...:        tuning, see GCC manual and avr-libc documentation
  #  -Wall...:     warning level
  #  -Wa,...:      tell GCC to pass this to the assembler.
  #    -adhlns...: create assembler listing
  #
  # Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
  CFLAGS = -g$(DEBUG)
  CFLAGS += $(CDEFS) $(CINCS)
  CFLAGS += -O$(OPT)
  CFLAGS += -Wall -Wcast-align -Wcast-qual -Wimplicit 
  CFLAGS += -Wpointer-arith -Wswitch
  CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
  #CFLAGS += -Wa,-adhlns=$(<:.c=.lst) 
  CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<) 
  CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))

  # flags only for C
  CONLYFLAGS  = -Wstrict-prototypes -Wmissing-declarations
  CONLYFLAGS += -Wmissing-prototypes -Wnested-externs 
  CONLYFLAGS += $(CSTANDARD)

  # flags only for C++ (arm-elf-g++)
  CPPFLAGS 
  # Assembler flags.
  #  -Wa,...:   tell GCC to pass this to the assembler.
  #  -ahlms:    create listing
  #  -gstabs:   have the assembler create line number information; note that
  #             for use in COFF files, additional information about filenames
  #             and function names needs to be present in the assembler source
  #             files -- see avr-libc docs [FIXME: not yet described there]
  ##ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs 
  ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)

  #Additional libraries.

  #Support for newlibc-lpc (file: libnewlibc-lpc.a)
  #NEWLIBLPC = -lnewlib-lpc
  NEWLIBCLPC 
  MATH_LIB = -lm

  # Linker flags.
  #  -Wl,...:     tell GCC to pass this to linker.
  #    -Map:      create map file
  #    --cref:    add cross reference to  map file
  LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref
  LDFLAGS += -lc
  LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
  LDFLAGS += -lc -lgcc

  # Set Linker-Script Depending On Selected Memory
  ifeq ($(RUN_MODE),RAM_RUN)
  LDFLAGS +=-Tbuild/$(SUBMDL)-RAM.ld
  else 
  LDFLAGS +=-Tbuild/$(SUBMDL)-ROM.ld
  endif
	  # ---
  # Flash-Programming support using lpc21isp by Martin Maurer 

  # Settings and variables:
  LPC21ISP = lpc21isp
  #LPC21ISP = lpc21isp_beta
  LPC21ISP_PORT = com1
  LPC21ISP_BAUD = 115200
  LPC21ISP_XTAL = 14746
  LPC21ISP_FLASHFILE = $(TARGET).hex
  # verbose output:
  ## LPC21ISP_DEBUG = -debug
  # enter bootloader via RS232 DTR/RTS (only if hardware supports this
  # feature - see Philips AppNote):
  LPC21ISP_CONTROL = -control
	  # ---
  #********* Following section was changed by me as per my install
configuration*****
  # Define directories, if needed.
  DIRARM = d:\WinARM\
  DIRARMBIN = $(DIRARM)\bin\
  DIRARMUTILS = $(DIRARM)\utils\bin\
  #********* above section was changed by me as per my install
configuration*****
  # Define programs and commands.
  SHELL = sh
  CC = arm-elf-gcc
  CPP = arm-elf-g++
  OBJCOPY = arm-elf-objcopy
  OBJDUMP = arm-elf-objdump
  SIZE = arm-elf-size
  NM = arm-elf-nm
  REMOVE = rm -f
  COPY = cp
	  # Define Messages
  # English
  MSG_ERRORS_NONE = Errors: none
  MSG_BEGIN = -------- begin --------
  MSG_END = --------  end  --------
  MSG_SIZE_BEFORE = Size before: 
  MSG_SIZE_AFTER = Size after:
  MSG_FLASH = Creating load file for Flash:
  MSG_EXTENDED_LISTING = Creating Extended Listing:
  MSG_SYMBOL_TABLE = Creating Symbol Table:
  MSG_LINKING = Linking:
  MSG_COMPILING = Compiling C:
  MSG_COMPILING_ARM = "Compiling C (ARM-only):"
  MSG_COMPILINGCPP = Compiling C++:
  MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
  MSG_ASSEMBLING = Assembling:
  MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
  MSG_CLEANING = Cleaning project:
  MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode
now.
	  # Define all object files.
  COBJ      = $(SRC:.c=.o) 
  AOBJ      = $(ASRC:.S=.o)
  COBJARM   = $(SRCARM:.c=.o)
  AOBJARM   = $(ASRCARM:.S=.o)
  CPPOBJ    = $(CPPSRC:.cpp=.o) 
  CPPOBJARM = $(CPPSRCARM:.cpp=.o)

  # Define all listing files.
  LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
  LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)

  # Compiler flags to generate dependency files.
  ### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
  GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d

  # Combine all necessary flags and optional flags.
  # Add target processor to flags.
  ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
  ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
	  # Default target.
  all: begin gccversion sizebefore build sizeafter finished end

  build: elf hex lss sym

  elf: $(TARGET).elf
  hex: $(TARGET).hex
  lss: $(TARGET).lss 
  sym: $(TARGET).sym

  # Eye candy.
  begin:
  @echo
  @echo $(MSG_BEGIN)

  finished:
  @echo $(MSG_ERRORS_NONE)

  end:
  @echo $(MSG_END)
  @echo
	  # Display size of file.
  HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
  ELFSIZE = $(SIZE) -A $(TARGET).elf
  sizebefore:
  @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE);
echo; fi

  sizeafter:
  @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo;
fi
	  # Display compiler version information.
  gccversion : 
  @$(CC) --version
	  # Program the device.  
  program: $(TARGET).hex
  @echo
  @echo $(MSG_LPC21_RESETREMINDER)
  $(LPC21ISP) $(LPC21ISP_CONTROL) $(LPC21ISP_DEBUG) $(LPC21ISP_FLASHFILE)
$(LPC21ISP_PORT) $(LPC21ISP_BAUD) $(LPC21ISP_XTAL)
	  # Create final output files (.hex, .eep) from ELF output file.
  # TODO: handling the .eeprom-section should be redundant
  %.hex: %.elf
  @echo
  @echo $(MSG_FLASH) $@
  $(OBJCOPY) -O $(FORMAT) $< $@
	  # Create extended listing file from ELF output file.
  # testing: option -C
  %.lss: %.elf
  @echo
  @echo $(MSG_EXTENDED_LISTING) $@
  $(OBJDUMP) -h -S -C $< > $@
	  # Create a symbol table from ELF output file.
  %.sym: %.elf
  @echo
  @echo $(MSG_SYMBOL_TABLE) $@
  $(NM) -n $< > $@
	  # Link: create ELF output file from object files.
  .SECONDARY : $(TARGET).elf
  .PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
  %.elf:  $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
  @echo
  @echo $(MSG_LINKING) $@
  $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ)
$(CPPOBJARM) --output $@ $(LDFLAGS)
  # $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ)
$(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)

  # Compile: create object files from C source files. ARM/Thumb
  $(COBJ) : %.o : %.c
  @echo
  @echo $(MSG_COMPILING) $<
  $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@ 

  # Compile: create object files from C source files. ARM-only
  $(COBJARM) : %.o : %.c
  @echo
  @echo $(MSG_COMPILING_ARM) $<
  $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@ 

  # Compile: create object files from C++ source files. ARM/Thumb
  $(CPPOBJ) : %.o : %.cpp
  @echo
  @echo $(MSG_COMPILINGCPP) $<
  $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@ 

  # Compile: create object files from C++ source files. ARM-only
  $(CPPOBJARM) : %.o : %.cpp
  @echo
  @echo $(MSG_COMPILINGCPP_ARM) $<
  $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
	  # Compile: create assembler files from C source files. ARM/Thumb
  ## does not work - TODO - hints welcome
  ##$(COBJ) : %.s : %.c
  ## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
	  # Assemble: create object files from assembler source files. ARM/Thumb
  $(AOBJ) : %.o : %.S
  @echo
  @echo $(MSG_ASSEMBLING) $<
  $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
	  # Assemble: create object files from assembler source files. ARM-only
  $(AOBJARM) : %.o : %.S
  @echo
  @echo $(MSG_ASSEMBLING_ARM) $<
  $(CC) -c $(ALL_ASFLAGS) $< -o $@
	  # Target: clean project.
  clean: begin clean_list finished end
	  clean_list :
  @echo
  @echo $(MSG_CLEANING)
  $(REMOVE) $(TARGET).hex
  $(REMOVE) $(TARGET).obj
  $(REMOVE) $(TARGET).elf
  $(REMOVE) $(TARGET).map
  $(REMOVE) $(TARGET).obj
  $(REMOVE) $(TARGET).a90
  $(REMOVE) $(TARGET).sym
  $(REMOVE) $(TARGET).lnk
  $(REMOVE) $(TARGET).lss
  $(REMOVE) $(COBJ)
  $(REMOVE) $(CPPOBJ)
  $(REMOVE) $(AOBJ)
  $(REMOVE) $(COBJARM)
  $(REMOVE) $(CPPOBJARM)
  $(REMOVE) $(AOBJARM)
  $(REMOVE) $(LST)
  $(REMOVE) $(SRC:.c=.s)
  $(REMOVE) $(SRC:.c=.d)
  $(REMOVE) $(SRCARM:.c=.s)
  $(REMOVE) $(SRCARM:.c=.d)
  $(REMOVE) $(CPPSRC:.cpp=.s) 
  $(REMOVE) $(CPPSRC:.cpp=.d)
  $(REMOVE) $(CPPSRCARM:.cpp=.s) 
  $(REMOVE) $(CPPSRCARM:.cpp=.d)
  $(REMOVE) .dep/*
	  # Include the dependency files.
  -include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
	  # Listing of phony targets.
  .PHONY : all begin finish end sizebefore sizeafter gccversion \
  build elf hex lss sym clean clean_list program
	  K B Shah

    ----- Original Message ----- 
    From: Thiago Takehara 
    To: lpc2000@lpc2... 
    Sent: Tuesday, March 07, 2006 3:39 PM
    Subject: Re: [lpc2000] `/etc/startup.mk' not found
	    maybe your makefile tries to find this dependency. Please, send your
makefile so
    I can see what it needs to build your target.

    Thiago Takehara
    Computer Engineer
    Engworks Industrial LTDA - R&D Division
      ----- Original Message ----- 
      From: kbshah_2000 
      To: lpc2000@lpc2... 
      Sent: Tuesday, March 07, 2006 4:25 PM
      Subject: [lpc2000] `/etc/startup.mk' not found
	      Hi guys.
      I am new with GNU arm. (I have used IAR).
      After downloading I have installed winarm and tried to compile example 
      code but I get following message...
      Any body having similar issue (I have downloaded winarm from 
      jan17,2006 ...
      Any solution suggestion. I have defined my winarm/bin path 
      > "make.exe" all
      make.exe:  Error -- configuration file `/etc/startup.mk' not found

      > Process Exit Code: 255
      > Time Taken: 00:00
	      Thanks
      kb shah
	      SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
            Pic microcontrollers
	    ------
      YAHOO! GROUPS LINKS 

        a..
	    ------
	    
	    SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
          Pic microcontrollers
	  ------
    YAHOO! GROUPS LINKS 

      a..
	  ------
	  ------
	    
	  
	  SPONSORED LINKS Microcontrollers  Microprocessor  Intel microprocessors  
        Pic microcontrollers
	------
  YAHOO! GROUPS LINKS 

    a..
	------