summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-29 22:27:22 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-11-29 22:27:22 +0000
commita4792fbbd0f941bf00288b08a42d7359fe432239 (patch)
tree9b05f73e009a7fd112905bcf4cbcf2859b32457b
parent034d4bae4d118facfe7af8b4f921f3af89342527 (diff)
downloadnuttx-a4792fbbd0f941bf00288b08a42d7359fe432239.tar.gz
nuttx-a4792fbbd0f941bf00288b08a42d7359fe432239.tar.bz2
nuttx-a4792fbbd0f941bf00288b08a42d7359fe432239.zip
ZNEO now (almost) builds in Windows native environment
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5402 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--misc/pascal/nuttx/Makefile9
-rw-r--r--nuttx/ChangeLog7
-rw-r--r--nuttx/arch/z16/src/Makefile22
-rw-r--r--nuttx/binfmt/Makefile1
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/dhcpd/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/httpd/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/nettest/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/nsh/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/Make.defs2
-rw-r--r--nuttx/configs/ez80f910200zco/poll/Make.defs2
-rw-r--r--nuttx/configs/z16f2800100zcog/README.txt3
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/Make.defs2
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/defconfig8
-rw-r--r--nuttx/configs/z16f2800100zcog/pashello/Make.defs2
-rw-r--r--nuttx/configs/z16f2800100zcog/pashello/defconfig8
-rw-r--r--nuttx/configs/z16f2800100zcog/src/Makefile2
-rw-r--r--nuttx/configs/z8encore000zco/ostest/Make.defs2
-rw-r--r--nuttx/configs/z8f64200100kit/ostest/Make.defs2
-rw-r--r--nuttx/drivers/Makefile1
-rw-r--r--nuttx/syscall/Makefile2
21 files changed, 62 insertions, 23 deletions
diff --git a/misc/pascal/nuttx/Makefile b/misc/pascal/nuttx/Makefile
index aa041eb23..cfabb1424 100644
--- a/misc/pascal/nuttx/Makefile
+++ b/misc/pascal/nuttx/Makefile
@@ -33,10 +33,15 @@
#
############################################################################
-PCODEDIR := ${shell pwd | sed -e 's/ /\\ /g'}
-
-include $(TOPDIR)/Make.defs
include $(APPDIR)$(DELIM)Make.defs
+DELIM ?= $(strip /)
+
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ PCODEDIR := ${shell echo %CD%}
+else
+ PCODEDIR := ${shell pwd | sed -e 's/ /\\ /g'}
+endif
# Default tools
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index f986619a3..73c873f01 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3712,7 +3712,10 @@
From Freddie Chopin.
* z8encore000zco/ostest and z8f64200100kit/ostest: Can now be modified to
support the Windows native builds (see corresponding README.txt files).
- * configures/z16f2800100zcog - All configurations updated to use the ZDS-II
+ * configs/z16f2800100zcog - All configurations updated to use the ZDS-II
5.0.1 toolchain.
- * configures/z16f2800100zcog - All configurations updated to use Kconfig/mconf
+ * configs/z16f2800100zcog - All configurations updated to use Kconfig/mconf
configuration tools.
+ * configs/z16f2800100zcog/ostest - Now supports a native Windows build
+ (other ZNEO configs may also support the native build, but this has not
+ been verfiied).
diff --git a/nuttx/arch/z16/src/Makefile b/nuttx/arch/z16/src/Makefile
index f209dcaed..5c0ef42be 100644
--- a/nuttx/arch/z16/src/Makefile
+++ b/nuttx/arch/z16/src/Makefile
@@ -56,10 +56,10 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHD
CPPFLAGS += -I$(ARCHSRCDIR)
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- LDFLAGS += @"$(ARCHSRCDIR)/nuttx.linkcmd"
+ LDFLAGS += @"$(ARCHSRCDIR)/nuttx.linkcmd"
else
ifeq ($(COMPILER),zneocc.exe)
- LDFLAGS += @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
+ LDFLAGS += @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
endif
endif
@@ -108,7 +108,7 @@ ifeq ($(COMPILER),zneocc.exe)
nuttx.linkcmd: $(LINKCMDTEMPLATE)
$(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- @echo "$(TOPDIR)\nuttx}"= \>>nuttx.linkcmd
+ @echo "$(TOPDIR)\nuttx"= \>>nuttx.linkcmd
@echo "$(ARCHSRCDIR)\$(HEAD_OBJ)", \>>nuttx.linkcmd
$(Q) for %%G in ($(LINKLIBS)) do ( echo "$(TOPDIR)\lib\%%G", \>>nuttx.linkcmd )
@echo "$(ARCHSRCDIR)\board\libboard$(LIBEXT)", \>>nuttx.linkcmd
@@ -133,30 +133,42 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx.linkcmd
$(Q) $(LD) $(LDFLAGS)
.depend: Makefile chip/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/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)
+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)/startup" ]; then \
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
else \
echo "$(EXPORT_DIR)/startup does not exist"; \
exit 1; \
fi
+endif
# Dependencies
depend: .depend
clean:
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" clean )
+else
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
+endif
ifeq ($(COMPILER),zneocc.exe)
$(call DELFILE, nuttx.linkcmd)
$(call DELFILE, *.asm)
@@ -167,9 +179,13 @@ endif
$(call CLEAN)
distclean: clean
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ $(Q) if exist board$(DELIM)Makefile ( $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean )
+else
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
+endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile
index 932a5ec13..bda9602ac 100644
--- a/nuttx/binfmt/Makefile
+++ b/nuttx/binfmt/Makefile
@@ -34,6 +34,7 @@
############################################################################
-include $(TOPDIR)/Make.defs
+DELIM ?= $(strip /)
ifeq ($(WINTOOL),y)
INCDIROPT = -w
diff --git a/nuttx/configs/ez80f910200kitg/ostest/Make.defs b/nuttx/configs/ez80f910200kitg/ostest/Make.defs
index 0124684c6..c2aab3c9f 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/Make.defs
+++ b/nuttx/configs/ez80f910200kitg/ostest/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs
index f227a046c..1ad97cffe 100644
--- a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs
+++ b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/httpd/Make.defs b/nuttx/configs/ez80f910200zco/httpd/Make.defs
index 398a6ec5d..77a5e731c 100644
--- a/nuttx/configs/ez80f910200zco/httpd/Make.defs
+++ b/nuttx/configs/ez80f910200zco/httpd/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/nettest/Make.defs b/nuttx/configs/ez80f910200zco/nettest/Make.defs
index 02b6a22a2..c0d7c2f1d 100644
--- a/nuttx/configs/ez80f910200zco/nettest/Make.defs
+++ b/nuttx/configs/ez80f910200zco/nettest/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/nsh/Make.defs b/nuttx/configs/ez80f910200zco/nsh/Make.defs
index 6a0c9bb73..258e8a5dc 100644
--- a/nuttx/configs/ez80f910200zco/nsh/Make.defs
+++ b/nuttx/configs/ez80f910200zco/nsh/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/ostest/Make.defs b/nuttx/configs/ez80f910200zco/ostest/Make.defs
index 727c68ba3..e61e328bc 100644
--- a/nuttx/configs/ez80f910200zco/ostest/Make.defs
+++ b/nuttx/configs/ez80f910200zco/ostest/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/ez80f910200zco/poll/Make.defs b/nuttx/configs/ez80f910200zco/poll/Make.defs
index d7ba08ec0..c6cbd4616 100644
--- a/nuttx/configs/ez80f910200zco/poll/Make.defs
+++ b/nuttx/configs/ez80f910200zco/poll/Make.defs
@@ -181,7 +181,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/z16f2800100zcog/README.txt b/nuttx/configs/z16f2800100zcog/README.txt
index 0c69c75bc..e12931df2 100644
--- a/nuttx/configs/z16f2800100zcog/README.txt
+++ b/nuttx/configs/z16f2800100zcog/README.txt
@@ -139,6 +139,9 @@ ostest
the end of the lines after a line continuation (\ ^M). If these
trailing bad characters are manually eliminated, then the build
will succeed on the next try.
+ d. Hmmm... when last tested, there some missing .obj files in arch/z16/src.
+ A little additional TLC might be needed to get a reliable Windows
+ native build.
pashello
--------
diff --git a/nuttx/configs/z16f2800100zcog/ostest/Make.defs b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
index 1cd425063..20565edeb 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/Make.defs
+++ b/nuttx/configs/z16f2800100zcog/ostest/Make.defs
@@ -174,7 +174,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig
index 027d6d73c..f9ed65727 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/defconfig
+++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig
@@ -8,10 +8,14 @@ CONFIG_NUTTX_NEWCONFIG=y
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
-CONFIG_HOST_LINUX=y
+# CONFIG_HOST_LINUX is not set
# CONFIG_HOST_OSX is not set
-# CONFIG_HOST_WINDOWS is not set
+CONFIG_HOST_WINDOWS=y
# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
#
# Build Configuration
diff --git a/nuttx/configs/z16f2800100zcog/pashello/Make.defs b/nuttx/configs/z16f2800100zcog/pashello/Make.defs
index 10a5ee689..e0cfc6e31 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/Make.defs
+++ b/nuttx/configs/z16f2800100zcog/pashello/Make.defs
@@ -174,7 +174,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig
index c9f0d9673..aa0fb0b1a 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/defconfig
+++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig
@@ -8,10 +8,14 @@ CONFIG_NUTTX_NEWCONFIG=y
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
-CONFIG_HOST_LINUX=y
+# CONFIG_HOST_LINUX is not set
# CONFIG_HOST_OSX is not set
-# CONFIG_HOST_WINDOWS is not set
+CONFIG_HOST_WINDOWS=y
# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
#
# Build Configuration
diff --git a/nuttx/configs/z16f2800100zcog/src/Makefile b/nuttx/configs/z16f2800100zcog/src/Makefile
index 097755007..fcb4bac3a 100644
--- a/nuttx/configs/z16f2800100zcog/src/Makefile
+++ b/nuttx/configs/z16f2800100zcog/src/Makefile
@@ -39,7 +39,7 @@ SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched
ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common'
+ USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common"
else
WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)}
WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)}
diff --git a/nuttx/configs/z8encore000zco/ostest/Make.defs b/nuttx/configs/z8encore000zco/ostest/Make.defs
index 9ce005260..e9eacba89 100644
--- a/nuttx/configs/z8encore000zco/ostest/Make.defs
+++ b/nuttx/configs/z8encore000zco/ostest/Make.defs
@@ -207,7 +207,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/configs/z8f64200100kit/ostest/Make.defs b/nuttx/configs/z8f64200100kit/ostest/Make.defs
index 85cb5c401..1cc9726aa 100644
--- a/nuttx/configs/z8f64200100kit/ostest/Make.defs
+++ b/nuttx/configs/z8f64200100kit/ostest/Make.defs
@@ -207,7 +207,7 @@ define ASSEMBLE
endef
define ARCHIVE
- echo AR: $2
+ @echo AR: $2
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
endef
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile
index b2bf1b611..aaaa67bd7 100644
--- a/nuttx/drivers/Makefile
+++ b/nuttx/drivers/Makefile
@@ -34,6 +34,7 @@
############################################################################
-include $(TOPDIR)/Make.defs
+DELIM ?= $(strip /)
ifeq ($(WINTOOL),y)
INCDIROPT = -w
diff --git a/nuttx/syscall/Makefile b/nuttx/syscall/Makefile
index ec2627b46..4556912be 100644
--- a/nuttx/syscall/Makefile
+++ b/nuttx/syscall/Makefile
@@ -34,6 +34,8 @@
###########################################################################
-include $(TOPDIR)/Make.defs
+DELIM ?= $(strip /)
+
include proxies$(DELIM)Make.defs
include stubs$(DELIM)Make.defs