Adding Z8Encore\!

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@666 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-02-11 17:11:20 +00:00
parent c4b3cf7095
commit 50a54fc544
13 changed files with 432 additions and 203 deletions

View File

@ -336,3 +336,6 @@
0.3.9 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
* Began adding support for the ZiLOG Z8Encore! microcontroller for the Z8Encore000ZCO
development board and the Z8F642 part.

View File

@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
<p>Last Updated: February 10, 2008</p>
<p>Last Updated: February 11, 2008</p>
</td>
</tr>
</table>
@ -600,7 +600,28 @@
</p>
<p>
<b>STATUS:</b>
The preliminary release of support for the z16f was made available in NuttX version 0.3.7.
The initial release of support for the z16f was made available in NuttX version 0.3.7.
</p>
</td>
</tr>
<tr>
<td valign="top"><img src="favicon.ico"></td>
<td bgcolor="#5eaee1">
<b>Zilog Z8Encore!</b>
</td>
</tr>
<tr>
<td><br></td>
<td>
<p>
<b>Zilog Z8Encore! Microncontroller</b>.
This port use the Zilog z8encore000zco development kit, Z8F642 part, and the Zilog
ZDS-II Windows command line tools.
The development environment is Cygwin under WinXP.
</p>
<p>
<b>STATUS:</b>
The Z8Encore! port is a work in progress and will be released in a future NuttX version.
</p>
</td>
</tr>
@ -969,6 +990,9 @@ buildroot-0.1.0 2007-03-09 &lt;spudmonkey@racsa.co.cr&gt
<pre><ul>
nuttx-0.3.9 2008-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
* Began adding support for the ZiLOG Z8Encore! microcontroller for the Z8Encore000ZCO
development board and the Z8F642 part.
pascal-0.1.3 2008-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
buildroot-0.1.1 2007-xx-xx &lt;spudmonkey@racsa.co.cr&gt

View File

