From 460aa35bb4cbf334aae8f09d7be422a04fc261d7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Mar 2008 19:59:46 +0000 Subject: [PATCH] Adding ez80 support git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@730 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 2 +- Documentation/NuttX.html | 2 ++ arch/z80/src/z80/chip.h | 1 + include/nuttx/compiler.h | 39 +++++++++++++++++++++++++++------------ 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index aa4653647f..fcfa2d2da8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -349,4 +349,4 @@ 0.3.10 2008-xx-xx Gregory Nutt - + * Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip). diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 47dadc611b..18f8bbbdbf 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -980,6 +980,8 @@ buildroot-0.1.0 2007-03-09 <spudmonkey@racsa.co.cr>
    nuttx-0.3.10 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> + * Add support for the ZiLOG EZ80Acclaim microcontrooler (EZ80F91 chip). + pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> buildroot-0.1.1 2007-xx-xx <spudmonkey@racsa.co.cr> diff --git a/arch/z80/src/z80/chip.h b/arch/z80/src/z80/chip.h index b960e481fb..aa3b6c0e2a 100644 --- a/arch/z80/src/z80/chip.h +++ b/arch/z80/src/z80/chip.h @@ -66,6 +66,7 @@ # define putreg(v,a) putreg16(v,a) #endif + /************************************************************************************ * Public Function Prototypes ************************************************************************************/ diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index e8d14f7fd3..0960fe3a56 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -230,7 +230,7 @@ /* At present, only the Zilog ZNeo compiler is recognized */ -# if !defined(__ZNEO__) && !defined(__EZ8__) +# if !defined(__ZNEO__) && !defined(__EZ8__) && !defined(__EZ80__) # warning "Unrecognized Zilog compiler" # endif @@ -272,24 +272,38 @@ * Z8Encore!: Far is 16-bits; near is 8-bits of address. * The supported model is (1) all code on ROM, and (2) all data * and stacks in internal (far) RAM. + * Z8Acclaim: In Z80 mode, all pointers are 16-bits. In ADL mode, all pointers + * and 24 bits. */ -# ifdef __ZNEO__ +# if defined(__ZNEO__) # define FAR _Far # define NEAR _Near # define DSEG _Far # define CODE _Erom -# undef CONFIG_SMALL_MEMORY /* Select the large, 32-bit addressing model */ -# undef CONFIG_LONG_IS_NOT_INT /* Long and int are the same size */ -# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */ -# else +# undef CONFIG_SMALL_MEMORY /* Select the large, 32-bit addressing model */ +# undef CONFIG_LONG_IS_NOT_INT /* Long and int are the same size */ +# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */ +# elif defined(__EZ8__) # define FAR far # define NEAR near # define DSEG far # define CODE rom -# define CONFIG_SMALL_MEMORY 1 /* Select small, 16-bit address model */ -# define CONFIG_LONG_IS_NOT_INT 1 /* Long and int are not the same size */ -# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */ +# define CONFIG_SMALL_MEMORY 1 /* Select small, 16-bit address model */ +# define CONFIG_LONG_IS_NOT_INT 1 /* Long and int are not the same size */ +# undef CONFIG_PTR_IS_NOT_INT /* FAR pointers and int are the same size */ +# elif defined(__EZ80__) +# define FAR +# define NEAR +# define DSEG +# define CODE +# undef CONFIG_SMALL_MEMORY /* Select the large, 32-bit addressing model */ +# define CONFIG_LONG_IS_NOT_INT 1 /* Long and int are not the same size */ +# ifdef CONFIG_EZ80_Z80MODE +# define CONFIG_PTR_IS_NOT_INT 1 /* Pointers and int are not the same size */ +# else +# undef CONFIG_PTR_IS_NOT_INT /* Pointers and int are the same size */ +# endif # endif /* The Zilog compiler does not support inline functions */ @@ -297,9 +311,10 @@ # undef CONFIG_HAVE_INLINE # define inline -/* The Zilog compiler supports both types double and long long, - * but the size is 32-bits (same as long and single precision) - * so it is safer to say that they are not supported. +/* Older Zilog compilers support both types double and long long, but the size + * is 32-bits (same as long and single precision) so it is safer to say that + * they are not supported. Later versions are more ANSII compliant and + * simply do not support long long or double. */ # undef CONFIG_HAVE_DOUBLE