Browse Source

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

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5377 42af7a65-404d-4744-a932-0658087f49c3
sbg
patacongo 12 years ago
parent
commit
b665308a87
  1. 2
      nuttx/Documentation/NuttxUserGuide.html
  2. 2
      nuttx/Kconfig
  3. 2
      nuttx/Makefile.win
  4. 114
      nuttx/arch/z80/src/Makefile.zdsii
  5. 27
      nuttx/configs/ez80f910200kitg/README.txt
  6. 205
      nuttx/configs/ez80f910200kitg/ostest/Make.defs
  7. 2
      nuttx/configs/ez80f910200kitg/ostest/defconfig
  8. 50
      nuttx/configs/ez80f910200kitg/ostest/setenv.bat
  9. 28
      nuttx/configs/ez80f910200kitg/ostest/setenv.sh
  10. 29
      nuttx/configs/ez80f910200kitg/src/Makefile
  11. 35
      nuttx/configs/ez80f910200zco/src/Makefile
  12. 10
      nuttx/configs/stm32f4discovery/winbuild/setenv.bat
  13. 29
      nuttx/configs/z16f2800100zcog/src/Makefile
  14. 1
      nuttx/configs/z8encore000zco/ostest/defconfig
  15. 29
      nuttx/configs/z8encore000zco/src/Makefile
  16. 29
      nuttx/configs/z8f64200100kit/src/Makefile
  17. 4
      nuttx/sched/pause.c
  18. 2
      nuttx/sched/sleep.c
  19. 2
      nuttx/sched/usleep.c
  20. 6
      nuttx/tools/README.txt
  21. 36
      nuttx/tools/configure.sh
  22. 178
      nuttx/tools/define.bat
  23. 8
      nuttx/tools/define.sh
  24. 14
      nuttx/tools/mkdeps.c

2
nuttx/Documentation/NuttxUserGuide.html

@ -4027,7 +4027,7 @@ be sent. @@ -4027,7 +4027,7 @@ be sent.
<p>
<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.
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>
<table width ="100%">

2
nuttx/Kconfig

@ -67,7 +67,7 @@ endchoice @@ -67,7 +67,7 @@ endchoice
config WINDOWS_MKLINK
bool "Use mklink"
default y
default n
depends on WINDOWS_NATIVE
---help---
Use the mklink command to set up symbolic links when NuttX is

2
nuttx/Makefile.win

@ -49,7 +49,7 @@ endif @@ -49,7 +49,7 @@ endif
# This define is passed as EXTRADEFINES for kernel-mode builds. It is also passed
# 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

114
nuttx/arch/z80/src/Makefile.zdsii