@ -16,7 +16,7 @@
</b></big></h1>
<p><small>by</small></p>
<p>Gregory Nutt</p>
<p><small>Last Update: February 7, 2008</small></p>
<p><small>Last Update: February 11, 2008</small></p>
</center>
<center><h1>Table of Contents</h1></center>
@ -384,7 +384,7 @@
This directory holds common ARM architectures. At present, this includes
the following subdirectories:
<ul>
<li><code>arch/arm/include</code> and <code>arch/arm/common</code>:
<li><code>arch/arm/include</code> and <code>arch/arm/src/common</code>:
Common ARM logic.
</li>
@ -426,13 +426,34 @@
<li><code>arch/z16f</code>:
Zilog z16f Microcontroller.
This port uses the Zilog z16f2800100zcog Development Kit.
This is a work in progress.
This port was released with nuttx-0.3.7.
</li>
<li><code>arch/z80</code>:
Zilog z80 Microcontroller.
This port has been verified using only a z80 instruction simulator.
</li>
This directory holds 8-bit ZiLOG architectures. At present, this includes the
Zilog z80 and z8Encore! Microcontrollers.
<ul>
<li><code>arch/z80/include</code> and <code>arch/z80/src/common</code>:
Common logic.
</li>
<li><code>arch/z80/include/z80</code> and <code>arch/z80/src/z80</code>:
The Z80 port was released in nuttx-0.3.6 has been verified using only a
z80 instruction simulator.
The set simulator can be found in the NuttX CVS at
http://nuttx.cvs.sourceforge.net/nuttx/misc/sims/z80sim.
This port also the SDCC toolchain (http://sdcc.sourceforge.net/")
(verified with version 2.6.0 and 2.7.0).
</li>
<li><code>arch/z80/include/z8</code> and <code>arch/z80/src/z8</code>:
The Z8Encore! port use the Zilog z8encore000zco
development kit, Z8F642 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
This port is in progress and will be released in a future NuttX release.
</li>
</ul>
</li>
</ul>
<p>
@ -621,6 +642,13 @@
This port use the Zilog z16f2800100zcog development kit and the
Zilog ZDS-II Windows command line tools.
The development environment is Cygwin under WinXP.
</li>
<li><code>configs/z8encore000zco</code>
z8Encore! Microncontroller. This port use the Zilog z8encore000zco
development kit, Z8F642 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
</li>
<li><code>configs/z80sim</code>:
z80 Microcontroller. This port uses a Z80 instruction set simulator.

View File

@ -40,186 +40,10 @@
-include chip/Make.defs
############################################################################
# Tools
# CFLAGS, CPPFLAGS, ASFLAGS, LDFLAGS are set in $(TOPDIR)/Make.defs
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
CPPFLAGS += -D__ASSEMBLY__
############################################################################
# Files and directories
# There should be one head source (.asm file)
HEAD_AOBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
# Assembly sources and objects
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
AOBJS = $(ASRCS:$(ASMEXT)=$(OBJEXT))
# C sources and objects
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
# All sources and objcts
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
# Sources that can have dependencies (no .asm files)
DEPSRCS = $(CSRCS)
# Directories
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
VPATH = chip:common
# Libraries
LIBGCC = ${shell $(CC) -print-libgcc-file-name}
# Supports dynamic sizing of HEAP.
#
HEAP_BASE = ${shell ./mkhpbase.sh}
############################################################################
# Targets
all: $(HEAD_AOBJ) libarch$(LIBEXT)
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
$(call ASSEMBLE, $<, $@)
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# This is a kludge to work around some conflicting symbols in libsdcc.liXqueb
$(SDCCLIBDIR)/myz80.lib: $(SDCCLIBDIR)/$(SDCCLIB)
@cat $(SDCCLIBDIR)/$(SDCCLIB) | \
grep -v alloc | grep -v free | grep -v printf | \
grep -v _str | grep -v _mem | grep -v crt0\.o \
> myz80.lib
@sudo mv -f myz80.lib $(SDCCLIBDIR)/myz80.lib
# Create a header file that contains addressing information needed by the code
up_mem.h:
@echo "#ifndef __ARCH_MEM_H" >up_mem.h
@echo "#define __ARCH_MEM_H" >>up_mem.h
@echo "" >>up_mem.h
@echo "#define UP_STACK_END $(CONFIG_DRAM_SIZE)" >> up_mem.h
@echo "#define UP_STACK_BASE (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE))" >> up_mem.h
@echo "#define UP_HEAP1_END UP_STACK_BASE" >> up_mem.h
@echo "#define UP_HEAP1_BASE $(HEAP_BASE)" >> up_mem.h
@echo "" >>up_mem.h
@echo "#endif /* __ARCH_MEM_H */" >>up_mem.h
asm_mem.h:
@echo " UP_COMPILER_OTHER == 0" > asm_mem.h
@echo " UP_COMPILER_SDCC == 1" >> asm_mem.h
ifeq ($(CC),sdcc)
@echo " UP_COMPILER == 1" >> asm_mem.h
# Compiler-Dependent Make
COMPILER = ${shell basename $(CC)}
ifeq ($(COMPILER),sdcc)
include Makefile.sdcc
else
@echo " UP_COMPILER == 0" >> asm_mem.h
include Makefile.zdsii
endif
@echo " UP_STACK_END == ($(CONFIG_DRAM_SIZE) - 1)" >> asm_mem.h
@echo " UP_STACK_BASE == (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE))" >> asm_mem.h
@echo " UP_HEAP1_END == (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE) - 1)" >> asm_mem.h
@echo " UP_HEAP1_BASE == $(HEAP_BASE)" >> asm_mem.h
# Combine all objects in this directory into a library
libarch$(LIBEXT): up_mem.h asm_mem.h $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
# This builds the libboard library in the board/ subdirectory
board/libboard$(LIBEXT):
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
# This target builds the final executable
pass1.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: pass1.ihx"
@echo "--" >pass1.lnk # Non-interactive
@echo "-k $(BOARDDIR)" >>pass1.lnk # Path to board library
@echo "-k $(SDCCLIBDIR)" >>pass1.lnk # Path to SDCC z80 library
@echo "-l libboard$(LIBEXT)" >>pass1.lnk # Name of board library
@for LIB in $(LINKLIBS); do \
echo "-l $(TOPDIR)/$$LIB" >> pass1.lnk ;\
done
@echo "-l myz80.lib" >>pass1.lnk # Name of SDCC z80 library
@echo "-b START=0" >>pass1.lnk # Start of START area
@echo "-b _CODE=256" >>pass1.lnk # Start of _CODE area
@echo "-i" >>pass1.lnk # Intel hex format
@echo "-x" >>pass1.lnk # Hexadecimal
@echo "-m" >>pass1.lnk # Generate a map file
@echo "-j" >>pass1.lnk # Generate a symbol file
@echo "pass1.ihx" >>pass1.lnk # Path to head object
@echo "$(HEAD_AOBJ)" >>pass1.lnk # Path to head object
@echo "-e" >>pass1.lnk # End of script
@$(LD) -f pass1.lnk
@rm -f up_mem.h asm_mem.h
@rm -f up_allocateheap$(OBJEXT) $(HEAD_AOBJ) libarch$(LIBEXT)
@$(MAKE) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
@$(MAKE) TOPDIR="$(TOPDIR)" $(HEAD_AOBJ)
nuttx.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx.ihx"
@echo "--" >nuttx.lnk # Non-interactive
@echo "-k $(BOARDDIR)" >>nuttx.lnk # Path to board library
@echo "-k $(SDCCLIBDIR)" >>nuttx.lnk # Path to SDCC z80 library
@echo "-l libboard$(LIBEXT)" >>nuttx.lnk # Name of board library
@for LIB in $(LINKLIBS); do \
echo "-l $(TOPDIR)/$$LIB" >> nuttx.lnk ;\
done
@echo "-l myz80.lib" >>nuttx.lnk # Name of SDCC z80 library
@echo "-b START=0" >>nuttx.lnk # Start of START area
@echo "-b _CODE=256" >>nuttx.lnk # Start of _CODE area
@echo "-i" >>nuttx.lnk # Intel hex format
@echo "-x" >>nuttx.lnk # Hexadecimal
@echo "-m" >>nuttx.lnk # Generate a map file
@echo "-j" >>nuttx.lnk # Generate a symbol file
@echo "nuttx.ihx" >>nuttx.lnk # Path to head object
@echo "$(HEAD_AOBJ)" >>nuttx.lnk # Path to head object
@echo "-e" >>nuttx.lnk # End of script
@$(LD) -f nuttx.lnk
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
@rm -f pass1.*
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
@cp -f nuttx.map $(TOPDIR)/.
# Build dependencies
.depend: Makefile up_mem.h asm_mem.h chip/Make.defs $(DEPSRCS)
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
fi
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
@touch $@
depend: .depend
clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
@rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
rm -f Make.dep .depend
-include Make.dep

219
arch/z80/src/Makefile.sdcc Normal file
View File

@ -0,0 +1,219 @@
############################################################################
# arch/z80/src/Makefile.sdcc
#
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
############################################################################
# Tools
# CFLAGS, CPPFLAGS, ASFLAGS, LDFLAGS are set in $(TOPDIR)/Make.defs
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(TOPDIR)/sched
CPPFLAGS += -D__ASSEMBLY__
############################################################################
# Files and directories
# There should be one head source (.asm file)
HEAD_AOBJ = $(HEAD_ASRC:$(ASMEXT)=$(OBJEXT))
# Assembly sources and objects
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
AOBJS = $(ASRCS:$(ASMEXT)=$(OBJEXT))
# C sources and objects
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
# All sources and objcts
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
# Sources that can have dependencies (no .asm files)
DEPSRCS = $(CSRCS)
# Directories
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
VPATH = chip:common
# Libraries
LIBGCC = ${shell $(CC) -print-libgcc-file-name}
# Supports dynamic sizing of HEAP.
#
HEAP_BASE = ${shell ./mkhpbase.sh}
############################################################################
# Targets
all: $(HEAD_AOBJ) libarch$(LIBEXT)
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
$(call ASSEMBLE, $<, $@)
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# This is a kludge to work around some conflicting symbols in libsdcc.liXqueb
$(SDCCLIBDIR)/myz80.lib: $(SDCCLIBDIR)/$(SDCCLIB)
@cat $(SDCCLIBDIR)/$(SDCCLIB) | \
grep -v alloc | grep -v free | grep -v printf | \
grep -v _str | grep -v _mem | grep -v crt0\.o \
> myz80.lib
@sudo mv -f myz80.lib $(SDCCLIBDIR)/myz80.lib
# Create a header file that contains addressing information needed by the code
up_mem.h:
@echo "#ifndef __ARCH_MEM_H" >up_mem.h
@echo "#define __ARCH_MEM_H" >>up_mem.h
@echo "" >>up_mem.h
@echo "#define UP_STACK_END $(CONFIG_DRAM_SIZE)" >> up_mem.h
@echo "#define UP_STACK_BASE (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE))" >> up_mem.h
@echo "#define UP_HEAP1_END UP_STACK_BASE" >> up_mem.h
@echo "#define UP_HEAP1_BASE $(HEAP_BASE)" >> up_mem.h
@echo "" >>up_mem.h
@echo "#endif /* __ARCH_MEM_H */" >>up_mem.h
asm_mem.h:
@echo " UP_COMPILER_OTHER == 0" > asm_mem.h
@echo " UP_COMPILER_SDCC == 1" >> asm_mem.h
ifeq ($(CC),sdcc)
@echo " UP_COMPILER == 1" >> asm_mem.h
else
@echo " UP_COMPILER == 0" >> asm_mem.h
endif
@echo " UP_STACK_END == ($(CONFIG_DRAM_SIZE) - 1)" >> asm_mem.h
@echo " UP_STACK_BASE == (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE))" >> asm_mem.h
@echo " UP_HEAP1_END == (UP_STACK_END - $(CONFIG_PROC_STACK_SIZE) - 1)" >> asm_mem.h
@echo " UP_HEAP1_BASE == $(HEAP_BASE)" >> asm_mem.h
# Combine all objects in this directory into a library
libarch$(LIBEXT): up_mem.h asm_mem.h $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
# This builds the libboard library in the board/ subdirectory
board/libboard$(LIBEXT):
$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
# This target builds the final executable
pass1.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: pass1.ihx"
@echo "--" >pass1.lnk # Non-interactive
@echo "-k $(BOARDDIR)" >>pass1.lnk # Path to board library
@echo "-k $(SDCCLIBDIR)" >>pass1.lnk # Path to SDCC z80 library
@echo "-l libboard$(LIBEXT)" >>pass1.lnk # Name of board library
@for LIB in $(LINKLIBS); do \
echo "-l $(TOPDIR)/$$LIB" >> pass1.lnk ;\
done
@echo "-l myz80.lib" >>pass1.lnk # Name of SDCC z80 library
@echo "-b START=0" >>pass1.lnk # Start of START area
@echo "-b _CODE=256" >>pass1.lnk # Start of _CODE area
@echo "-i" >>pass1.lnk # Intel hex format
@echo "-x" >>pass1.lnk # Hexadecimal
@echo "-m" >>pass1.lnk # Generate a map file
@echo "-j" >>pass1.lnk # Generate a symbol file
@echo "pass1.ihx" >>pass1.lnk # Path to head object
@echo "$(HEAD_AOBJ)" >>pass1.lnk # Path to head object
@echo "-e" >>pass1.lnk # End of script
@$(LD) -f pass1.lnk
@rm -f up_mem.h asm_mem.h
@rm -f up_allocateheap$(OBJEXT) $(HEAD_AOBJ) libarch$(LIBEXT)
@$(MAKE) TOPDIR="$(TOPDIR)" libarch$(LIBEXT)
@$(MAKE) TOPDIR="$(TOPDIR)" $(HEAD_AOBJ)
nuttx.ihx: up_mem.h asm_mem.h $(SDCCLIBDIR)/myz80.lib $(HEAD_AOBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx.ihx"
@echo "--" >nuttx.lnk # Non-interactive
@echo "-k $(BOARDDIR)" >>nuttx.lnk # Path to board library
@echo "-k $(SDCCLIBDIR)" >>nuttx.lnk # Path to SDCC z80 library
@echo "-l libboard$(LIBEXT)" >>nuttx.lnk # Name of board library
@for LIB in $(LINKLIBS); do \
echo "-l $(TOPDIR)/$$LIB" >> nuttx.lnk ;\
done
@echo "-l myz80.lib" >>nuttx.lnk # Name of SDCC z80 library
@echo "-b START=0" >>nuttx.lnk # Start of START area
@echo "-b _CODE=256" >>nuttx.lnk # Start of _CODE area
@echo "-i" >>nuttx.lnk # Intel hex format
@echo "-x" >>nuttx.lnk # Hexadecimal
@echo "-m" >>nuttx.lnk # Generate a map file
@echo "-j" >>nuttx.lnk # Generate a symbol file
@echo "nuttx.ihx" >>nuttx.lnk # Path to head object
@echo "$(HEAD_AOBJ)" >>nuttx.lnk # Path to head object
@echo "-e" >>nuttx.lnk # End of script
@$(LD) -f nuttx.lnk
nuttx$(EXEEXT): pass1.ihx nuttx.ihx
@rm -f pass1.*
@packihx nuttx.ihx > $(TOPDIR)/nuttx$(EXEEXT)
@cp -f nuttx.map $(TOPDIR)/.
# Build dependencies
.depend: Makefile up_mem.h asm_mem.h chip/Make.defs $(DEPSRCS)
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
fi
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
@touch $@
depend: .depend
clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
@rm -f libarch$(LIBEXT) up_mem.h asm_mem.h pass1.* nuttx.* *~ .*.swp
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
rm -f Make.dep .depend
-include Make.dep

126
arch/z80/src/Makefile.zdsii Normal file
View File

@ -0,0 +1,126 @@
############################################################################
# arch/z16/src/Makefile
#
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
############################################################################
# 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)
CPPFLAGS += -I$(ARCHSRCDIR)
LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
############################################################################
# Files and directories
HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT))
HEAD_AOBJ = $(HEAD_SSRC:.S=$(OBJEXT))
SSRCS = $(CHIP_SSRCS) $(CMN_SSRCS)
ASRCS = $(SSRCS:.S=$(ASMEXT))
AOBJS = $(SSRCS:.S=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
DEPSRCS = $(SSRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
VPATH = chip:common
############################################################################
# Targets
all: $(HEAD_OBJ) libarch$(LIBEXT)
$(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S
@$(CPP) $(CPPFLAGS) $< -o $@.tmp
@cat $@.tmp | sed -e "s/^#/;/g" > $@
@rm $@.tmp
$(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT)
$(call ASSEMBLE, $<, $@)
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, `cygpath -w $<`, $@)
libarch$(LIBEXT): $(OBJS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT):
@$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT)
nuttx.linkcmd: $(LINKCMDTEMPLATE)
@cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_AOBJ)}\", \\" >>nuttx.linkcmd
@( for lib in $(LINKLIBS); do \
echo " \"`cygpath -w $(TOPDIR)/$${lib}`\", \\" >>nuttx.linkcmd; \
done ; )
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd
nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd
@echo "LD: nuttx.hex"
@$(LD) $(LDFLAGS)
.depend: Makefile chip/Make.defs $(DEPSRCS)
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
fi
@$(MKDEP) --dep-path chip --dep-path common $(CC) -- $(CFLAGS) -- $(DEPSRCS) >Make.dep
@touch $@
depend: .depend
clean:
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
fi
@rm -f libarch$(LIBEXT) *~ .*.swp
@rm -f nuttx.linkcmd *.asm *.tmp *.map
$(call CLEAN)
distclean: clean
@if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
fi
@rm -f Make.dep .depend
-include Make.dep

