Changes for SDCC compiler

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@453 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-12-28 01:44:34 +00:00
parent 26a0534734
commit 932463210f
9 changed files with 89 additions and 24 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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

View File

@ -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
************************************************************/

View File

@ -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
************************************************************/

View File

@ -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
************************************************************/

View File

@ -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
************************************************************/

View File

@ -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>
/************************************************************
* Private Functions
************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0
/************************************************************
/****************************************************************************
* Private Functions
****************************************************************************/
/****************************************************************************
* Public Functions
************************************************************/
****************************************************************************/
int sched_setupstreams(FAR _TCB *tcb)
{

View File

@ -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
************************************************************/