@ -35,44 +35,52 @@ @@ -35,44 +35,52 @@
############################################################################
# Tools
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPFLAGS += -I$(ARCHSRCDIR) -I$(ZDSSTDINCDIR) -I$(ZDSZILOGINCDIR)
LDFLAGS += @nuttx.linkcmd
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
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
ifneq ($(HEAD_SSRC),)
HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT))
HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT))
HEAD_GENSRC = $(HEAD_SSRC:.S=$(ASMEXT))
HEAD_OBJ = $(HEAD_SSRC:.S=$(OBJEXT))
else
HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
HEAD_OBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
endif
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
GENSRCS = $(SSRCS:.S=$(ASMEXT))
AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT))
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
GENSRCS = $(SSRCS:.S=$(ASMEXT))
AOBJS = $(SSRCS:.S=$(OBJEXT)) $(ASRCS:$(ASMEXT)=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
DEPSRCS = $(SSRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
DEPSRCS = $(SSRCS) $(CSRCS)
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
all: $(HEAD_OBJ) libarch$(LIBEXT)
.PHONY: board/libboard$(LIBEXT)
.PHONY: board$(DELIM)libboard$(LIBEXT)
$(HEAD_GENSRC) $(GENSRCS) : %$(ASMEXT): %.S
$(Q) $(CPP) $(CPPFLAGS) $< -o $@.tmp
@ -88,17 +96,46 @@ $(COBJS): %$(OBJEXT): %.c @@ -88,17 +96,46 @@ $(COBJS): %$(OBJEXT): %.c
libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
board/libboard$(LIBEXT):
board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
nuttx.linkcmd: $(LINKCMDTEMPLATE)
$(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
@echo "\"${shell cygpath -w "$(TOPDIR)/nuttx"}\"= \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ARCHSRCDIR)/$(HEAD_OBJ)"}\", \\" >>nuttx.linkcmd
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
@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 \
echo " \"`cygpath -w "$(TOPDIR)/lib/$${lib}"`\", \\" >>nuttx.linkcmd; \
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)
@echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/chelprevaaD$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ZDSSTDLIBDIR)/crtrevaaLDD$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@ -120,34 +157,43 @@ ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y) @@ -120,34 +157,43 @@ ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
@echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/gpio$(LIBEXT)"}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w "$(ZDSZILOGLIBDIR)/uartf91$(LIBEXT)"}\"" >>nuttx.linkcmd
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)"
$(Q) "$(LD)" $(LDFLAGS)
.depend: Makefile chip/Make.defs $(DEPSRCS)
$(Q) if [ -e board/Makefile ]; then \
.depend: Makefile chip$(DELIM)Make.defs $(DEPSRCS)
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 ; \
fi
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
$(Q) touch $@
# This is part of the top-level export target
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
$(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
export_head: board$(DELIM)libboard$(LIBEXT) $(HEAD_OBJ)
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(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 \
echo "$(EXPORT_DIR)/startup does not exist"; \
echo "$(EXPORT_DIR)$(DELIM)startup does not exist"; \
exit 1; \
fi
endif
# Dependencies
depend: .depend
clean:
$(Q) if [ -e board/Makefile ]; then \
$(Q) if [ -e board$(DELIM)Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
$(call DELFILE, nuttx.linkcmd)
@ -158,7 +204,7 @@ clean: @@ -158,7 +204,7 @@ clean:
$(call CLEAN)
distclean: clean
$(Q) if [ -e board/Makefile ]; then \
$(Q) if [ -e board$(DELIM)Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
$(call DELFILE, Make.dep)

27
nuttx/configs/ez80f910200kitg/README.txt

@ -83,13 +83,28 @@ available: @@ -83,13 +83,28 @@ available:
This builds the examples/ostest application for execution from FLASH.
See examples/README.txt for information about ostest.
This configuration uses the mconf-based configuration tool. To
change this configuration using that tool, you should:
NOTES:
a. Build and install the mconf tool. See nuttx/README.txt and
misc/tools/
1. This configuration uses the mconf-based configuration tool. To
change this configuration using that tool, you should:
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
a. Build and install the mconf tool. See nuttx/README.txt and
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.

205
nuttx/configs/ez80f910200kitg/ostest/Make.defs

@ -47,6 +47,20 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) @@ -47,6 +47,20 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
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
WINTOOL := y
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
@ -55,99 +69,139 @@ else @@ -55,99 +69,139 @@ else
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
endif
# These are the same directories but with the directory separator
# character swapped as needed by the ZDS-II compiler
# 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)"}
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
# 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"}
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
# Assembler definitions
ifeq ($(CONFIG_ARCH_CHIP_EZ80F91),y)
ARCHCPU = eZ80F91
ARCHCPUDEF = _EZ80F91
ARCHFAMILY = _EZ80ACCLAIM!
ARCHCPU = eZ80F91
ARCHCPUDEF = _EZ80F91
ARCHFAMILY = _EZ80ACCLAIM!
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHASMOPTIMIZATION = -debug -NOsdiopt
ARCHASMOPTIMIZATION = -debug -NOsdiopt
else
ARCHASMOPTIMIZATION = -nodebug -NOsdiopt
ARCHASMOPTIMIZATION = -nodebug -NOsdiopt
endif
ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase
ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn
ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
$(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
ARCHASMCPUFLAGS = -cpu:$(ARCHCPU) -NOigcase
ARCHASMLIST = -list -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
ARCHASMWARNINGS = -warn
ARCHASMDEFINES = -define:$(ARCHCPUDEF)=1 -define:$(ARCHFAMILYDEF)=1 -define:__ASSEMBLY__
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) \
$(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
# Compiler definitions
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = -debug -reduceopt
ARCHOPTIMIZATION = -debug -reduceopt
else
ARCHOPTIMIZATION = -nodebug -optsize
ARCHOPTIMIZATION = -nodebug -optsize
endif
ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \
-asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF)
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
ARCHUSRINCLUDES = -usrinc:'.'
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) \
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)/include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \
-asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm
ARCHPICFLAGS =
ARCHWARNINGS = -warn
ARCHDEFINES = -define:$(ARCHCPUDEF) -define:$(ARCHFAMILYDEF)
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
CPPDEFINES = -D$(ARCHFAMILYDEF) -D$(ARCHCPUDEF) -D__ASSEMBLY__
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
# Librarian definitions
ARFLAGS = -quiet -warn
ARFLAGS = -quiet -warn
# Linker definitions
LINKCMDTEMPLATE = $(TOPDIR)/configs/ez80f910200kitg/ostest/ostest.linkcmd
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)ez80f910200kitg$(DELIM)ostest$(DELIM)ostest.linkcmd
# Tool names/pathes
CROSSDEV =
CC = $(ZDSBINDIR)/ez80cc.exe
CPP = gcc -E
LD = $(ZDSBINDIR)/ez80link.exe
AS = $(ZDSBINDIR)/ez80asm.exe
AR = $(ZDSBINDIR)/ez80lib.exe
CROSSDEV =
CPP = gcc -E
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
# PATH varialble should be set
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
ASMEXT = .asm
OBJEXT = .obj
LIBEXT = .lib
EXEEXT = .lod
HEXEXT = .hex
ASMEXT = .asm
OBJEXT = .obj
LIBEXT = .lib
EXEEXT = .lod
HEXEXT = .hex
# These are the macros that will be used in the NuttX make system
# to compile and assembly source files and to insert the resulting
# 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
@echo "CPP: $1->$2"
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
@ -163,36 +217,45 @@ define ASSEMBLE @@ -163,36 +217,45 @@ define ASSEMBLE
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
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
$(Q) for __obj in $(2) ; do \
echo "AR: $$__obj"; \
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
done
endef
endif
define CLEAN
$(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
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
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
else
# Linux/Cygwin host tool definitions
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS =
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -wstrict-prototypes -Wshadow -g -pipe
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

2
nuttx/configs/ez80f910200kitg/ostest/defconfig

@ -111,7 +111,7 @@ CONFIG_HAVE_LOWUARTINIT=y @@ -111,7 +111,7 @@ CONFIG_HAVE_LOWUARTINIT=y
#
# Board Settings
#
CONFIG_DRAM_START=
CONFIG_DRAM_START=0
CONFIG_DRAM_SIZE=65536
#

50
nuttx/configs/ez80f910200kitg/ostest/setenv.bat

@ -0,0 +1,50 @@ @@ -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%

28
nuttx/configs/ez80f910200kitg/ostest/setenv.sh

@ -33,20 +33,28 @@ @@ -33,20 +33,28 @@
#
# 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
exit 1
fi
WD=`pwd`
if [ ! -x "setenv.sh" ]; then
echo "This script must be executed from the top-level NuttX build directory"
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
#
# The ZDS-II toolchain lies outside of the Cygwin "sandbox" and
# attempts to set the PATH variable do not have the desired effect.
# Instead, alias are provided for all of the ZDS-II command line tools.
# Version 4.10.1 installed in the default location is assumed here.
# This is the Cygwin path to location where the XDS-II tools were installed
#
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"
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}"