View File

@ -1,7 +1,7 @@
############################################################################
# sdcc/src/z80/Make.defs
# arch/z80/src/z80/Make.defs
#
# Copyright (C) 2007 Gregory Nutt. All rights reserved.
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name Gregory Nutt nor the names of its contributors may be
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
@ -33,9 +33,9 @@
#
############################################################################
HEAD_ASRC = up_head.asm
HEAD_ASRC = z80_head.asm
CMN_ASRCS = up_saveusercontext.asm up_restoreusercontext.asm
CMN_ASRCS =
CMN_CSRCS = up_initialize.c up_allocateheap.c up_initialstate.c \
up_createstack.c up_releasestack.c up_interruptcontext.c \
up_blocktask.c up_unblocktask.c up_exit.c up_releasepending.c \
@ -44,6 +44,6 @@ CMN_CSRCS = up_initialize.c up_allocateheap.c up_initialstate.c \
up_schedulesigaction.c up_sigdeliver.c \
up_registerdump.c up_usestack.c
CHIP_ASRCS =
CHIP_ASRCS = z80_saveusercontext.asm z80_restoreusercontext.asm
CHIP_CSRCS =

View File

@ -1,5 +1,5 @@
;**************************************************************************
; arch/z80/src/common/up_head.asm
; arch/z80/src/z80/z80_head.asm
;
; Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
; Author: Gregory Nutt <spudmonkey@racsa.co.cr>

