diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-28 01:44:34 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-12-28 01:44:34 +0000 |
commit | c52a6d1e1d227b3acc746f0f435214f663a5b3a8 (patch) | |
tree | 0030118c86fcf205aac85bbe39a007b6f7d7416b | |
parent | a40203ddd0aa3e83c401aacbd2b3498651ee4129 (diff) | |
download | nuttx-c52a6d1e1d227b3acc746f0f435214f663a5b3a8.tar.gz nuttx-c52a6d1e1d227b3acc746f0f435214f663a5b3a8.tar.bz2 nuttx-c52a6d1e1d227b3acc746f0f435214f663a5b3a8.zip |
Changes for SDCC compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@453 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/arch/arm/include/irq.h | 2 | ||||
-rw-r--r-- | nuttx/configs/pjrc-8051/include/board.h | 51 | ||||
-rw-r--r-- | nuttx/include/nuttx/compiler.h | 24 | ||||
-rw-r--r-- | nuttx/sched/sched_getsockets.c | 3 | ||||
-rw-r--r-- | nuttx/sched/sched_releasefiles.c | 3 | ||||
-rw-r--r-- | nuttx/sched/sched_setupidlefiles.c | 3 | ||||
-rw-r--r-- | nuttx/sched/sched_setuppthreadfiles.c | 3 | ||||
-rw-r--r-- | nuttx/sched/sched_setupstreams.c | 19 | ||||
-rw-r--r-- | nuttx/sched/sched_setuptaskfiles.c | 3 |
9 files changed, 88 insertions, 23 deletions
diff --git a/nuttx/arch/arm/include/irq.h b/nuttx/arch/arm/include/irq.h index a13e04cd1..73ace563a 100644 --- a/nuttx/arch/arm/include/irq.h +++ b/nuttx/arch/arm/include/irq.h @@ -134,7 +134,9 @@ struct xcptcontext * are pending signals to be processed. */ +#ifndef CONFIG_DISABLE_SIGNALS void *sigdeliver; /* Actual type is sig_deliver_t */ +#endif /* These are saved copies of LR and CPSR used during * signal processing. diff --git a/nuttx/configs/pjrc-8051/include/board.h b/nuttx/configs/pjrc-8051/include/board.h new file mode 100644 index 000000000..85edae22c --- /dev/null +++ b/nuttx/configs/pjrc-8051/include/board.h @@ -0,0 +1,51 @@ +/************************************************************ + * board/board.h + * + * 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 + * 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. + * + ************************************************************/ + +#ifndef __ARCH_BOARD_BOARD_H +#define __ARCH_BOARD_BOARD_H + +/************************************************************ + * Included Files + ************************************************************/ + +/************************************************************ + * Definitions + ************************************************************/ + +/************************************************************ + * Inline Functions + ************************************************************/ + +#endif /* __ARCH_BOARD_BOARD_H */ diff --git a/nuttx/include/nuttx/compiler.h b/nuttx/include/nuttx/compiler.h index 8874af794..945d6c25c 100644 --- a/nuttx/include/nuttx/compiler.h +++ b/nuttx/include/nuttx/compiler.h @@ -148,14 +148,20 @@ * external RAM. */ -#define FAR __xdata -#define NEAR __data -#define CODE __code - -#if defined(SDCC_MODEL_SMALL) -# define DSEG __data +#if defined(__z80) || defined(__gbz80) +# define FAR +# define NEAR +# define CODE +# define DSEG #else -# define DSEG __xdata +# define FAR __xdata +# define NEAR __data +# define CODE __code +# if defined(SDCC_MODEL_SMALL) +# define DSEG __data +# else +# define DSEG __xdata +# endif #endif /* Select small, 16-bit address model */ @@ -169,8 +175,8 @@ /* The generic pointer and int are not the same size * (for some SDCC architectures) */ - -#if !defined(__z80) && defined(__gbz80) + +#if !defined(__z80) && !defined(__gbz80) # define CONFIG_PTR_IS_NOT_INT 1 #endif diff --git a/nuttx/sched/sched_getsockets.c b/nuttx/sched/sched_getsockets.c index c54c5f236..13c9b69b9 100644 --- a/nuttx/sched/sched_getsockets.c +++ b/nuttx/sched/sched_getsockets.c @@ -38,11 +38,12 @@ ************************************************************/ #include <nuttx/config.h> -#if CONFIG_NSOCKET_DESCRIPTORS > 0 #include <sched.h> #include "os_internal.h" +#if CONFIG_NSOCKET_DESCRIPTORS > 0 + /************************************************************ * Private Functions ************************************************************/ diff --git a/nuttx/sched/sched_releasefiles.c b/nuttx/sched/sched_releasefiles.c index 707e8636a..9edf8ecd9 100644 --- a/nuttx/sched/sched_releasefiles.c +++ b/nuttx/sched/sched_releasefiles.c @@ -38,13 +38,14 @@ ************************************************************/ #include <nuttx/config.h> -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 #include <sched.h> #include <nuttx/fs.h> #include <nuttx/net.h> #include <nuttx/lib.h> +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 + /************************************************************ * Private Functions ************************************************************/ diff --git a/nuttx/sched/sched_setupidlefiles.c b/nuttx/sched/sched_setupidlefiles.c index 3176cab43..bb9526a63 100644 --- a/nuttx/sched/sched_setupidlefiles.c +++ b/nuttx/sched/sched_setupidlefiles.c @@ -38,7 +38,6 @@ ************************************************************/ #include <nuttx/config.h> -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 #include <stdio.h> #include <unistd.h> @@ -51,6 +50,8 @@ #include "os_internal.h" +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 + /************************************************************ * Private Functions ************************************************************/ diff --git a/nuttx/sched/sched_setuppthreadfiles.c b/nuttx/sched/sched_setuppthreadfiles.c index e5f035afa..5b97a46c5 100644 --- a/nuttx/sched/sched_setuppthreadfiles.c +++ b/nuttx/sched/sched_setuppthreadfiles.c @@ -38,7 +38,6 @@ ************************************************************/ #include <nuttx/config.h> -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 #include <sched.h> @@ -48,6 +47,8 @@ #include "os_internal.h" +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 + /************************************************************ * Private Functions ************************************************************/ diff --git a/nuttx/sched/sched_setupstreams.c b/nuttx/sched/sched_setupstreams.c index 1429ece31..6e7216a49 100644 --- a/nuttx/sched/sched_setupstreams.c +++ b/nuttx/sched/sched_setupstreams.c @@ -1,4 +1,4 @@ -/************************************************************ +/**************************************************************************** * sched_setupstreams.c * * Copyright (C) 2007 Gregory Nutt. All rights reserved. @@ -31,27 +31,28 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> -#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 #include <sched.h> #include <nuttx/fs.h> #include <nuttx/net.h> #include <nuttx/lib.h> -/************************************************************ +#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0 + +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ int sched_setupstreams(FAR _TCB *tcb) { diff --git a/nuttx/sched/sched_setuptaskfiles.c b/nuttx/sched/sched_setuptaskfiles.c index 203a06b44..79c0ff44b 100644 --- a/nuttx/sched/sched_setuptaskfiles.c +++ b/nuttx/sched/sched_setuptaskfiles.c @@ -38,7 +38,6 @@ ************************************************************/ #include <nuttx/config.h> -#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 #include <sched.h> #include <errno.h> @@ -48,6 +47,8 @@ #include "os_internal.h" +#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 + /************************************************************ * Private Functions ************************************************************/ |