diff --git a/ChangeLog b/ChangeLog index 3df0a869df3c31ebf048d40110b8891fa7280c18..157ef922ffcf72bc44e4b403c98d08f5aa4e4082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -287,4 +287,6 @@ * Changes for use with SDCC compiler * Added a simulated z80 target + * Fix deadlock errors when using stdio but with no buffering + diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 4044642d450790aaf539d5d6ab2a4bb2b11c3342..2b4fc48e02851f626e645c0f6d215294fe2378bf 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: December 30, 2007</p> + <p>Last Updated: January 1, 2008</p> </td> </tr> </table> @@ -725,6 +725,7 @@ Other memory: * Changes for use with SDCC compiler * Added a simulated z80 target + * Fix deadlock errors when using stdio but with no buffering </pre></ul> <table width ="100%"> diff --git a/TODO b/TODO index 9e19e4272bc31e07af84509c560d7ac65d9888da..a4c63d9f856396fda8a6cc5e2a70ee7d733d69cb 100644 --- a/TODO +++ b/TODO @@ -18,7 +18,7 @@ NuttX TODO List (Last updated December 13, 2007) (1) ARM/DM320 (arch/arm/src/dm320/) (2) ARM/LPC214x (arch/arm/src/lpc214x/) (4) pjrc-8052 / MCS51 (arch/pjrc-8051/) - (0) z80 (arch/z80/) + (2) z80 (arch/z80/) o Task/Scheduler (sched/) ^^^^^^^^^^^^^^^^^^^^^^^ @@ -315,7 +315,19 @@ o pjrc-8052 / MCS51 (arch/pjrc-8051/) o z80 (arch/z80) ^^^^^^^^^^^^^^^ - Has the same problems with interger overflow during compilation as described - for pjrc-8051 + Description: The Has the same problems with interger overflow during compilation + as described for pjrc-8051. At typical cause is code like + usleep(500*1000) which exceeds the range of a 16-bit integer + Status: See pjrc-8051 + Priority: See pjrc-8051 + + Description: The simulated serial console (configs/z80sim/src/z80_serial.c + + driver/serial.c) does not work. This is because there are + no interrupts in the simulation so there is never any serial + traffic. + Status: Open + Priority: Low -- the simulated console is not critical path and the designs + to solve the problem are complex. + diff --git a/arch/arm/src/common/up_assert.c b/arch/arm/src/common/up_assert.c index 3c8c859e07fcb83764fb568fbf60b55a7efa2148..9ddaf555c4ca9cad7177cdbac13b59d888ce94be 100644 --- a/arch/arm/src/common/up_assert.c +++ b/arch/arm/src/common/up_assert.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * common/up_assert.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * 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 @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 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. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> @@ -51,9 +51,9 @@ #include "os_internal.h" #include "up_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ /* Output debug info if stack dump is selected -- even if * debug is not selected. @@ -64,17 +64,17 @@ # define lldbg lib_lowprintf #endif -/************************************************************ +/**************************************************************************** * Private Data - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: up_getsp - ************************************************************/ + ****************************************************************************/ /* I don't know if the builtin to get SP is enabled */ @@ -89,9 +89,9 @@ static inline uint32 up_getsp(void) return sp; } -/************************************************************ +/**************************************************************************** * Name: up_stackdump - ************************************************************/ + ****************************************************************************/ #ifdef CONFIG_ARCH_STACKDUMP static void up_stackdump(void) @@ -152,9 +152,9 @@ static void up_stackdump(void) # define up_stackdump() #endif -/************************************************************ +/**************************************************************************** * Name: _up_assert - ************************************************************/ + ****************************************************************************/ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ { @@ -179,13 +179,13 @@ static void _up_assert(int errorcode) /* __attribute__ ((noreturn)) */ } } -/************************************************************ - * Public Funtions - ************************************************************/ +/**************************************************************************** + * Public Functions + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: up_assert - ************************************************************/ + ****************************************************************************/ void up_assert(const ubyte *filename, int lineno) { @@ -205,9 +205,9 @@ void up_assert(const ubyte *filename, int lineno) _up_assert(EXIT_FAILURE); } -/************************************************************ +/**************************************************************************** * Name: up_assert_code - ************************************************************/ + ****************************************************************************/ void up_assert_code(const ubyte *filename, int lineno, int errorcode) { diff --git a/arch/arm/src/common/up_exit.c b/arch/arm/src/common/up_exit.c index e1cddbf265c180aba1d94cc4f576aafb49c138e7..e760b00cf6d098c488975aa7c6ace9303f701dd9 100644 --- a/arch/arm/src/common/up_exit.c +++ b/arch/arm/src/common/up_exit.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * common/up_exit.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * 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 @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 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. * @@ -31,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <sys/types.h> @@ -49,19 +49,19 @@ #include <nuttx/fs.h> #endif -/************************************************************ +/**************************************************************************** * Private Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Data - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Funtions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: _up_dumponexit * * Description: @@ -70,7 +70,7 @@ * related reference counting but could be useful again * sometime in the future. * - ************************************************************/ + ****************************************************************************/ #if defined(CONFIG_DUMP_ON_EXIT) && defined(CONFIG_DEBUG) static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg) @@ -110,9 +110,13 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg) struct file_struct *filep = &tcb->streams->sl_streams[i]; if (filep->fs_filedes >= 0) { +#if CONFIG_STDIO_BUFFER_SIZE > 0 dbg(" fd=%d nbytes=%d\n", filep->fs_filedes, filep->fs_bufpos - filep->fs_bufstart); +#else + dbg(" fd=%d\n", filep->fs_filedes); +#endif } } } @@ -120,18 +124,18 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg) } #endif -/************************************************************ - * Public Funtions - ************************************************************/ +/**************************************************************************** + * Public Functions + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: _exit * * Description: * This function causes the currently executing task to cease * to exist. This is a special case of task_delete(). * - ************************************************************/ + ****************************************************************************/ void _exit(int status) { diff --git a/arch/arm/src/common/up_internal.h b/arch/arm/src/common/up_internal.h index a32c5324db83ab1a901805ae8d3eb71c46067c61..a2be035ff87b0605611e2ab99598266374a145a5 100644 --- a/arch/arm/src/common/up_internal.h +++ b/arch/arm/src/common/up_internal.h @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * common/up_internal.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * 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 @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 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. * @@ -31,18 +31,18 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ #ifndef __UP_INTERNAL_H #define __UP_INTERNAL_H -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ /* Bring-up debug configurations. These are here (vs defconfig) * because these should only be controlled during low level @@ -53,19 +53,19 @@ #undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */ #undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ -#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */ +#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ -/************************************************************ +/**************************************************************************** * Public Types - ************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ typedef void (*up_vector_t)(void); #endif -/************************************************************ +/**************************************************************************** * Public Variables - ************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ /* This holds a references to the current interrupt level @@ -84,14 +84,14 @@ extern uint32 *current_regs; extern uint32 g_heapbase; #endif -/************************************************************ +/**************************************************************************** * Inline Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ #ifndef __ASSEMBLY__ diff --git a/configs/z80sim/nshconfig b/configs/z80sim/nshconfig index b14b09362223c55db53d086e04348c3539fa35b9..63326cb6f2c66d428cc69bb2dc306763049d5603 100644 --- a/configs/z80sim/nshconfig +++ b/configs/z80sim/nshconfig @@ -130,7 +130,7 @@ CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DISABLE_PTHREAD=y CONFIG_DISABLE_SIGNALS=n CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_MOUNTPOINT=n +CONFIG_DISABLE_MOUNTPOINT=y CONFIG_DISABLE_ENVIRON=y # diff --git a/configs/z80sim/src/z80_serial.c b/configs/z80sim/src/z80_serial.c index 9a8fa0f89d78298a12a40d4ab21933b1f38620ed..2dcd56c0531bb7633eb65bea99097b0eab51121b 100644 --- a/configs/z80sim/src/z80_serial.c +++ b/configs/z80sim/src/z80_serial.c @@ -288,7 +288,7 @@ static boolean up_txfifonotfull(struct uart_dev_s *dev) static boolean up_txfifoempty(struct uart_dev_s *dev) { - return FALSE; + return TRUE; } /**************************************************************************** diff --git a/sched/sched_setupstreams.c b/sched/sched_setupstreams.c index 6e7216a4954c72a9612da0c46595153651bd2529..88d0b09c438cf7b9778238854905da1ec5356259 100644 --- a/sched/sched_setupstreams.c +++ b/sched/sched_setupstreams.c @@ -1,7 +1,7 @@ /**************************************************************************** * sched_setupstreams.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * 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 @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 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. * @@ -78,4 +78,4 @@ int sched_setupstreams(FAR _TCB *tcb) return OK; } -#endif /* CONFIG_NFILE_STREAMS && CONFIG_NFILE_STREAMS*/ +#endif /* CONFIG_NFILE_STREAMS && CONFIG_NFILE_STREAMS */