View File

@ -1,5 +1,5 @@
;**************************************************************************
; common/up_restoreusercontext.asm
; arch/z80/src/z80/z80_restoreusercontext.asm
;
; Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
; Author: Gregory Nutt <spudmonkey@racsa.co.cr>

View File

@ -1,7 +1,7 @@
;*************************************************************************
; common/up_saveusercontext.asm
; arch/z80/src/z80/z80_saveusercontext.asm
;
; Copyright (C) 2007 Gregory Nutt. All rights reserved.
; Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
; Author: Gregory Nutt <spudmonkey@racsa.co.cr>
;
; Redistribution and use in source and binary forms, with or without
@ -14,7 +14,7 @@
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; 3. Neither the name Gregory Nutt nor the names of its contributors may be
; 3. Neither the name NuttX nor the names of its contributors may be
; used to endorse or promote products derived from this software
; without specific prior written permission.
;

View File

@ -338,6 +338,11 @@ configs/z16f2800100zcog
development kit and the Zilog ZDS-II Windows command line tools. The
development environment is Cygwin under WinXP.
configs/z8encore000zco
z8Encore! Microncontroller. This port use the Zilog z8encore000zco
development kit, Z8F642 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
configs/z80zim
z80 Microcontroller. This port uses a Z80 instruction set simulator.
That simulator can be found in the NuttX CVS at

View File

@ -1,5 +1,5 @@
#!/bin/sh
# z16f2800100zcog/setenv.sh
# configs/z16f2800100zcog/ostest/setenv.sh
#
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@ -48,4 +48,4 @@ ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.0/bin"
alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
alias zneocc="${ZDSBINDIR}/zneocc.exe"
alias zneolib="${ZDSBINDIR}/zneolib.exe"
alias zneolink="${ZDSBINDIR}/zneolink.exe"
alias zneolink="${ZDSBINDIR}/zneolink.exe"

View File

@ -1,5 +1,5 @@
/****************************************************************************
* up_leds.c
* configs/z16f2800100zcog/z16f_leds.c
*
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>