diff --git a/arch/z80/src/common/up_arch.h b/arch/z80/src/common/up_arch.h index dc7206da74..bba55ba4d7 100644 --- a/arch/z80/src/common/up_arch.h +++ b/arch/z80/src/common/up_arch.h @@ -1,7 +1,7 @@ /************************************************************************************ * 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 * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #include #include -#include "chip/chip.h" +#include "chip.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/z80/src/common/up_assert.c b/arch/z80/src/common/up_assert.c index 8a2765af90..c361386d5f 100644 --- a/arch/z80/src/common/up_assert.c +++ b/arch/z80/src/common/up_assert.c @@ -49,7 +49,7 @@ #include #include -#include "chip/chip.h" +#include "chip.h" #include "up_arch.h" #include "sched/sched.h" #include "up_internal.h" diff --git a/arch/z80/src/common/up_exit.c b/arch/z80/src/common/up_exit.c index af42e69ce9..71e8ff5193 100644 --- a/arch/z80/src/common/up_exit.c +++ b/arch/z80/src/common/up_exit.c @@ -49,7 +49,7 @@ # include #endif -#include "chip/chip.h" +#include "chip.h" #include "task/task.h" #include "sched/sched.h" #include "group/group.h" diff --git a/arch/z80/src/common/up_internal.h b/arch/z80/src/common/up_internal.h index d12d837341..3bfc829da3 100644 --- a/arch/z80/src/common/up_internal.h +++ b/arch/z80/src/common/up_internal.h @@ -63,8 +63,8 @@ #include #include -#include "chip/chip.h" -#include "chip/switch.h" +#include "chip.h" +#include "switch.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/z80/src/common/up_releasepending.c b/arch/z80/src/common/up_releasepending.c index 3a3974863f..1278692d78 100644 --- a/arch/z80/src/common/up_releasepending.c +++ b/arch/z80/src/common/up_releasepending.c @@ -45,7 +45,7 @@ #include #include -#include "chip/chip.h" +#include "chip.h" #include "chip/switch.h" #include "sched/sched.h" #include "group/group.h" diff --git a/arch/z80/src/common/up_reprioritizertr.c b/arch/z80/src/common/up_reprioritizertr.c index 12c4bcef99..04675918fd 100644 --- a/arch/z80/src/common/up_reprioritizertr.c +++ b/arch/z80/src/common/up_reprioritizertr.c @@ -47,7 +47,7 @@ #include #include -#include "chip/chip.h" +#include "chip.h" #include "chip/switch.h" #include "sched/sched.h" #include "group/group.h" diff --git a/arch/z80/src/common/up_unblocktask.c b/arch/z80/src/common/up_unblocktask.c index 3539ef404d..a27a8e1ddd 100644 --- a/arch/z80/src/common/up_unblocktask.c +++ b/arch/z80/src/common/up_unblocktask.c @@ -45,7 +45,7 @@ #include #include -#include "chip/chip.h" +#include "chip.h" #include "chip/switch.h" #include "sched/sched.h" #include "group/group.h" diff --git a/arch/z80/src/z80/switch.h b/arch/z80/src/z80/switch.h index c3403e1ea7..863fbad009 100644 --- a/arch/z80/src/z80/switch.h +++ b/arch/z80/src/z80/switch.h @@ -1,8 +1,7 @@ /************************************************************************************ * 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 * * 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); -/* 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 */ void z80_registerdump(void); diff --git a/arch/z80/src/z80/z80_schedulesigaction.c b/arch/z80/src/z80/z80_schedulesigaction.c index 439808b0ca..2b16b8deeb 100644 --- a/arch/z80/src/z80/z80_schedulesigaction.c +++ b/arch/z80/src/z80/z80_schedulesigaction.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,7 @@ #include #include +#include #include "chip/switch.h" #include "sched/sched.h" @@ -52,14 +53,6 @@ #ifndef CONFIG_DISABLE_SIGNALS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -68,7 +61,8 @@ * 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 * 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 */ - regs[XCPT_PC] = (chipreg_t)up_sigdeliver; - regs[XCPT_I] = 0; + regs[XCPT_PC] = (chipreg_t)up_sigdeliver; + regs[XCPT_I] = 0; } /**************************************************************************** diff --git a/configs/xtrs/README.txt b/configs/xtrs/README.txt index d778f087f7..c8f8769987 100644 --- a/configs/xtrs/README.txt +++ b/configs/xtrs/README.txt @@ -219,15 +219,21 @@ compatible with this build. First start with the usual steps cd sdcc ./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 -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 cd sdcc/device/lib Then make the SDCC binaries - cd sdcc make and install SDCC: diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 1bf744249d..01830d4469 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -31,9 +31,9 @@ CONFIG_START_MONTH=2 CONFIG_START_YEAR=2007 CONFIG_STDIO_DISABLE_BUFFERING=y CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART_RXBUFSIZE=0 +CONFIG_UART_RXBUFSIZE=32 CONFIG_UART_SERIAL_CONSOLE=y -CONFIG_UART_TXBUFSIZE=0 +CONFIG_UART_TXBUFSIZE=32 CONFIG_USER_ENTRYPOINT="ostest_main" CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_WDOG_INTRESERVE=0 diff --git a/configs/z80sim/src/z80_serial.c b/configs/z80sim/src/z80_serial.c index ce5f9aa763..42606643e8 100644 --- a/configs/z80sim/src/z80_serial.c +++ b/configs/z80sim/src/z80_serial.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -57,14 +57,6 @@ #ifdef USE_SERIALDRIVER -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/libc/time/lib_difftime.c b/libc/time/lib_difftime.c index ba249d230a..5e81cd02bd 100644 --- a/libc/time/lib_difftime.c +++ b/libc/time/lib_difftime.c @@ -66,7 +66,7 @@ double difftime(time_t time1, time_t time0) #else 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 * differences!)