From f6f9467cd1d22586ff4c0cc9d67938c0603a8c7c Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 23 Feb 2008 14:26:46 +0000 Subject: [PATCH] Incorporate patch 1899525 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@720 42af7a65-404d-4744-a932-0658087f49c3 --- arch/z80/src/Makefile | 1 + arch/z80/src/Makefile.sdcc | 2 +- arch/z80/src/z80/Make.defs | 2 ++ arch/z80/src/z80/README.txt | 49 +++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 arch/z80/src/z80/README.txt diff --git a/arch/z80/src/Makefile b/arch/z80/src/Makefile index 39c5697837..6cc1463d0f 100644 --- a/arch/z80/src/Makefile +++ b/arch/z80/src/Makefile @@ -38,6 +38,7 @@ -include $(TOPDIR)/Make.defs -include chip/Make.defs +-include board/Make.defs ############################################################################ # Compiler-Dependent Make diff --git a/arch/z80/src/Makefile.sdcc b/arch/z80/src/Makefile.sdcc index 895ecc4bae..8865ad4b99 100644 --- a/arch/z80/src/Makefile.sdcc +++ b/arch/z80/src/Makefile.sdcc @@ -71,7 +71,7 @@ DEPSRCS = $(CSRCS) ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board -VPATH = chip:common +VPATH = chip:common:board # Libraries diff --git a/arch/z80/src/z80/Make.defs b/arch/z80/src/z80/Make.defs index 76b98199a2..01564f059a 100644 --- a/arch/z80/src/z80/Make.defs +++ b/arch/z80/src/z80/Make.defs @@ -33,11 +33,13 @@ # ############################################################################ +ifeq ($(CONFIG_ARCH_HAVEHEAD),) ifeq ($(CONFIG_LINKER_ROM_AT_0000),y) HEAD_ASRC = z80_rom.asm else HEAD_ASRC = z80_head.asm endif +endif CMN_ASRCS = CMN_CSRCS = up_initialize.c up_allocateheap.c up_createstack.c \ diff --git a/arch/z80/src/z80/README.txt b/arch/z80/src/z80/README.txt new file mode 100644 index 0000000000..81cdf756d0 --- /dev/null +++ b/arch/z80/src/z80/README.txt @@ -0,0 +1,49 @@ +arch/z80/src/z80 +^^^^^^^^^^^^^^^^ + +The arch/z80 directories contain files to support a variety of 8-bit architectures +from ZiLOG (and spin-architectures such as the Rabbit2000). The arch/z80/src/z80 +sub-directory contains logic unique to the classic Z80 chip. + +Files in this directory include: + +z80_head.asm + This is the main entry point into the Z80 program. This includes the + handler for the RESET, power-up interrupt vector and address zero and all + RST interrupts. + +z80_rom.asm + Some architectures may hae ROM located at address zero. In this case, a + special version of the "head" logic must be used. This specail "head" + file is probably board-specific and, hence, belongs in the board-specific + configs//src directory. This file may, however, be used as + a model for such a board-specific file. + + z80_rom.S is enabled by specifying CONFIG_LINKER_ROM_AT_0000 in the + configuration file. + + A board specific version in the configs//src directory can be + used by: + + 1. Define CONFIG_ARCH_HAVEHEAD + 2. Add the board-specific head file, say .asm, to + configs//src + 3. Add a file called Make.defs in the configs//src directory + containing the line: HEAD_ASRC = .asm + +Make.defs + This is the standard makefile fragment that must be provided in all + chip directories. This fragment identifies the chip-specific file to + be used in building libarch. + +chip.h + This is the standard header file that must be provided in all chip + directories. + +z80_initialstate.c, z80_copystate.c, z80_restoreusercontext.asm, and +z80_saveusercontext.asm, switch + These files implement the Z80 context switching logic + +z80_schedulesigaction.c and z80_sigdeliver.c + These files implement Z80 signal handling. + \ No newline at end of file