29
nuttx/configs/ez80f910200kitg/src/Makefile

@ -35,20 +35,27 @@ @@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = ez80_lowinit.c ez80_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
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)

35
nuttx/configs/ez80f910200zco/src/Makefile

@ -35,27 +35,34 @@ @@ -35,27 +35,34 @@
-include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
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)
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = ez80_lowinit.c
CSRCS = ez80_lowinit.c
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += ez80_leds.c
CSRCS += ez80_leds.c
endif
ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += ez80_buttons.c
CSRCS += ez80_buttons.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT)

10
nuttx/configs/stm32f4discovery/winbuild/setenv.bat

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@echo off
rem configs/stm32f4discovery/winbuild/setenv.sh
rem configs/stm32f4discovery/winbuild/setenv.bat
rem
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
rem Author: Gregory Nutt <gnutt@nuttx.org>
@ -32,6 +32,9 @@ rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN @@ -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 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 configuration, it is recommended that you do NOT install the
rem MSYS tools; they conflict with the GNUWin32 tools. See
@ -39,11 +42,6 @@ rem http://www.mingw.org/ for further info. @@ -39,11 +42,6 @@ rem http://www.mingw.org/ for further info.
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 http://gnuwin32.sourceforge.net/.

29
nuttx/configs/z16f2800100zcog/src/Makefile

