A few more fixes for compilation with current SDCC compiler
This commit is contained in:
parent
ccabac3eb6
commit
b436e3a2c8
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/z80/src/common/up_arch.h
|
* arch/z80/src/common/up_arch.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2009, 2013, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -43,7 +43,7 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/board.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/usb/usbdev_trace.h>
|
#include <nuttx/usb/usbdev_trace.h>
|
||||||
|
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
# include <nuttx/fs/fs.h>
|
# include <nuttx/fs/fs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "task/task.h"
|
#include "task/task.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
|
@ -63,8 +63,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "chip/switch.h"
|
#include "switch.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#include "chip/chip.h"
|
#include "chip.h"
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/z80/src/z80/switch.h
|
* arch/z80/src/z80/switch.h
|
||||||
* arch/z80/src/chip/switch.h
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2011-2012, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -154,10 +153,6 @@ int z80_saveusercontext(FAR chipreg_t *regs);
|
|||||||
|
|
||||||
void z80_restoreusercontext(FAR chipreg_t *regs);
|
void z80_restoreusercontext(FAR chipreg_t *regs);
|
||||||
|
|
||||||
/* Defined in z80_sigsetup.c */
|
|
||||||
|
|
||||||
void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
|
|
||||||
|
|
||||||
/* Defined in z80_registerdump.c */
|
/* Defined in z80_registerdump.c */
|
||||||
|
|
||||||
void z80_registerdump(void);
|
void z80_registerdump(void);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/z80/z80_schedulesigaction.c
|
* arch/z80/src/z80/z80_schedulesigaction.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2010, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2010, 2015, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/irq.h>
|
#include <nuttx/irq.h>
|
||||||
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#include "chip/switch.h"
|
#include "chip/switch.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
@ -52,14 +53,6 @@
|
|||||||
|
|
||||||
#ifndef CONFIG_DISABLE_SIGNALS
|
#ifndef CONFIG_DISABLE_SIGNALS
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -68,7 +61,8 @@
|
|||||||
* Name: z80_sigsetup
|
* Name: z80_sigsetup
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
static void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs)
|
static void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver,
|
||||||
|
FAR chipreg_t *regs)
|
||||||
{
|
{
|
||||||
/* Save the return address and interrupt state. These will be restored by
|
/* Save the return address and interrupt state. These will be restored by
|
||||||
* the signal trampoline after the signals have been delivered.
|
* the signal trampoline after the signals have been delivered.
|
||||||
@ -80,8 +74,8 @@ static void z80_sigsetup(FAR struct tcb_s *tcb, sig_deliver_t sigdeliver, FAR ch
|
|||||||
|
|
||||||
/* Then set up to vector to the trampoline with interrupts disabled */
|
/* Then set up to vector to the trampoline with interrupts disabled */
|
||||||
|
|
||||||
regs[XCPT_PC] = (chipreg_t)up_sigdeliver;
|
regs[XCPT_PC] = (chipreg_t)up_sigdeliver;
|
||||||
regs[XCPT_I] = 0;
|
regs[XCPT_I] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -219,15 +219,21 @@ compatible with this build. First start with the usual steps
|
|||||||
cd sdcc
|
cd sdcc
|
||||||
./configure
|
./configure
|
||||||
|
|
||||||
|
Note if you do not have the gputils packet installed, newer version of the
|
||||||
|
SDCC configure will fail. You will have to either install the gputils
|
||||||
|
package or if you don't need PIC14 or PIC16 support:
|
||||||
|
|
||||||
|
./configure --disable-pic14-port --disable-pic16-port
|
||||||
|
|
||||||
But before making, we need to apply a patch to the SDCC 2.6.0 source
|
But before making, we need to apply a patch to the SDCC 2.6.0 source
|
||||||
so that the z80 assembler can handle long symbol names
|
so that the z80 assembler can handle long symbol names. This is not
|
||||||
|
needed with later versions.
|
||||||
|
|
||||||
Apply sdcc-2.6.0-asz80-symlen.patch
|
Apply sdcc-2.6.0-asz80-symlen.patch
|
||||||
cd sdcc/device/lib
|
cd sdcc/device/lib
|
||||||
|
|
||||||
Then make the SDCC binaries
|
Then make the SDCC binaries
|
||||||
|
|
||||||
cd sdcc
|
|
||||||
make
|
make
|
||||||
|
|
||||||
and install SDCC:
|
and install SDCC:
|
||||||
|
@ -31,9 +31,9 @@ CONFIG_START_MONTH=2
|
|||||||
CONFIG_START_YEAR=2007
|
CONFIG_START_YEAR=2007
|
||||||
CONFIG_STDIO_DISABLE_BUFFERING=y
|
CONFIG_STDIO_DISABLE_BUFFERING=y
|
||||||
CONFIG_TASK_NAME_SIZE=0
|
CONFIG_TASK_NAME_SIZE=0
|
||||||
CONFIG_UART_RXBUFSIZE=0
|
CONFIG_UART_RXBUFSIZE=32
|
||||||
CONFIG_UART_SERIAL_CONSOLE=y
|
CONFIG_UART_SERIAL_CONSOLE=y
|
||||||
CONFIG_UART_TXBUFSIZE=0
|
CONFIG_UART_TXBUFSIZE=32
|
||||||
CONFIG_USER_ENTRYPOINT="ostest_main"
|
CONFIG_USER_ENTRYPOINT="ostest_main"
|
||||||
CONFIG_USERMAIN_STACKSIZE=1024
|
CONFIG_USERMAIN_STACKSIZE=1024
|
||||||
CONFIG_WDOG_INTRESERVE=0
|
CONFIG_WDOG_INTRESERVE=0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/z80sim/src/z80_serial.c
|
* configs/z80sim/src/z80_serial.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2012, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -57,14 +57,6 @@
|
|||||||
|
|
||||||
#ifdef USE_SERIALDRIVER
|
#ifdef USE_SERIALDRIVER
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Types
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Function Prototypes
|
* Private Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -66,7 +66,7 @@ double difftime(time_t time1, time_t time0)
|
|||||||
#else
|
#else
|
||||||
float difftime(time_t time1, time_t time0)
|
float difftime(time_t time1, time_t time0)
|
||||||
{
|
{
|
||||||
if (time1 >= time2)
|
if (time1 >= time0)
|
||||||
{
|
{
|
||||||
/* Result will be positive (even though bit 31 may be set on very large
|
/* Result will be positive (even though bit 31 may be set on very large
|
||||||
* differences!)
|
* differences!)
|
||||||
|
Loading…
Reference in New Issue
Block a user