summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-01 14:54:10 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-01 14:54:10 +0000
commita41c364ae0157a691fb0806a58eec6b3adeafae2 (patch)
treeae66fc166ab1f2f1a142e260242d10ccb68cbd99
parent7132a889f53ad83ef293c29a9c2e4688b2886635 (diff)
downloadnuttx-a41c364ae0157a691fb0806a58eec6b3adeafae2.tar.gz
nuttx-a41c364ae0157a691fb0806a58eec6b3adeafae2.tar.bz2
nuttx-a41c364ae0157a691fb0806a58eec6b3adeafae2.zip
Debug z80sim NSH (still doesn't work)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@476 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/ChangeLog2
-rw-r--r--nuttx/Documentation/NuttX.html3
-rw-r--r--nuttx/TODO18
-rw-r--r--nuttx/arch/arm/src/common/up_assert.c50
-rw-r--r--nuttx/arch/arm/src/common/up_exit.c42
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h34
-rw-r--r--nuttx/configs/z80sim/nshconfig2
-rw-r--r--nuttx/configs/z80sim/src/z80_serial.c2
-rw-r--r--nuttx/sched/sched_setupstreams.c6
9 files changed, 89 insertions, 70 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 3df0a869d..157ef922f 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/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/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 4044642d4..2b4fc48e0 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/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/nuttx/TODO b/nuttx/TODO
index 9e19e4272..a4c63d9f8 100644
--- a/nuttx/TODO
+++ b/nuttx/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/nuttx/arch/arm/src/common/up_assert.c b/nuttx/arch/arm/src/common/up_assert.c
index 3c8c859e0..9ddaf555c 100644
--- a/nuttx/arch/arm/src/common/up_assert.c
+++ b/nuttx/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/nuttx/arch/arm/src/common/up_exit.c b/nuttx/arch/arm/src/common/up_exit.c
index e1cddbf26..e760b00cf 100644
--- a/nuttx/arch/arm/src/common/up_exit.c
+++ b/nuttx/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/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index a32c5324d..a2be035ff 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/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/nuttx/configs/z80sim/nshconfig b/nuttx/configs/z80sim/nshconfig
index b14b09362..63326cb6f 100644
--- a/nuttx/configs/z80sim/nshconfig
+++ b/nuttx/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/nuttx/configs/z80sim/src/z80_serial.c b/nuttx/configs/z80sim/src/z80_serial.c
index 9a8fa0f89..2dcd56c05 100644
--- a/nuttx/configs/z80sim/src/z80_serial.c
+++ b/nuttx/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/nuttx/sched/sched_setupstreams.c b/nuttx/sched/sched_setupstreams.c
index 6e7216a49..88d0b09c4 100644
--- a/nuttx/sched/sched_setupstreams.c
+++ b/nuttx/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 */