@ -35,20 +35,27 @@ @@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) $(EXTRADEFINES)
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z16f_lowinit.c z16f_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
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)

1
nuttx/configs/z8encore000zco/ostest/defconfig

@ -47,6 +47,7 @@ CONFIG_ARCH_BOARD="z8encore000zco" @@ -47,6 +47,7 @@ CONFIG_ARCH_BOARD="z8encore000zco"
CONFIG_ARCH_BOARD_Z8ENCORE000ZCO=y
CONFIG_BOARD_LOOPSPERMSEC=1250
CONFIG_ENDIAN_BIG=y
CONFIG_DRAM_START=0x0
CONFIG_DRAM_SIZE=65536
CONFIG_ARCH_LEDS=n
#

29
nuttx/configs/z8encore000zco/src/Makefile

@ -35,20 +35,27 @@ @@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z8_lowinit.c z8_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
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)

29
nuttx/configs/z8f64200100kit/src/Makefile

@ -35,20 +35,27 @@ @@ -35,20 +35,27 @@
-include $(TOPDIR)/Make.defs
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = z8_lowinit.c z8_leds.c
COBJS = $(CSRCS:.c=$(OBJEXT))
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
USRINCLUDES = -usrinc:'.;$(WSCHEDSRCDIR);$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
endif
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
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)

4
nuttx/sched/pause.c

@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
* 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.
* to be received.
*
****************************************************************************/
@ -96,7 +96,7 @@ int pause(void) @@ -96,7 +96,7 @@ int pause(void)
struct siginfo value;
/* 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().
*/

2
nuttx/sched/sleep.c

