Update for ez80 Windows native build (still does not work)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5377 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-11-21 17:44:14 +00:00
parent 9b37a2c4fc
commit f8ad7573a5
24 changed files with 631 additions and 221 deletions
+1 -1
View File
@@ -4027,7 +4027,7 @@ be sent.
<p> <p>
<b>POSIX Compatibility:</b> <b>POSIX Compatibility:</b>
In the POSIX description of this function is the <code>pause()</code> function will suspend the calling thread until delivery of a signal whose action is either to execute a signal-catching function or to terminate the process. In the POSIX description of this function is the <code>pause()</code> function will suspend the calling thread until delivery of a signal whose action is either to execute a signal-catching function or to terminate the process.
This implementation only waits for any non-blocked signal to be recieved. This implementation only waits for any non-blocked signal to be received.
</p> </p>
<table width ="100%"> <table width ="100%">
+1 -1
View File
@@ -67,7 +67,7 @@ endchoice
config WINDOWS_MKLINK config WINDOWS_MKLINK
bool "Use mklink" bool "Use mklink"
default y default n
depends on WINDOWS_NATIVE depends on WINDOWS_NATIVE
---help--- ---help---
Use the mklink command to set up symbolic links when NuttX is Use the mklink command to set up symbolic links when NuttX is
+1 -1
View File
@@ -49,7 +49,7 @@ endif
# This define is passed as EXTRADEFINES for kernel-mode builds. It is also passed # This define is passed as EXTRADEFINES for kernel-mode builds. It is also passed
# during PASS1 (but not PASS2) context and depend targets. # during PASS1 (but not PASS2) context and depend targets.
KDEFINE = -D__KERNEL__ KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
# Process architecture and board-specific directories # Process architecture and board-specific directories
+80 -34
View File
@@ -35,44 +35,52 @@
############################################################################ ############################################################################
# Tools # Tools
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) ifeq ($(CONFIG_WINDOWS_NATIVE),y)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR) else
LDFLAGS += @nuttx.linkcmd WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR)
LDFLAGS += @nuttx.linkcmd
############################################################################ ############################################################################
# Files and directories # Files and directories
ifneq ($(HEAD_SSRC),) ifneq ($(HEAD_SSRC),)
HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT)) HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT))
HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT)) HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT))
else else
HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT)) HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
endif endif
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS) SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS) ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
GENSRCS = $(SSRCS:.S=$(ASMEXT)) GENSRCS = $(SSRCS:.S=$(ASMEXT))
AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT)) AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS) CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))
DEPSRCS = $(SSRCS) $(CSRCS) DEPSRCS = $(SSRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS) OBJS = $(AOBJS) $(COBJS)
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board BOARDDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board
VPATH = chip:common VPATH = chip:common
############################################################################ ############################################################################
# Targets # Targets
all: $(HEAD_OBJ) libarch$(LIBEXT) all: $(HEAD_OBJ) libarch$(LIBEXT)
.PHONY: board/libboard$(LIBEXT) .PHONY: board$(DELIM)libboard$(LIBEXT)
$(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S $(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S
$(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp $(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp
@@ -88,17 +96,46 @@ $(COBJS): %$(OBJEXT): %.c
libarch$(LIBEXT): $(OBJS) libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) $(call ARCHIVE, $@, $(OBJS))
board/libboard$(LIBEXT): board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES) $(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
nuttx.linkcmd: $(LINKCMDTEMPLATE) nuttx.linkcmd: $(LINKCMDTEMPLATE)
$(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd $(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
@echo "\"${shell cygpath -w "$(TOPDIR)/nuttx"}\"= \\" >>nuttx.linkcmd ifeq ($(CONFIG_WINDOWS_NATIVE),y)
@echo " \"${shell cygpath -w "$(ARCHSRCDIR)/$(HEAD_OBJ)"}\", \\" >>nuttx.linkcmd @echo "\"$(TOPDIR)/nuttx\"= \\" >>nuttx.linkcmd
@echo " \"$(ARCHSRCDIR)/$(HEAD_OBJ)\", \\" >>nuttx.linkcmd
$(Q) ( for lib in $(LINKLIBS); do \
echo " \"$(TOPDIR)/lib/$${lib}\", \\" >>nuttx.linkcmd; \
done ; )
@echo " \"$(ARCHSRCDIR)/board/libboard$(LIBEXT)\", \\" >>nuttx.linkcmd
ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y)
@echo " \"$(ZDSSTDLIBDIR)/chelprevaaD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/crtrevaaLDD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/fprevaaLDD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/csiorevaaLDD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/zsldevinitdummy$(LIBEXT)\"" >>nuttx.linkcmd
endif
ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y)
@echo " \"$(ZDSSTDLIBDIR)/chelpD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/crtLDD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/fpdumyLD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/csioLDD$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/zsldevinitdummy$(LIBEXT)\"" >>nuttx.linkcmd
endif
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
@echo " \"$(ZDSSTDLIBDIR)/chelp$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/crt$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSSTDLIBDIR)/fplib$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/gpio$(LIBEXT)\", \\" >>nuttx.linkcmd
@echo " \"$(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)\"" >>nuttx.linkcmd
endif
else
@echo "\"${shell cygpath -w "$(TOPDIR)/nuttx\"= \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ARCHSRCDIR)/$(HEAD_OBJ)\", \\" >>nuttx.linkcmd
$(Q) ( for lib in $(LINKLIBS); do \ $(Q) ( for lib in $(LINKLIBS); do \
echo " \"`cygpath -w "$(TOPDIR)/lib/$${lib}"`\", \\" >>nuttx.linkcmd; \ echo " \"`cygpath -w "$(TOPDIR)/lib/$${lib}"`\", \\" >>nuttx.linkcmd; \
done ; ) done ; )
@echo " \"${shell cygpath -w "$(ARCHSRCDIR)/board/libboard$(LIBEXT)"}\", \\" >>nuttx.linkcmd @echo " \"${shell cygpath -w "$(ARCHSRCDIR)/board/libboard$(LIBEXT)\", \\" >>nuttx.linkcmd
ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y)
@echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelprevaaD$(LIBEXT)"}\", \\" >>nuttx.linkcmd @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelprevaaD$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crtrevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd @echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crtrevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@@ -120,34 +157,43 @@ ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
@echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/gpio$(LIBEXT)"}\", \\" >>nuttx.linkcmd @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/gpio$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)"}\"" >>nuttx.linkcmd @echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)"}\"" >>nuttx.linkcmd
endif endif
endif
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) nuttx.linkcmd
@echo "LD: nuttx$(EXEEXT)" @echo "LD: nuttx$(EXEEXT)"
$(Q) "$(LD)" $(LDFLAGS) $(Q) "$(LD)" $(LDFLAGS)
.depend: Makefile chip/Make.defs $(DEPSRCS) .depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
$(Q) if [ -e board/Makefile ]; then \ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" depend )
else
$(Q) if [ -e board$(DELIM)Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
fi fi
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep $(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
$(Q) touch $@ $(Q) touch $@
# This is part of the top-level export target # This is part of the top-level export target
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ) export_head: board$(DELIM)libboard$(LIBEXT) $(HEAD_OBJ)
$(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \ $(Q) if exist "$(EXPORT_DIR)$(DELIM)startup" ( copy $(HEAD_OBJ) "$(EXPORT_DIR)$(DELIM)startup$(DELIM)." /b /y)
else
$(Q) if [ -d "$(EXPORT_DIR)$(DELIM)startup" ]; then \
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)$(DELIM)startup"; \
else \ else \
echo "$(EXPORT_DIR)/startup does not exist"; \ echo "$(EXPORT_DIR)$(DELIM)startup does not exist"; \
exit 1; \ exit 1; \
fi fi
endif
# Dependencies # Dependencies
depend: .depend depend: .depend
clean: clean:
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board$(DELIM)Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi fi
$(call DELFILE, nuttx.linkcmd) $(call DELFILE, nuttx.linkcmd)
@@ -158,7 +204,7 @@ clean:
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) if [ -e board/Makefile ]; then \ $(Q) if [ -e board$(DELIM)Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \ $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi fi
$(call DELFILE, Make.dep) $(call DELFILE, Make.dep)
+21 -6
View File
@@ -83,13 +83,28 @@ available:
This builds the examples/ostest application for execution from FLASH. This builds the examples/ostest application for execution from FLASH.
See examples/README.txt for information about ostest. See examples/README.txt for information about ostest.
This configuration uses the mconf-based configuration tool. To NOTES:
change this configuration using that tool, you should:
a. Build and install the mconf tool. See nuttx/README.txt and 1. This configuration uses the mconf-based configuration tool. To
misc/tools/ change this configuration using that tool, you should:
b. Execute 'make menuconfig' in nuttx/ in order to start the a. Build and install the mconf tool. See nuttx/README.txt and
reconfiguration process. misc/tools/
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
2. By default, this configuration assumes that you are using the
Cygwin environment on Windows. An option is to use the native
CMD.exe window build as described in the top-level README.txt
file. To set up that configuration:
-CONFIG_WINDOWS_CYGWIN=y
+CONFIG_WINDOWS_NATIVE=y
And after configuring, make sure that CONFIG_APPS_DIR uses
the back slash character. For example:
CONFIG_APPS_DIR="..\apps"
Check out any README.txt files in these <sub-directory>s. Check out any README.txt files in these <sub-directory>s.
+136 -73
View File
@@ -47,6 +47,20 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog
# Escaped versions
# ETOPDIR := ${shell echo "$(TOPDIR)" | sed -e "s/ /%%%%20/g"}
# EZDSSTDINCDIR := ${shell echo "$(ZDSSTDINCDIR)" | sed -e "s/ /%%%%20/g"}
# EZDSZILOGINCDIR := ${shell echo "$(ZDSZILOGINCDIR)" | sed -e "s/ /%%%%20/g"}
# CFLAGs
ARCHASMINCLUDES = -include:'$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)'
# EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
EARCHASMINCLUDES = -include:'$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)'
ARCHSTDINCLUDES = -stdinc:'$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)'
ARCHUSRINCLUDES = -usrinc:'.'
else else
WINTOOL := y WINTOOL := y
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
@@ -55,99 +69,139 @@ else
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
# These are the same directories but with the directory separator
# character swapped as needed by the ZDS-II compiler
WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
# Escaped versions
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
# CFLAGs
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
ARCHUSRINCLUDES = -usrinc:'.'
endif endif
# These are the same directories but with the directory separator
# character swapped as needed by the ZDS-II compiler
WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
# Escaped versions
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
# Assembler definitions # Assembler definitions
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y) ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
ARCHCPU = eZ80F91 ARCHCPU = eZ80F91
ARCHCPUDEF = _EZ80F91 ARCHCPUDEF = _EZ80F91
ARCHFAMILY = _EZ80ACCLAIM! ARCHFAMILY = _EZ80ACCLAIM!
endif endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHASMOPTIMIZATION = -debug -NOsdiopt ARCHASMOPTIMIZATION = -debug -NOsdiopt
else else
ARCHASMOPTIMIZATION = -nodebug -NOsdiopt ARCHASMOPTIMIZATION = -nodebug -NOsdiopt
endif endif
ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase
ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn ARCHASMWARNINGS = -warn
ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__ ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
$(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
# Compiler definitions # Compiler definitions
ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -debug -reduceopt ARCHOPTIMIZATION = -debug -reduceopt
else else
ARCHOPTIMIZATION = -nodebug -optsize ARCHOPTIMIZATION = -nodebug -optsize
endif endif
ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \
-asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm
ARCHPICFLAGS = ARCHPICFLAGS =
ARCHWARNINGS = -warn ARCHWARNINGS = -warn
ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF) ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF)
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
ARCHUSRINCLUDES = -usrinc:'.' CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__ CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)/include CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES) CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions # Librarian definitions
ARFLAGS = -quiet -warn ARFLAGS = -quiet -warn
# Linker definitions # Linker definitions
LINKCMDTEMPLATE = $(TOPDIR)/configs/ez80f910200kitg/ostest/ostest.linkcmd LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)ez80f910200kitg$(DELIM)ostest$(DELIM)ostest.linkcmd
# Tool names/pathes # Tool names/pathes
CROSSDEV = CROSSDEV =
CC = $(ZDSBINDIR)/ez80cc.exe CPP = gcc -E
CPP = gcc -E
LD = $(ZDSBINDIR)/ez80link.exe ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AS = $(ZDSBINDIR)/ez80asm.exe # PATH varialble should be set
AR = $(ZDSBINDIR)/ez80lib.exe CC = ez80cc.exe
LD = ez80link.exe
AS = ez80asm.exe
AR = ez80lib.exe
else
# Cygwin PATH variable is not sufficient
CC = "$(ZDSBINDIR)$(DELIM)ez80cc.exe"
LD = "$(ZDSBINDIR)$(DELIM)ez80link.exe"
AS = "$(ZDSBINDIR)$(DELIM)ez80asm.exe"
AR = "$(ZDSBINDIR)$(DELIM)ez80lib.exe"
endif
# File extensions # File extensions
ASMEXT = .asm ASMEXT = .asm
OBJEXT = .obj OBJEXT = .obj
LIBEXT = .lib LIBEXT = .lib
EXEEXT = .lod EXEEXT = .lod
HEXEXT = .hex HEXEXT = .hex
# These are the macros that will be used in the NuttX make system # These are the macros that will be used in the NuttX make system
# to compile and assembly source files and to insert the resulting # to compile and assembly source files and to insert the resulting
# object files into an archive # object files into an archive
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define PREPROCESS
@echo CPP: $1->$2
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
endef
define COMPILE
$(Q) "$(CC)" $(CFLAGS) $1
endef
define ASSEMBLE
$(Q) "$(AS)" $(AFLAGS) $1
endef
define ARCHIVE
echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
define CLEAN
$(Q) if exist *.obj (del /f /q *.obj)
$(Q) if exist *.src (del /f /q *.src)
$(Q) if exist *.lib (del /f /q *.lib)
$(Q) if exist *.hex (del /f /q *.hex)
$(Q) if exist *.lod (del /f /q *.lod)
$(Q) if exist *.lst (del /f /q *.lst)
endef
else
define PREPROCESS define PREPROCESS
@echo "CPP: $1->$2" @echo "CPP: $1->$2"
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2 $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
@@ -163,36 +217,45 @@ define ASSEMBLE
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile) $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
endef endef
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define ARCHIVE
echo "AR: $2";
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
else
define ARCHIVE define ARCHIVE
$(Q) for __obj in $(2) ; do \ $(Q) for __obj in $(2) ; do \
echo "AR: $$__obj"; \ echo "AR: $$__obj"; \
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \ "$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
done done
endef endef
endif
define CLEAN define CLEAN
$(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst $(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
endef endef
endif
# This is the tool to use for dependencies (i.e., none) # Windows native host tool definitions
MKDEP = $(TOPDIR)/tools/mknulldeps.sh ifeq ($(CONFIG_WINDOWS_NATIVE),y)
HOSTCC = mingw32-gcc.exe
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS =
HOSTEXEEXT = .exe
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies # Windows-native host tools
DIRLINK = $(TOPDIR)/tools/winlink.sh MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
DIRUNLINK = $(TOPDIR)/tools/unlink.sh else
# Linux/Cygwin host tool definitions # Linux/Cygwin host tool definitions
HOSTCC = gcc HOSTCC = gcc
HOSTINCLUDES = -I. HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS = HOSTLDFLAGS =
# This is the tool to use for dependencies (i.e., none)
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
endif
+1 -1
View File
@@ -111,7 +111,7 @@ CONFIG_HAVE_LOWUARTINIT=y
# #
# Board Settings # Board Settings
# #
CONFIG_DRAM_START= CONFIG_DRAM_START=0
CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_SIZE=65536
# #
+50
View File
@@ -0,0 +1,50 @@
@echo off
rem configs/ez80f810200kitg/ostest/setenv.bat
rem
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
rem Author: Gregory Nutt <gnutt@nuttx.org>
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem
rem 1. Redistributions of source code must retain the above copyright
rem notice, this list of conditions and the following disclaimer.
rem 2. Redistributions in binary form must reproduce the above copyright
rem notice, this list of conditions and the following disclaimer in
rem the documentation and/or other materials provided with the
rem distribution.
rem 3. Neither the name NuttX nor the names of its contributors may be
rem used to endorse or promote products derived from this software
rem without specific prior written permission.
rem
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE.
rem This is the location where I installed in the MinGW compiler. With
rem this configuration, it is recommended that you do NOT install the
rem MSYS tools; they conflict with the GNUWin32 tools. See
rem http://www.mingw.org/ for further info.
set PATH=C:\MinGW\bin;%PATH%
rem This is the location where I installed the ZDS-II toolchain.
set PATH=C:\Program Files (x86)\ZiLOG\ZDSII_eZ80Acclaim!_5.1.1\bin;%PATH%
rem This is the location where I installed the GNUWin32 tools. See
rem http://gnuwin32.sourceforge.net/.
set PATH=C:\gnuwin32\bin;%PATH%
echo %PATH%
+20 -12
View File
@@ -33,20 +33,28 @@
# #
# Check how we were executed # Check how we were executed
# #
if [ "$(basename $0)" = "setenv.sh" ] ; then if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2 echo "You must source this script, not run it!" 1>&2
exit 1 exit 1
fi fi
# WD=`pwd`
# The ZDS-II toolchain lies outside of the Cygwin "sandbox" and if [ ! -x "setenv.sh" ]; then
# attempts to set the PATH variable do not have the desired effect. echo "This script must be executed from the top-level NuttX build directory"
# Instead, alias are provided for all of the ZDS-II command line tools. exit 1
# Version 4.10.1 installed in the default location is assumed here. fi
#
ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_eZ80Acclaim!_4.11.1/bin"
alias ez8asm="${ZDSBINDIR}/ez8asm.exe"
alias ez8cc="${ZDSBINDIR}/ez8cc.exe"
alias ez8lib="${ZDSBINDIR}/ez8lib.exe"
alias ez8link="${ZDSBINDIR}/ez8link.exe"
if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
#
# This is the Cygwin path to location where the XDS-II tools were installed
#
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_eZ80Acclaim!_5.1.1\bin"
#
# Add the path to the toolchain to the PATH varialble
#
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
+18 -11
View File
@@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS = ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AOBJS = $(ASRCS:.S=$(OBJEXT)) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
CSRCS = ez80_lowinit.c ez80_leds.c else
COBJS = $(CSRCS:.c=$(OBJEXT)) WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS) INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
OBJS = $(AOBJS) $(COBJS) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = ez80_lowinit.c ez80_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT) all: libboard$(LIBEXT)
+21 -14
View File
@@ -35,27 +35,34 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS = ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AOBJS = $(ASRCS:.S=$(OBJEXT)) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
CSRCS = ez80_lowinit.c INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = ez80_lowinit.c
ifeq ($(CONFIG_ARCH_LEDS),y) ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += ez80_leds.c CSRCS += ez80_leds.c
endif endif
ifeq ($(CONFIG_ARCH_BUTTONS),y) ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += ez80_buttons.c CSRCS += ez80_buttons.c
endif endif
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT) all: libboard$(LIBEXT)
+4 -6
View File
@@ -1,6 +1,6 @@
@echo off @echo off
rem configs/stm32f4discovery/winbuild/setenv.sh rem configs/stm32f4discovery/winbuild/setenv.bat
rem rem
rem Copyright (C) 2012 Gregory Nutt. All rights reserved. rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
rem Author: Gregory Nutt <gnutt@nuttx.org> rem Author: Gregory Nutt <gnutt@nuttx.org>
@@ -32,6 +32,9 @@ rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE. rem POSSIBILITY OF SUCH DAMAGE.
rem This script is not needed for setting the path because the full path
rem to the ZDI-II tools are used in Make.defs.
rem This is the location where I installed in the MinGW compiler. With rem This is the location where I installed in the MinGW compiler. With
rem this configuration, it is recommended that you do NOT install the rem this configuration, it is recommended that you do NOT install the
rem MSYS tools; they conflict with the GNUWin32 tools. See rem MSYS tools; they conflict with the GNUWin32 tools. See
@@ -39,11 +42,6 @@ rem http://www.mingw.org/ for further info.
set PATH=C:\MinGW\bin;%PATH% set PATH=C:\MinGW\bin;%PATH%
rem This is the location where I installed the CodeSourcey toolchain. See
rem http://www.mentor.com/embedded-software/codesourcery
set PATH=C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin;%PATH%
rem This is the location where I installed the GNUWin32 tools. See rem This is the location where I installed the GNUWin32 tools. See
rem http://gnuwin32.sourceforge.net/. rem http://gnuwin32.sourceforge.net/.
+18 -11
View File
@@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) $(EXTRADEFINES)
ASRCS = ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AOBJS = $(ASRCS:.S=$(OBJEXT)) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
CSRCS = z16f_lowinit.c z16f_leds.c else
COBJS = $(CSRCS:.c=$(OBJEXT)) WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS) INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
OBJS = $(AOBJS) $(COBJS) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z16f_lowinit.c z16f_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT) all: libboard$(LIBEXT)
+1
View File
@@ -47,6 +47,7 @@ CONFIG_ARCH_BOARD="z8encore000zco"
CONFIG_ARCH_BOARD_Z8ENCORE000ZCO=y CONFIG_ARCH_BOARD_Z8ENCORE000ZCO=y
CONFIG_BOARD_LOOPSPERMSEC=1250 CONFIG_BOARD_LOOPSPERMSEC=1250
CONFIG_ENDIAN_BIG=y CONFIG_ENDIAN_BIG=y
CONFIG_DRAM_START=0x0
CONFIG_DRAM_SIZE=65536 CONFIG_DRAM_SIZE=65536
CONFIG_ARCH_LEDS=n CONFIG_ARCH_LEDS=n
# #
+18 -11
View File
@@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS = ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AOBJS = $(ASRCS:.S=$(OBJEXT)) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
CSRCS = z8_lowinit.c z8_leds.c else
COBJS = $(CSRCS:.c=$(OBJEXT)) WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS) INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
OBJS = $(AOBJS) $(COBJS) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z8_lowinit.c z8_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT) all: libboard$(LIBEXT)
+18 -11
View File
@@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS = ifeq ($(CONFIG_WINDOWS_NATIVE),y)
AOBJS = $(ASRCS:.S=$(OBJEXT)) USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
CSRCS = z8_lowinit.c z8_leds.c else
COBJS = $(CSRCS:.c=$(OBJEXT)) WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS) INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
OBJS = $(AOBJS) $(COBJS) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z8_lowinit.c z8_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT) all: libboard$(LIBEXT)
+2 -2
View File
@@ -86,7 +86,7 @@
* suspend the calling thread until delivery of a signal whose action is * suspend the calling thread until delivery of a signal whose action is
* either to execute a signal-catching function or to terminate the * either to execute a signal-catching function or to terminate the
* process. This implementation only waits for any non-blocked signal * process. This implementation only waits for any non-blocked signal
* to be recieved. * to be received.
* *
****************************************************************************/ ****************************************************************************/
@@ -96,7 +96,7 @@ int pause(void)
struct siginfo value; struct siginfo value;
/* Set up for the sleep. Using the empty set means that we are not /* Set up for the sleep. Using the empty set means that we are not
* waiting for any particualar signal. However, any unmasked signal * waiting for any particular signal. However, any unmasked signal
* can still awaken sigtimedwait(). * can still awaken sigtimedwait().
*/ */
+1 -1
View File
@@ -141,7 +141,7 @@ unsigned int sleep(unsigned int seconds)
if (seconds) if (seconds)
{ {
/* Set up for the sleep. Using the empty set means that we are not /* Set up for the sleep. Using the empty set means that we are not
* waiting for any particualar signal. However, any unmasked signal * waiting for any particular signal. However, any unmasked signal
* can still awaken sigtimedwait(). * can still awaken sigtimedwait().
*/ */
+1 -1
View File
@@ -137,7 +137,7 @@ int usleep(useconds_t usec)
if (usec) if (usec)
{ {
/* Set up for the sleep. Using the empty set means that we are not /* Set up for the sleep. Using the empty set means that we are not
* waiting for any particualar signal. However, any unmasked signal * waiting for any particular signal. However, any unmasked signal
* can still awaken sigtimedwait(). * can still awaken sigtimedwait().
*/ */
+5 -1
View File
@@ -344,6 +344,7 @@ mknulldeps.sh
that mixed environment. that mixed environment.
define.sh define.sh
define.bat
--------- ---------
Different compilers have different conventions for specifying pre- Different compilers have different conventions for specifying pre-
@@ -351,6 +352,9 @@ define.sh
script allows the build system to create create command line definitions script allows the build system to create create command line definitions
without concern for the particular compiler in use. without concern for the particular compiler in use.
The define.bat script is a counterpart for use in the native Windows
build.
incdir.sh incdir.sh
incdir.bat incdir.bat
--------- ---------
@@ -361,7 +365,7 @@ incdir.bat
concern for the particular compiler in use. concern for the particular compiler in use.
The incdir.bat script is a counterpart for use in the native Windows The incdir.bat script is a counterpart for use in the native Windows
build. However, their is currently only one compiler supported in build. However, there is currently only one compiler supported in
that context: MinGW-GCC. that context: MinGW-GCC.
link.sh link.sh
+24 -12
View File
@@ -135,11 +135,15 @@ fi
# Extract values needed from the defconfig file. We need: # Extract values needed from the defconfig file. We need:
# (1) The CONFIG_NUTTX_NEWCONFIG setting to know if this is a "new" style # (1) The CONFIG_NUTTX_NEWCONFIG setting to know if this is a "new" style
# configuration, and # configuration,
# (2) The CONFIG_APPS_DIR to see if there is a configured location for the # (2) The CONFIG_WINDOWS_NATIVE setting to know it this is target for a
# application directory. # native Windows (meaning that we want setenv.bat vs setenv.sh and we need
# to use backslashes in the CONFIG_APPS_DIR setting).
# (3) The CONFIG_APPS_DIR setting to see if there is a configured location for the
# application directory. This can be overridden from the command line.
newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${src_config}" | cut -d'=' -f2` newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${src_config}" | cut -d'=' -f2`
winnative=`grep CONFIG_WINDOWS_NATIVE= "${src_config}" | cut -d'=' -f2`
defappdir=y defappdir=y
if [ -z "${appdir}" ]; then if [ -z "${appdir}" ]; then
@@ -175,24 +179,29 @@ if [ -z "${appdir}" ]; then
fi fi
fi fi
# For checking the apps dir path, we need a POSIX version of the relative path.
posappdir=`echo "${appdir}" | sed -e "s/\\/\/g"`
winappdir=`echo "${appdir}" | sed -e "s/\//\\/g"`
# If appsdir was provided (or discovered) then make sure that the apps/ # If appsdir was provided (or discovered) then make sure that the apps/
# directory exists # directory exists
if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${appdir}" ]; then if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${posappdir}" ]; then
echo "Directory \"${TOPDIR}/${appdir}\" does not exist" echo "Directory \"${TOPDIR}/${posappdir}\" does not exist"
exit 7 exit 7
fi fi
# Okay... Everything looks good. Setup the configuration # Okay... Everything looks good. Setup the configuration
install -C "${src_makedefs}" "${dest_makedefs}" || \ install "${src_makedefs}" "${dest_makedefs}" || \
{ echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; } { echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; }
if [ "X${have_setenv}" = "Xy" ]; then if [ "X${have_setenv}" = "Xy" ]; then
install -C "${src_setenv}" "${dest_setenv}" || \ install "${src_setenv}" "${dest_setenv}" || \
{ echo "Failed to copy ${src_setenv}" ; exit 8 ; } { echo "Failed to copy ${src_setenv}" ; exit 8 ; }
chmod 755 "${dest_setenv}" chmod 755 "${dest_setenv}"
fi fi
install -C "${src_config}" "${tmp_config}" || \ install "${src_config}" "${tmp_config}" || \
{ echo "Failed to copy \"${src_config}\"" ; exit 9 ; } { echo "Failed to copy \"${src_config}\"" ; exit 9 ; }
# If we did not use the CONFIG_APPS_DIR that was in the defconfig config file, # If we did not use the CONFIG_APPS_DIR that was in the defconfig config file,
@@ -204,7 +213,11 @@ if [ "X${defappdir}" = "Xy" ]; then
echo "" >> "${tmp_config}" echo "" >> "${tmp_config}"
echo "# Application configuration" >> "${tmp_config}" echo "# Application configuration" >> "${tmp_config}"
echo "" >> "${tmp_config}" echo "" >> "${tmp_config}"
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${tmp_config}" if [ "X${winnative)" = "Xy" ]; then
echo "CONFIG_APPS_DIR=\"$winappdir\"" >> "${tmp_config}"
else
echo "CONFIG_APPS_DIR=\"$posappdir\"" >> "${tmp_config}"
fi
fi fi
# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config # Copy appconfig file. The appconfig file will be copied to ${appdir}/.config
@@ -215,7 +228,7 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then
if [ ! -r "${configpath}/appconfig" ]; then if [ ! -r "${configpath}/appconfig" ]; then
echo "NOTE: No readable appconfig file found in ${configpath}" echo "NOTE: No readable appconfig file found in ${configpath}"
else else
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \ install "${configpath}/appconfig" "${TOPDIR}/${posappdir}/.config" || \
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; } { echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
fi fi
fi fi
@@ -223,6 +236,5 @@ fi
# install the final .configX only if it differs from any existing # install the final .configX only if it differs from any existing
# .config file. # .config file.
install -C "${tmp_config}" "${dest_config}" install "${tmp_config}" "${dest_config}"
rm -f "${tmp_config}" rm -f "${tmp_config}"
+178
View File
@@ -0,0 +1,178 @@
@echo off
rem tools/define.bat
rem
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
rem Author: Gregory Nutt <gnutt@nuttx.org>
rem
rem Redistribution and use in source and binary forms, with or without
rem modification, are permitted provided that the following conditions
rem are met:
rem
rem 1. Redistributions of source code must retain the above copyright
rem notice, this list of conditions and the following disclaimer.
rem 2. Redistributions in binary form must reproduce the above copyright
rem notice, this list of conditions and the following disclaimer in
rem the documentation and/or other materials provided with the
rem distribution.
rem 3. Neither the name NuttX nor the names of its contributors may be
rem used to endorse or promote products derived from this software
rem without specific prior written permission.
rem
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
rem POSSIBILITY OF SUCH DAMAGE.
rem Handle command line options
rem [-h] <compiler-path> <def1> [-val <val1>] [<def2> [-val <val2>] [<def3> [-val <val3>] ...]]
rem [-w] [-d] ignored for compatibility with define.sh
set progname=%0
:ArgLoop
if "%1"=="-d" goto :NextArg
if "%1"=="-w" goto :NextArg
if "%1"=="-h" goto :ShowUsage
goto :CheckCompilerPath
:NextArg
shift
goto :ArgLoop
:CheckCompilerPath
if "%1"=="" (
echo Missing compiler path
goto :ShowUsage
)
set ccpath=%1
shift
set compiler=
for /F %%i in ("%ccpath%") do set compiler=%%~ni
if "%1"=="" (
echo Missing definition list
goto :ShowUsage
)
rem Check for some well known, non-GCC Windows native tools that require
rem a special output format as well as special paths
:GetFormat
set fmt=std
if "%compiler%"=="ez8cc" goto :SetZdsFormt
if "%compiler%"=="zneocc" goto :SetZdsFormt
if "%compiler%"=="ez80cc" goto :SetZdsFormt
goto :ProcessDefinitions
:SetZdsFormt
set fmt=zds
rem Now process each directory in the directory list
:ProcessDefinitions
set response=
:DefinitionLoop
if "%1"=="" goto :Done
set varname=%1
shift
rem Handle the output depending on if there is a value for the variable or not
if "%1"=="-val" goto :GetValue
rem Handle the output using the selected format
:NoValue
if "%fmt%"=="zds" goto :NoValueZDS
:NoValueStandard
rem Treat the first definition differently
if "%response%"=="" (
set response=-D%varname%
goto :DefinitionLoop
)
set response=%response% -D%varname%
goto :DefinitionLoop
:NoValueZDS
rem Treat the first definition differently
if "%response%"=="" (
set response=-define:%varname%
goto :DefinitionLoop
)
set response=%response% -define:%varname%
goto :DefinitionLoop
rem Get value following the variable name
:GetValue
shift
set varvalue=%1
shift
rem Handle the output using the selected format
if "%fmt%"=="zds" goto :ValueZDS
:ValueStandard
rem Treat the first definition differently
if "%response%"=="" (
set response=-D%varname%=%varvalue%
goto :DefinitionLoop
)
set response=%response% -D%varname%=%varvalue%
goto :DefinitionLoop
:ValueZds
rem Treat the first definition differently
if "%response%"=="" (
set response=-define:%varname%=%varvalue%
goto :DefinitionLoop
)
set response=%response% -define:%varname%=%varvalue%
goto :DefinitionLoop
:Done
echo %response%
goto :End
:ShowUsage
echo %progname% is a tool for flexible generation of command line pre-processor
echo definitions arguments for a variety of diffent ccpaths in a variety of
echo compilation environments"
echo USAGE:%progname% [-h] ^<compiler-path^> [-val ^<^val1^>] [^<def2^> [-val ^<val2^>] [^<def3^> [-val ^<val3^>] ...]]
echo Where:"
echo ^<compiler-path^>
echo The full path to your ccpath
echo ^<def1^> ^<def2^> ^<def3^> ...
echo A list of pre-preprocesser variable names to be defined.
echo [-val ^<val1^>] [-val ^<val2^>] [-val ^<val3^>] ...
echo optional values to be assigned to each pre-processor variable.
echo If not supplied, the variable will be defined with no explicit value.
echo -h
echo Show this text and exit
:End
+4 -4
View File
@@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# tools/define.sh # tools/define.sh
# #
# Copyright (C) 2011 Gregory Nutt. All rights reserved. # Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@
progname=$0 progname=$0
wintool=n wintool=n
usage="USAGE: $progname [-w] [-d] [-l] [-h] <compiler-path> <def1>[=val1] [<def2>[=val2] [<def3>[=val3] ...]]" usage="USAGE: $progname [-w] [-d] [-h] <compiler-path> <def1>[=val1] [<def2>[=val2] [<def3>[=val3] ...]]"
advice="Try '$progname -h' for more information" advice="Try '$progname -h' for more information"
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
@@ -60,7 +60,7 @@ while [ ! -z "$1" ]; do
echo " <compiler-path>" echo " <compiler-path>"
echo " The full path to your compiler" echo " The full path to your compiler"
echo " <def1> <def2> [<def3> ..." echo " <def1> <def2> [<def3> ..."
echo " A list of pre-preprocesser variable names to be defind." echo " A list of pre-preprocesser variable names to be defined."
echo " [=val1] [=val2] [=val3]" echo " [=val1] [=val2] [=val3]"
echo " optional values to be assigned to each pre-processor variable." echo " optional values to be assigned to each pre-processor variable."
echo " If not supplied, the variable will be defined with no explicit value." echo " If not supplied, the variable will be defined with no explicit value."
@@ -164,7 +164,7 @@ else
fmt=std fmt=std
fi fi
# Now process each directory in the directory list # Now process each definition in the definition list
unset response unset response
for vardef in $varlist; do for vardef in $varlist; do
+7 -7
View File
@@ -314,18 +314,18 @@ static void parse_args(int argc, char **argv)
if (g_debug) if (g_debug)
{ {
fprintf(stderr, "SELECTIONS\n"); fprintf(stderr, "SELECTIONS\n");
fprintf(stderr, " CC : \"%s\"\n", g_cc ? g_cc : "(None)"); fprintf(stderr, " CC : [%s]\n", g_cc ? g_cc : "(None)");
fprintf(stderr, " CFLAGS : \"%s\"\n", g_cflags ? g_cflags : "(None)"); fprintf(stderr, " CFLAGS : [%s]\n", g_cflags ? g_cflags : "(None)");
fprintf(stderr, " FILES : \"%s\"\n", g_files ? g_files : "(None)"); fprintf(stderr, " FILES : [%s]\n", g_files ? g_files : "(None)");
fprintf(stderr, " PATHS : \"%s\"\n", g_altpath ? g_altpath : "(None)"); fprintf(stderr, " PATHS : [%s]\n", g_altpath ? g_altpath : "(None)");
#ifdef HAVE_WINPATH #ifdef HAVE_WINPATH
fprintf(stderr, " Windows Paths : \"%s\"\n", g_winpath ? "TRUE" : "FALSE"); fprintf(stderr, " Windows Paths : [%s]\n", g_winpath ? "TRUE" : "FALSE");
if (g_winpath) if (g_winpath)
{ {
fprintf(stderr, " TOPDIR : \"%s\"\n", g_topdir); fprintf(stderr, " TOPDIR : [%s]\n", g_topdir);
} }
#endif #endif
fprintf(stderr, " Windows Native : \"%s\"\n", g_winnative ? "TRUE" : "FALSE"); fprintf(stderr, " Windows Native : [%s]\n", g_winnative ? "TRUE" : "FALSE");
} }
/* Check for required paramters */ /* Check for required paramters */