Skip to content

Commit

Permalink
Update for ez80 Windows native build (still does not work)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5377 42af7a65-404d-4744-a932-0658087f49c3
  • Loading branch information
patacongo committed Nov 21, 2012
1 parent 9b37a2c commit f8ad757
Show file tree
Hide file tree
Showing 24 changed files with 627 additions and 217 deletions.
2 changes: 1 addition & 1 deletion Documentation/NuttxUserGuide.html
Original file line number Diff line number Diff line change
Expand Up @@ -4027,7 +4027,7 @@ <H3><a name="pause">2.8.14 pause</a></H3>
<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%">
Expand Down
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
114 changes: 80 additions & 34 deletions arch/z80/src/Makefile.zdsii
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand Down
27 changes: 21 additions & 6 deletions configs/ez80f910200kitg/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading

0 comments on commit f8ad757

Please sign in to comment.