@ -141,7 +141,7 @@ unsigned int sleep(unsigned int seconds) @@ -141,7 +141,7 @@ unsigned int sleep(unsigned int seconds)
if (seconds)
{
/* 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().
*/

2
nuttx/sched/usleep.c

@ -137,7 +137,7 @@ int usleep(useconds_t usec) @@ -137,7 +137,7 @@ int usleep(useconds_t usec)
if (usec)
{
/* 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().
*/

6
nuttx/tools/README.txt

@ -344,6 +344,7 @@ mknulldeps.sh @@ -344,6 +344,7 @@ mknulldeps.sh
that mixed environment.
define.sh
define.bat
---------
Different compilers have different conventions for specifying pre-
@ -351,6 +352,9 @@ define.sh @@ -351,6 +352,9 @@ define.sh
script allows the build system to create create command line definitions
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.bat
---------
@ -361,7 +365,7 @@ incdir.bat @@ -361,7 +365,7 @@ incdir.bat
concern for the particular compiler in use.
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.
link.sh

36
nuttx/tools/configure.sh

@ -135,11 +135,15 @@ fi @@ -135,11 +135,15 @@ fi
# Extract values needed from the defconfig file. We need:
# (1) The CONFIG_NUTTX_NEWCONFIG setting to know if this is a "new" style
# configuration, and
# (2) The CONFIG_APPS_DIR to see if there is a configured location for the
# application directory.
# configuration,
# (2) The CONFIG_WINDOWS_NATIVE setting to know it this is target for a
# 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`
winnative=`grep CONFIG_WINDOWS_NATIVE= "${src_config}" | cut -d'=' -f2`
defappdir=y
if [ -z "${appdir}" ]; then
@ -175,24 +179,29 @@ if [ -z "${appdir}" ]; then @@ -175,24 +179,29 @@ if [ -z "${appdir}" ]; then
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/
# directory exists
if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${appdir}" ]; then
echo "Directory \"${TOPDIR}/${appdir}\" does not exist"
if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${posappdir}" ]; then
echo "Directory \"${TOPDIR}/${posappdir}\" does not exist"
exit 7
fi
# 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 ; }
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 ; }
chmod 755 "${dest_setenv}"
fi
install -C "${src_config}" "${tmp_config}" || \
install "${src_config}" "${tmp_config}" || \
{ echo "Failed to copy \"${src_config}\"" ; exit 9 ; }
# 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 @@ -204,7 +213,11 @@ if [ "X${defappdir}" = "Xy" ]; then
echo "" >> "${tmp_config}"
echo "# Application configuration" >> "${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
# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config
@ -215,7 +228,7 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then @@ -215,7 +228,7 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then
if [ ! -r "${configpath}/appconfig" ]; then
echo "NOTE: No readable appconfig file found in ${configpath}"
else
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \
install "${configpath}/appconfig" "${TOPDIR}/${posappdir}/.config" || \
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
fi
fi
@ -223,6 +236,5 @@ fi @@ -223,6 +236,5 @@ fi
# install the final .configX only if it differs from any existing
# .config file.
install -C "${tmp_config}" "${dest_config}"
install "${tmp_config}" "${dest_config}"
rm -f "${tmp_config}"

178
nuttx/tools/define.bat

@ -0,0 +1,178 @@ @@ -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

8
nuttx/tools/define.sh

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/bin/bash
# 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>
#
# Redistribution and use in source and binary forms, with or without
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
progname=$0
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"
while [ ! -z "$1" ]; do
@ -60,7 +60,7 @@ while [ ! -z "$1" ]; do @@ -60,7 +60,7 @@ while [ ! -z "$1" ]; do
echo " <compiler-path>"
echo " The full path to your compiler"
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 " optional values to be assigned to each pre-processor variable."
echo " If not supplied, the variable will be defined with no explicit value."
@ -164,7 +164,7 @@ else @@ -164,7 +164,7 @@ else
fmt=std
fi
# Now process each directory in the directory list
# Now process each definition in the definition list
unset response
for vardef in $varlist; do

14
nuttx/tools/mkdeps.c

@ -314,18 +314,18 @@ static void parse_args(int argc, char **argv) @@ -314,18 +314,18 @@ static void parse_args(int argc, char **argv)
if (g_debug)
{
fprintf(stderr, "SELECTIONS\n");
fprintf(stderr, " CC : \"%s\"\n", g_cc ? g_cc : "(None)");
fprintf(stderr, " CFLAGS : \"%s\"\n", g_cflags ? g_cflags : "(None)");
fprintf(stderr, " FILES : \"%s\"\n", g_files ? g_files : "(None)");
fprintf(stderr, " PATHS : \"%s\"\n", g_altpath ? g_altpath : "(None)");
fprintf(stderr, " CC : [%s]\n", g_cc ? g_cc : "(None)");
fprintf(stderr, " CFLAGS : [%s]\n", g_cflags ? g_cflags : "(None)");
fprintf(stderr, " FILES : [%s]\n", g_files ? g_files : "(None)");
fprintf(stderr, " PATHS : [%s]\n", g_altpath ? g_altpath : "(None)");
#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)
{
fprintf(stderr, " TOPDIR : \"%s\"\n", g_topdir);
fprintf(stderr, " TOPDIR : [%s]\n", g_topdir);
}
#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 */

Loading…
Cancel
Save