summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 17:44:35 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-06-25 17:44:35 +0000
commit018ff6e65dcc563321d27d010e693dd8413e2f45 (patch)
treecd6fc22d2130b328328f2aeef39b8758673ec132 /nuttx
parent50d5e799e29f7d1da649d43fee8382cdffe3fc89 (diff)
downloadpx4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.gz
px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.tar.bz2
px4-nuttx-018ff6e65dcc563321d27d010e693dd8413e2f45.zip
Consolidate buffer dumping; fix all occurrences of 'the the'
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1951 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/Documentation/NXGraphicsSubsystem.html2
-rw-r--r--nuttx/Documentation/NuttShell.html4
-rw-r--r--nuttx/Documentation/NuttX.html2
-rw-r--r--nuttx/Documentation/NuttxUserGuide.html6
-rw-r--r--nuttx/ReleaseNotes2
-rw-r--r--nuttx/arch/arm/include/cortexm3/irq.h2
-rw-r--r--nuttx/arch/arm/src/arm/up_sigdeliver.c2
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_ethernet.c59
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_watchdog.c2
-rw-r--r--nuttx/arch/arm/src/common/up_blocktask.c2
-rw-r--r--nuttx/arch/arm/src/common/up_exit.c2
-rw-r--r--nuttx/arch/arm/src/common/up_internal.h2
-rw-r--r--nuttx/arch/arm/src/cortexm3/up_sigdeliver.c2
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_restart.S2
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_serial.c2
-rw-r--r--nuttx/arch/arm/src/imx/imx_serial.c2
-rw-r--r--nuttx/arch/arm/src/lm3s/lm3s_serial.c2
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_serial.c2
-rw-r--r--nuttx/arch/arm/src/str71x/str71x_serial.c2
-rw-r--r--nuttx/arch/pjrc-8051/include/types.h2
-rw-r--r--nuttx/arch/pjrc-8051/src/up_blocktask.c2
-rw-r--r--nuttx/arch/pjrc-8051/src/up_exit.c2
-rw-r--r--nuttx/arch/sh/src/common/up_blocktask.c2
-rw-r--r--nuttx/arch/sh/src/common/up_exit.c2
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_serial.c2
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_sigdeliver.c2
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_serial.c2
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_sigdeliver.c2
-rw-r--r--nuttx/arch/sim/src/up_blocktask.c2
-rw-r--r--nuttx/arch/sim/src/up_exit.c2
-rw-r--r--nuttx/arch/z16/include/z16f/irq.h2
-rw-r--r--nuttx/arch/z16/src/common/up_blocktask.c2
-rw-r--r--nuttx/arch/z16/src/common/up_exit.c2
-rw-r--r--nuttx/arch/z16/src/common/up_sigdeliver.c2
-rw-r--r--nuttx/arch/z16/src/z16f/z16f_sysexec.c2
-rw-r--r--nuttx/arch/z80/include/z8/irq.h2
-rw-r--r--nuttx/arch/z80/include/z80/irq.h2
-rw-r--r--nuttx/arch/z80/src/common/up_blocktask.c2
-rw-r--r--nuttx/arch/z80/src/common/up_exit.c2
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_emac.c2
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_sigdeliver.c2
-rw-r--r--nuttx/arch/z80/src/z8/z8_sigdeliver.c2
-rw-r--r--nuttx/arch/z80/src/z80/z80_sigdeliver.c2
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat_bind.c47
-rw-r--r--nuttx/binfmt/libnxflat/libnxflat_verify.c2
-rw-r--r--nuttx/binfmt/nxflat.c45
-rw-r--r--nuttx/configs/eagle100/httpd/ld.script2
-rw-r--r--nuttx/configs/eagle100/nettest/ld.script2
-rw-r--r--nuttx/configs/eagle100/nsh/ld.script2
-rw-r--r--nuttx/configs/eagle100/nxflat/ld.script2
-rw-r--r--nuttx/configs/eagle100/ostest/ld.script2
-rw-r--r--nuttx/configs/xtrs/src/xtr_irq.c2
-rw-r--r--nuttx/configs/z80sim/src/z80_irq.c2
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_debug.c62
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_internal.h7
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_spi.c6
-rw-r--r--nuttx/drivers/net/cs89x0.c2
-rw-r--r--nuttx/drivers/usbdev/usbdev_scsi.c2
-rw-r--r--nuttx/examples/README.txt2
-rw-r--r--nuttx/examples/nsh/README.txt4
-rw-r--r--nuttx/examples/nsh/nsh_netcmds.c2
-rw-r--r--nuttx/examples/nxflat/nxflat_main.c2
-rw-r--r--nuttx/examples/nxflat/tests/hello++/Makefile2
-rw-r--r--nuttx/examples/pashello/device.c2
-rw-r--r--nuttx/fs/fat/fs_fat32util.c2
-rw-r--r--nuttx/fs/fs_poll.c2
-rw-r--r--nuttx/fs/fs_seekdir.c2
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_convert.c2
-rw-r--r--nuttx/graphics/nxglib/nxglib_bitblit.h2
-rw-r--r--nuttx/graphics/nxmu/nxfe.h4
-rw-r--r--nuttx/graphics/nxmu/nxmu_constructwindow.c2
-rw-r--r--nuttx/graphics/nxsu/nxfe.h4
-rw-r--r--nuttx/graphics/nxsu/nxsu_constructwindow.c2
-rw-r--r--nuttx/include/debug.h100
-rw-r--r--nuttx/include/nuttx/arch.h4
-rw-r--r--nuttx/include/nuttx/can.h2
-rwxr-xr-xnuttx/include/nuttx/cs89x0.h2
-rw-r--r--nuttx/include/nuttx/serial.h2
-rw-r--r--nuttx/include/nxflat.h2
-rw-r--r--nuttx/lib/Makefile7
-rw-r--r--nuttx/mm/mm_shrinkchunk.c2
-rw-r--r--nuttx/net/netdev_register.c2
-rw-r--r--nuttx/net/uip/uip_icmpping.c2
-rw-r--r--nuttx/net/uip/uip_tcpbacklog.c2
-rw-r--r--nuttx/netutils/dhcpc/dhcpc.c2
-rw-r--r--nuttx/netutils/telnetd/telnetd.c41
-rw-r--r--nuttx/netutils/tftpc/tftpc_internal.h2
-rw-r--r--nuttx/netutils/tftpc/tftpc_packets.c50
-rw-r--r--nuttx/netutils/webserver/httpd.c46
-rw-r--r--nuttx/sched/mq_timedreceive.c2
-rw-r--r--nuttx/sched/mq_timedsend.c2
-rw-r--r--nuttx/sched/mq_waitirq.c2
-rw-r--r--nuttx/sched/pthread_keycreate.c2
-rw-r--r--nuttx/sched/sem_holder.c2
-rw-r--r--nuttx/sched/sem_waitirq.c2
-rw-r--r--nuttx/sched/wd_gettime.c2
96 files changed, 286 insertions, 368 deletions
diff --git a/nuttx/Documentation/NXGraphicsSubsystem.html b/nuttx/Documentation/NXGraphicsSubsystem.html
index 6374c3ca7..6d4597acf 100644
--- a/nuttx/Documentation/NXGraphicsSubsystem.html
+++ b/nuttx/Documentation/NXGraphicsSubsystem.html
@@ -1652,7 +1652,7 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,
or <a href="#nxrequestbkgd"><code>nx_requestbkgd()</code></a> that specifies the
window that will receive the bitmap image.
<dt><code>dest</code>
- <dd> Describes the rectangular on the display that will receive the the bit map.
+ <dd> Describes the rectangular on the display that will receive the bit map.
<dt><code>src</code>
<dd>The start of the source image. This is an array source images of size
<code>CONFIG_NX_NPLANES</code> (probably 1).
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index 788e9ab00..4cc4c4125 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -1348,7 +1348,7 @@ mount -t &lt;fstype&gt; &lt;block-device&gt; <code>&lt;dir-path&gt;</code>
</li>
</ol>
<p>
- After the the volume has been mounted in the NuttX
+ After the volume has been mounted in the NuttX
<a href="NuttxUserGuide.html#FileSystemOverview"><i>pseudo</i> filesystem</a>,
it may be access in the same way as other objects in thefile system.
</p>
@@ -2108,7 +2108,7 @@ nsh>
<tr>
<td valign="top"><b><code>CONFIG_EXAMPLES_NSH_DHCPC</code></b></td>
<td>
- Obtain the the IP address via DHCP.
+ Obtain the IP address via DHCP.
</td>
</tr>
<tr>
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index fdde2880e..27873d291 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -1214,7 +1214,7 @@ m68k, m68hc11, m68hc12, and SuperH ports.</blockquote>
<td>
<p>
This is a tougher environment.
- In this case, the Windows native toolchain is unaware of the the
+ In this case, the Windows native toolchain is unaware of the
Cygwin <i>sandbox</i> and, instead, operates in the native Windows environment.
The primary difficulties with this are:
</p>
diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html
index 6a8ee1847..3fc63d6ad 100644
--- a/nuttx/Documentation/NuttxUserGuide.html
+++ b/nuttx/Documentation/NuttxUserGuide.html
@@ -170,7 +170,7 @@ paragraphs.
</p>
</p>
If CONFIG_DEV_CONSOLE is defined, the first three file descriptors (corresponding
- to stdin, stdout, stderr) will be duplicated for the the new task.
+ to stdin, stdout, stderr) will be duplicated for the new task.
Since these file descriptors are duplicated, the child task can free close
them or manipulate them in any way without effecting the parent task.
File-related operations (open, close, etc.) within a task will have no effect
@@ -2430,7 +2430,7 @@ VxWorks provides the following comparable interface:
</pre>
<p>
<b>Description:</b>
- This function returns the time remaining before the the specified watchdog expires.
+ This function returns the time remaining before the specified watchdog expires.
</p>
<p>
<b>Input Parameters:</b>
@@ -4490,7 +4490,7 @@ per-thread basis and persist for the life of the calling
thread.
<p>
Upon key creation, the value <I>NULL</I> will be associated with
-the the new key in all active threads. Upon thread
+the new key in all active threads. Upon thread
creation, the value <I>NULL</I> will be associated with all
defined keys in the new thread.
<p>
diff --git a/nuttx/ReleaseNotes b/nuttx/ReleaseNotes
index 9a5892024..f421c5365 100644
--- a/nuttx/ReleaseNotes
+++ b/nuttx/ReleaseNotes
@@ -801,7 +801,7 @@ support for two new architectures:
been integrated due to toolchain issues.
* Renesas M16C/20. Support for the Renesas SKP16C20 board has been included in
- the NuttX source tree. However, as the the eZ80Acclaim!, testing and integration
+ the NuttX source tree. However, as the eZ80Acclaim!, testing and integration
of that port is stalled due to toolchain issues.
These changes were verified only on the ZiLOG eZ80910200zcog-d board. Please report any errors
diff --git a/nuttx/arch/arm/include/cortexm3/irq.h b/nuttx/arch/arm/include/cortexm3/irq.h
index b439ec42f..91be3e8b3 100644
--- a/nuttx/arch/arm/include/cortexm3/irq.h
+++ b/nuttx/arch/arm/include/cortexm3/irq.h
@@ -160,7 +160,7 @@ static inline irqstate_t irqsave(void)
{
unsigned short primask;
- /* Return the the current value of primask register and set
+ /* Return the current value of primask register and set
* bit 0 of the primask register to disable interrupts
*/
diff --git a/nuttx/arch/arm/src/arm/up_sigdeliver.c b/nuttx/arch/arm/src/arm/up_sigdeliver.c
index 8d1601aea..469f274e6 100644
--- a/nuttx/arch/arm/src/arm/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/arm/up_sigdeliver.c
@@ -86,7 +86,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
- * signal handling so that the the user code final gets
+ * signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/
diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
index 76a565fcd..322882fd4 100644
--- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c
+++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
@@ -415,53 +415,16 @@ static void c5471_macassign(struct c5471_driver_s *c5471);
****************************************************************************/
#ifdef CONFIG_C5471_NET_DUMPBUFFER
-static void c5471_dumpbuffer(const char *buffer, ssize_t nbytes)
+static inline void c5471_dumpbuffer(const char *msg, const ubyte *buffer, unsigned int nbytes)
{
-#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET)
- char line[128];
- int ch;
- int i;
- int j;
-
- for (i = 0; i < nbytes; i += 16)
- {
- sprintf(line, "%04x: ", i);
- for (j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- sprintf(&line[strlen(line)], "%02x", buffer[i+j] );
- }
- else
- {
- strcpy(&line[strlen(line)], " ");
- }
-
- if (j == 7 || j == 15)
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- ch = buffer[i+j];
- sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
- }
-
- if (j == 7 || j == 15)
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
- ndbg("%s\n", line);
- }
-#endif
+ /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be
+ * defined or the following does nothing.
+ */
+
+ nvdbgdumpbuffer(msg, buffer, nbytes);
}
#else
-# define c5471_dumpbuffer(buffer,nbytes)
+# define c5471_dumpbuffer(msg, buffer,nbytes)
#endif
/****************************************************************************
@@ -494,7 +457,7 @@ static void c5471_mdtxbit (int bit_state)
putreg32((getreg32(GPIO_CIO) & ~GPIO_CIO_MDIO), GPIO_CIO);
- /* Select the the bit output state */
+ /* Select the bit output state */
if (bit_state)
{
@@ -907,7 +870,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471)
c5471->c_lastdescstart = c5471->c_rxcpudesc;
nvdbg("Packet size: %d RX CPU desc: %08x\n", nbytes, c5471->c_rxcpudesc);
- c5471_dumpbuffer(dev->d_buf, dev->d_len);
+ c5471_dumpbuffer("Transmit packet", dev->d_buf, dev->d_len);
while (nbytes)
{
@@ -1276,7 +1239,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
dev->d_len = packetlen;
nvdbg("Received packet, packetlen: %d type: %02x\n", packetlen, ntohs(BUF->type));
- c5471_dumpbuffer(dev->d_buf, dev->d_len);
+ c5471_dumpbuffer("Received packet", dev->d_buf, dev->d_len);
/* We only accept IP packets of the configured type and ARP packets */
@@ -2006,7 +1969,7 @@ static void c5471_eimconfig(struct c5471_driver_s *c5471)
putreg32(ENET_ADR_BROADCAST|ENET_ADR_PROMISCUOUS, ENET0_ADRMODE_EN);
#else
/* The CPU port is not PROMISCUOUS, it wants a no-promiscuous address
- * match yet the the SWITCH receives packets from the PROMISCUOUS ENET0
+ * match yet the SWITCH receives packets from the PROMISCUOUS ENET0
* which routes all packets for filter matching at the CPU port which
* then allows the s/w to see the new incoming packetes that passed
* the filter. Here we are setting the main SWITCH closest the ether
diff --git a/nuttx/arch/arm/src/c5471/c5471_watchdog.c b/nuttx/arch/arm/src/c5471/c5471_watchdog.c
index 8983b7549..96ddb6529 100644
--- a/nuttx/arch/arm/src/c5471/c5471_watchdog.c
+++ b/nuttx/arch/arm/src/c5471/c5471_watchdog.c
@@ -287,7 +287,7 @@ static int wdt_ioctl(struct file *filep, int cmd, uint32 arg)
{
dbg("ioctl Call: cmd=0x%x arg=0x%x", cmd, arg);
- /* Process the the IOCTL command (see arch/watchdog.h) */
+ /* Process the IOCTL command (see arch/watchdog.h) */
switch(cmd)
{
diff --git a/nuttx/arch/arm/src/common/up_blocktask.c b/nuttx/arch/arm/src/common/up_blocktask.c
index 2590597f8..f4e31526b 100644
--- a/nuttx/arch/arm/src/common/up_blocktask.c
+++ b/nuttx/arch/arm/src/common/up_blocktask.c
@@ -74,7 +74,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/arm/src/common/up_exit.c b/nuttx/arch/arm/src/common/up_exit.c
index 0d62a3d28..8416a99a3 100644
--- a/nuttx/arch/arm/src/common/up_exit.c
+++ b/nuttx/arch/arm/src/common/up_exit.c
@@ -136,7 +136,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
index 2fd44bb93..5442f5914 100644
--- a/nuttx/arch/arm/src/common/up_internal.h
+++ b/nuttx/arch/arm/src/common/up_internal.h
@@ -74,7 +74,7 @@
/* Macros to handle saving and restore interrupt state. In the current ARM
* model, the state is always copied to and from the stack and TCB. In the
* Cortex-M3 model, the state is copied from the stack to the TCB, but only
- * a referenced is passed to get the the state from the TCB.
+ * a referenced is passed to get the state from the TCB.
*/
#ifdef CONFIG_ARCH_CORTEXM3
diff --git a/nuttx/arch/arm/src/cortexm3/up_sigdeliver.c b/nuttx/arch/arm/src/cortexm3/up_sigdeliver.c
index d0241dfa1..98dd94e99 100644
--- a/nuttx/arch/arm/src/cortexm3/up_sigdeliver.c
+++ b/nuttx/arch/arm/src/cortexm3/up_sigdeliver.c
@@ -86,7 +86,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
- * signal handling so that the the user code final gets
+ * signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/
diff --git a/nuttx/arch/arm/src/dm320/dm320_restart.S b/nuttx/arch/arm/src/dm320/dm320_restart.S
index 5990605c7..ccbdfc2d9 100644
--- a/nuttx/arch/arm/src/dm320/dm320_restart.S
+++ b/nuttx/arch/arm/src/dm320/dm320_restart.S
@@ -110,7 +110,7 @@ up_phyrestart:
bic r0, r0, #(CR_S|CR_I|CR_V|CR_RR)
mcr p15, 0, r0, c1, c0, 0 /* Write control reg */
- /* We know that the the bootloader entry point is at the
+ /* We know that the bootloader entry point is at the
* beginning of flash.
*/
#if 1
diff --git a/nuttx/arch/arm/src/dm320/dm320_serial.c b/nuttx/arch/arm/src/dm320/dm320_serial.c
index 93da27525..35d0db17d 100644
--- a/nuttx/arch/arm/src/dm320/dm320_serial.c
+++ b/nuttx/arch/arm/src/dm320/dm320_serial.c
@@ -587,7 +587,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/imx/imx_serial.c b/nuttx/arch/arm/src/imx/imx_serial.c
index 4682a2938..70dcb5f1c 100644
--- a/nuttx/arch/arm/src/imx/imx_serial.c
+++ b/nuttx/arch/arm/src/imx/imx_serial.c
@@ -911,7 +911,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/lm3s/lm3s_serial.c b/nuttx/arch/arm/src/lm3s/lm3s_serial.c
index 04a9bdbf0..3c4247da5 100644
--- a/nuttx/arch/arm/src/lm3s/lm3s_serial.c
+++ b/nuttx/arch/arm/src/lm3s/lm3s_serial.c
@@ -674,7 +674,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
index 360a252f5..74f853830 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
+++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
@@ -612,7 +612,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/str71x/str71x_serial.c b/nuttx/arch/arm/src/str71x/str71x_serial.c
index 1c949a9d0..481603875 100644
--- a/nuttx/arch/arm/src/str71x/str71x_serial.c
+++ b/nuttx/arch/arm/src/str71x/str71x_serial.c
@@ -783,7 +783,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the UART. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/pjrc-8051/include/types.h b/nuttx/arch/pjrc-8051/include/types.h
index 9656c0231..fad90f25d 100644
--- a/nuttx/arch/pjrc-8051/include/types.h
+++ b/nuttx/arch/pjrc-8051/include/types.h
@@ -59,7 +59,7 @@
* For SDCC, sizeof(int) is 16 and sizeof(long) is 32.
* long long and double are not supported.
*
- * Generic pointers are 3 bytes in length with the the
+ * Generic pointers are 3 bytes in length with the
* first byte holding data space intformation.
*/
diff --git a/nuttx/arch/pjrc-8051/src/up_blocktask.c b/nuttx/arch/pjrc-8051/src/up_blocktask.c
index 9d9094a77..5760e9302 100644
--- a/nuttx/arch/pjrc-8051/src/up_blocktask.c
+++ b/nuttx/arch/pjrc-8051/src/up_blocktask.c
@@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/pjrc-8051/src/up_exit.c b/nuttx/arch/pjrc-8051/src/up_exit.c
index 227225596..6b9529050 100644
--- a/nuttx/arch/pjrc-8051/src/up_exit.c
+++ b/nuttx/arch/pjrc-8051/src/up_exit.c
@@ -69,7 +69,7 @@
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/sh/src/common/up_blocktask.c b/nuttx/arch/sh/src/common/up_blocktask.c
index 154f3912f..547fd368f 100644
--- a/nuttx/arch/sh/src/common/up_blocktask.c
+++ b/nuttx/arch/sh/src/common/up_blocktask.c
@@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/sh/src/common/up_exit.c b/nuttx/arch/sh/src/common/up_exit.c
index b362880ec..ede048370 100644
--- a/nuttx/arch/sh/src/common/up_exit.c
+++ b/nuttx/arch/sh/src/common/up_exit.c
@@ -134,7 +134,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/sh/src/m16c/m16c_serial.c b/nuttx/arch/sh/src/m16c/m16c_serial.c
index 1db4b3ea1..cefbbbf9b 100644
--- a/nuttx/arch/sh/src/m16c/m16c_serial.c
+++ b/nuttx/arch/sh/src/m16c/m16c_serial.c
@@ -906,7 +906,7 @@ static boolean up_rxavailable(struct uart_dev_s *dev)
{
struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
- /* Return true if the there is data available in the read buffer */
+ /* Return true if there is data available in the read buffer */
return ((up_serialin(priv, M16C_UART_C1) & UART_C1_RI) != 0);
}
diff --git a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
index 2d4cf2069..5505e2e48 100644
--- a/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
+++ b/nuttx/arch/sh/src/m16c/m16c_sigdeliver.c
@@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
- * signal handling so that the the user code final gets
+ * signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/
diff --git a/nuttx/arch/sh/src/sh1/sh1_serial.c b/nuttx/arch/sh/src/sh1/sh1_serial.c
index 6991e0f32..0be2bc280 100644
--- a/nuttx/arch/sh/src/sh1/sh1_serial.c
+++ b/nuttx/arch/sh/src/sh1/sh1_serial.c
@@ -644,7 +644,7 @@ static int up_interrupt(int irq, void *context)
* Description:
* Called (usually) from the interrupt level to receive one
* character from the SCI. Error bits associated with the
- * receipt are provided in the the return 'status'.
+ * receipt are provided in the return 'status'.
*
****************************************************************************/
diff --git a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
index 2b5442812..91e9163ff 100644
--- a/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
+++ b/nuttx/arch/sh/src/sh1/sh1_sigdeliver.c
@@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the
- * signal handling so that the the user code final gets
+ * signal handling so that the user code final gets
* the correct errno value (probably EINTR).
*/
diff --git a/nuttx/arch/sim/src/up_blocktask.c b/nuttx/arch/sim/src/up_blocktask.c
index 33056018f..b297f1a8d 100644
--- a/nuttx/arch/sim/src/up_blocktask.c
+++ b/nuttx/arch/sim/src/up_blocktask.c
@@ -71,7 +71,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/sim/src/up_exit.c b/nuttx/arch/sim/src/up_exit.c
index 5c2cd3dc4..4a829e3cc 100644
--- a/nuttx/arch/sim/src/up_exit.c
+++ b/nuttx/arch/sim/src/up_exit.c
@@ -68,7 +68,7 @@
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/z16/include/z16f/irq.h b/nuttx/arch/z16/include/z16f/irq.h
index 3e4ae472c..025a38b9b 100644
--- a/nuttx/arch/z16/include/z16f/irq.h
+++ b/nuttx/arch/z16/include/z16f/irq.h
@@ -163,7 +163,7 @@
#ifndef __ASSEMBLY__
-/* This is the the type of the register save array */
+/* This is the type of the register save array */
typedef uint16 chipreg_t;
diff --git a/nuttx/arch/z16/src/common/up_blocktask.c b/nuttx/arch/z16/src/common/up_blocktask.c
index 218afe080..806c91d41 100644
--- a/nuttx/arch/z16/src/common/up_blocktask.c
+++ b/nuttx/arch/z16/src/common/up_blocktask.c
@@ -74,7 +74,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/z16/src/common/up_exit.c b/nuttx/arch/z16/src/common/up_exit.c
index 589f9ca6a..e86137ab2 100644
--- a/nuttx/arch/z16/src/common/up_exit.c
+++ b/nuttx/arch/z16/src/common/up_exit.c
@@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/z16/src/common/up_sigdeliver.c b/nuttx/arch/z16/src/common/up_sigdeliver.c
index e6aa6325d..a8eecdda2 100644
--- a/nuttx/arch/z16/src/common/up_sigdeliver.c
+++ b/nuttx/arch/z16/src/common/up_sigdeliver.c
@@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
- * so that the the user code final gets the correct errno value (probably
+ * so that the user code final gets the correct errno value (probably
* EINTR).
*/
diff --git a/nuttx/arch/z16/src/z16f/z16f_sysexec.c b/nuttx/arch/z16/src/z16f/z16f_sysexec.c
index e492bab6e..d736c109b 100644
--- a/nuttx/arch/z16/src/z16f/z16f_sysexec.c
+++ b/nuttx/arch/z16/src/z16f/z16f_sysexec.c
@@ -89,7 +89,7 @@ void z16f_sysexec(FAR chipreg_t *regs)
current_regs = regs;
- /* The cause of the the system exception is indicated in the SYSEXCPH&L
+ /* The cause of the system exception is indicated in the SYSEXCPH&L
* registers
*/
diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h
index 79fe8e83b..25c80e009 100644
--- a/nuttx/arch/z80/include/z8/irq.h
+++ b/nuttx/arch/z80/include/z8/irq.h
@@ -304,7 +304,7 @@
#ifndef __ASSEMBLY__
-/* This is the the type of the register save array */
+/* This is the type of the register save array */
typedef uint16 chipreg_t;
diff --git a/nuttx/arch/z80/include/z80/irq.h b/nuttx/arch/z80/include/z80/irq.h
index 25d43e363..042e44e17 100644
--- a/nuttx/arch/z80/include/z80/irq.h
+++ b/nuttx/arch/z80/include/z80/irq.h
@@ -88,7 +88,7 @@
#ifndef __ASSEMBLY__
-/* This is the the type of the register save array */
+/* This is the type of the register save array */
typedef uint16 chipreg_t;
diff --git a/nuttx/arch/z80/src/common/up_blocktask.c b/nuttx/arch/z80/src/common/up_blocktask.c
index d0e792203..3d3ce99ad 100644
--- a/nuttx/arch/z80/src/common/up_blocktask.c
+++ b/nuttx/arch/z80/src/common/up_blocktask.c
@@ -75,7 +75,7 @@
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
diff --git a/nuttx/arch/z80/src/common/up_exit.c b/nuttx/arch/z80/src/common/up_exit.c
index b56f286cd..c9ae45bb9 100644
--- a/nuttx/arch/z80/src/common/up_exit.c
+++ b/nuttx/arch/z80/src/common/up_exit.c
@@ -138,7 +138,7 @@ static void _up_dumponexit(FAR _TCB *tcb, FAR void *arg)
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
****************************************************************************/
diff --git a/nuttx/arch/z80/src/ez80/ez80_emac.c b/nuttx/arch/z80/src/ez80/ez80_emac.c
index 0e557564d..bbfe74675 100644
--- a/nuttx/arch/z80/src/ez80/ez80_emac.c
+++ b/nuttx/arch/z80/src/ez80/ez80_emac.c
@@ -2119,7 +2119,7 @@ int up_multicastfilter(FAR struct uip_driver_s *dev, FAR ubyte *mac, boolean ena
* is '0', the multicast packet is rejected.
*/
- /* Apply the hash algorithm to the the hash table index and bit number
+ /* Apply the hash algorithm to the hash table index and bit number
* corresponding to this MAC
*/
diff --git a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
index b7084ab6d..3f6b6ed1a 100644
--- a/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
+++ b/nuttx/arch/z80/src/ez80/ez80_sigdeliver.c
@@ -88,7 +88,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
- * so that the the user code final gets the correct errno value (probably
+ * so that the user code final gets the correct errno value (probably
* EINTR).
*/
diff --git a/nuttx/arch/z80/src/z8/z8_sigdeliver.c b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
index 8ba3c552e..7e7700ed1 100644
--- a/nuttx/arch/z80/src/z8/z8_sigdeliver.c
+++ b/nuttx/arch/z80/src/z8/z8_sigdeliver.c
@@ -102,7 +102,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
- * so that the the user code final gets the correct errno value (probably
+ * so that the user code final gets the correct errno value (probably
* EINTR).
*/
diff --git a/nuttx/arch/z80/src/z80/z80_sigdeliver.c b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
index cfdc32e55..06b43d1df 100644
--- a/nuttx/arch/z80/src/z80/z80_sigdeliver.c
+++ b/nuttx/arch/z80/src/z80/z80_sigdeliver.c
@@ -87,7 +87,7 @@ void up_sigdeliver(void)
sig_deliver_t sigdeliver;
/* Save the errno. This must be preserved throughout the signal handling
- * so that the the user code final gets the correct errno value (probably
+ * so that the user code final gets the correct errno value (probably
* EINTR).
*/
diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c
index 4489ebfcd..84ef3a9a3 100644
--- a/nuttx/binfmt/libnxflat/libnxflat_bind.c
+++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c
@@ -51,9 +51,25 @@
#include <nuttx/symtab.h>
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
+#undef NXFLAT_DUMPBUFFER /* Define to enable very verbose buffer dumping */
+
+/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be
+ * defined or NXFLAT_DUMPBUFFER does nothing.
+ */
+
+#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT)
+# undef NXFLAT_DUMPBUFFER
+#endif
+
+#ifdef NXFLAT_DUMPBUFFER
+# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
+#else
+# define nxflat_dumpbuffer(m,b,n)
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
@@ -72,7 +88,7 @@
* Description:
* Perform the NXFLAT_RELOC_TYPE_REL32I binding:
*
- * Meaning: Object file contains a 32-bit offset into I-Space at the the offset.
+ * Meaning: Object file contains a 32-bit offset into I-Space at the offset.
* Fixup: Add mapped I-Space address to the offset.
*
* Returned Value:
@@ -111,7 +127,7 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo,
* Description:
* Perform the NXFLAT_RELOC_TYPE_REL32D binding:
*
- * Meaning: Object file contains a 32-bit offset into D-Space at the the offset.
+ * Meaning: Object file contains a 32-bit offset into D-Space at the offset.
* Fixup: Add allocated D-Space address to the offset.
*
* Returned Value:
@@ -246,7 +262,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
{
/* NXFLAT_RELOC_TYPE_REL32I Meaning: Object file contains a 32-bit offset
- * into I-Space at the the offset.
+ * into I-Space at the offset.
* Fixup: Add mapped I-Space address to the offset.
*/
@@ -257,7 +273,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
break;
/* NXFLAT_RELOC_TYPE_REL32D Meaning: Object file contains a 32-bit offset
- * into D-Space at the the offset.
+ * into D-Space at the offset.
* Fixup: Add allocated D-Space address to the
* offset.
*/
@@ -301,6 +317,15 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
}
}
+ /* Dump the relocation got */
+
+#ifdef NXFLAT_DUMPBUFFER
+ if (ret == OK && nrelocs > 0)
+ {
+ relocs = (FAR struct nxflat_reloc_s*)(offset - loadinfo->isize + loadinfo->dspace->region);
+ nxflat_dumpbuffer("GOT", (FAR const ubyte*)relocs, nrelocs * sizeof(struct nxflat_reloc_s));
+ }
+#endif
return ret;
}
@@ -396,11 +421,19 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
imports[i].i_funcaddress = (uint32)symbol->sym_value;
- bvdbg("Bound imported function '%s' to address %08x\n",
- symname, imports[i].i_funcaddress);
+ bvdbg("Bound import %d (%08p) to export 's' (%08x)\n",
+ i, &imports[i], symname, imports[i].i_funcaddress);
}
}
+ /* Dump the relocation import table */
+
+#ifdef NXFLAT_DUMPBUFFER
+ if (nimports > 0)
+ {
+ nxflat_dumpbuffer("Imports", (FAR const ubyte*)imports, nimports * sizeof(struct nxflat_import_s));
+ }
+#endif
return OK;
}
diff --git a/nuttx/binfmt/libnxflat/libnxflat_verify.c b/nuttx/binfmt/libnxflat/libnxflat_verify.c
index 96947dbc8..bf5221278 100644
--- a/nuttx/binfmt/libnxflat/libnxflat_verify.c
+++ b/nuttx/binfmt/libnxflat/libnxflat_verify.c
@@ -84,7 +84,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header)
/* Check the FLT header -- magic number and revision.
*
- * If the the magic number does not match. Just return
+ * If the magic number does not match. Just return
* silently. This is not our binary.
*/
diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c
index 6e9d54c84..8b3677df5 100644
--- a/nuttx/binfmt/nxflat.c
+++ b/nuttx/binfmt/nxflat.c
@@ -55,13 +55,32 @@
* Pre-processor Definitions
****************************************************************************/
+#undef NXFLAT_DUMPBUFFER /* Define to enable very verbose buffer dumping */
+
+/* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_BINFMT have to be
+ * defined or NXFLAT_DUMPBUFFER does nothing.
+ */
+
+#if !defined(CONFIG_DEBUG_VERBOSE) || !defined (CONFIG_DEBUG_BINFMT)
+# undef NXFLAT_DUMPBUFFER
+#endif
+
+#ifdef NXFLAT_DUMPBUFFER
+# define nxflat_dumpbuffer(m,b,n) bvdbgdumpbuffer(m,b,n)
+#else
+# define nxflat_dumpbuffer(m,b,n)
+#endif
+
+#ifndef MIN
+# define MIN(a,b) (a < b ? a : b)
+#endif
+
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int nxflat_loadbinary(struct binary_s *binp);
#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT)
-static void nxflat_dumpmemory(void *addr, int nbytes);
static void nxflat_dumploadinfo(struct nxflat_loadinfo_s *loadinfo);
#endif
@@ -80,25 +99,6 @@ static struct binfmt_s g_nxflatbinfmt =
****************************************************************************/
/****************************************************************************
- * Name: nnxflat_dumpmemory
- ****************************************************************************/
-
-#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_BINFMT)
-static void nxflat_dumpmemory(void *addr, int nbytes)
-{
- ubyte *ptr;
-
- bdbg(" ADDRESS VALUE\n");
- for (ptr = (ubyte*)addr; nbytes > 0; ptr += 4, nbytes -= 4)
- {
- bdbg(" %p: %02x %02x %02x %02x\n", ptr, ptr[0], ptr[1], ptr[2], ptr[3]);
- }
-}
-#else
-# define nxflat_dumpmemory(a,n)
-#endif
-
-/****************************************************************************
* Name: nxflat_dumploadinfo
****************************************************************************/
@@ -115,7 +115,7 @@ static void nxflat_dumploadinfo(struct nxflat_loadinfo_s *loadinfo)
bdbg(" DSPACE:\n");
bdbg(" dspace: %08lx\n", loadinfo->dspace);
- if (oadinfo->dspace != NULL)
+ if (loadinfo->dspace != NULL)
{
bdbg(" crefs: %d\n", loadinfo->dspace->crefs);
bdbg(" region: %08lx\n", loadinfo->dspace->region);
@@ -196,8 +196,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
binp->isize = loadinfo.isize;
binp->stacksize = loadinfo.stacksize;
- bvdbg("ENTRY CODE:\n");
- nxflat_dumpmemory(binp->entrypt, 16*sizeof(uint32));
+ nxflat_dumpbuffer("Entry code", (FAR const ubyte*)binp->entrypt, MIN(binp->isize,512));
nxflat_uninit(&loadinfo);
return OK;
}
diff --git a/nuttx/configs/eagle100/httpd/ld.script b/nuttx/configs/eagle100/httpd/ld.script
index 0063eb39f..434cffbde 100644
--- a/nuttx/configs/eagle100/httpd/ld.script
+++ b/nuttx/configs/eagle100/httpd/ld.script
@@ -34,7 +34,7 @@
****************************************************************************/
/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However,
- * if the the Eagle100 Ethernet bootloader is used, then the entry point must
+ * if the Eagle100 Ethernet bootloader is used, then the entry point must
* be at the following offset in FLASH (and the size of the FLASH must be
* reduced to 248Kb):
*/
diff --git a/nuttx/configs/eagle100/nettest/ld.script b/nuttx/configs/eagle100/nettest/ld.script
index 91ac6f57e..b8af71ddd 100644
--- a/nuttx/configs/eagle100/nettest/ld.script
+++ b/nuttx/configs/eagle100/nettest/ld.script
@@ -34,7 +34,7 @@
****************************************************************************/
/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However,
- * if the the Eagle100 Ethernet bootloader is used, then the entry point must
+ * if the Eagle100 Ethernet bootloader is used, then the entry point must
* be at the following offset in FLASH (and the size of the FLASH must be
* reduced to 248Kb):
*/
diff --git a/nuttx/configs/eagle100/nsh/ld.script b/nuttx/configs/eagle100/nsh/ld.script
index 5a8fdc472..e77b6778d 100644
--- a/nuttx/configs/eagle100/nsh/ld.script
+++ b/nuttx/configs/eagle100/nsh/ld.script
@@ -34,7 +34,7 @@
****************************************************************************/
/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However,
- * if the the Eagle100 Ethernet bootloader is used, then the entry point must
+ * if the Eagle100 Ethernet bootloader is used, then the entry point must
* be at the following offset in FLASH (and the size of the FLASH must be
* reduced to 248Kb):
*/
diff --git a/nuttx/configs/eagle100/nxflat/ld.script b/nuttx/configs/eagle100/nxflat/ld.script
index 68969391e..ffd8dec48 100644
--- a/nuttx/configs/eagle100/nxflat/ld.script
+++ b/nuttx/configs/eagle100/nxflat/ld.script
@@ -34,7 +34,7 @@
****************************************************************************/
/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However,
- * if the the Eagle100 Ethernet bootloader is used, then the entry point must
+ * if the Eagle100 Ethernet bootloader is used, then the entry point must
* be at the following offset in FLASH (and the size of the FLASH must be
* reduced to 248Kb):
*/
diff --git a/nuttx/configs/eagle100/ostest/ld.script b/nuttx/configs/eagle100/ostest/ld.script
index 7c1d8f1bf..0d7032fcf 100644
--- a/nuttx/configs/eagle100/ostest/ld.script
+++ b/nuttx/configs/eagle100/ostest/ld.script
@@ -34,7 +34,7 @@
****************************************************************************/
/* The LM3S6918 has 256Kb of FLASH beginning at address 0x0000:0000. However,
- * if the the Eagle100 Ethernet bootloader is used, then the entry point must
+ * if the Eagle100 Ethernet bootloader is used, then the entry point must
* be at the following offset in FLASH (and the size of the FLASH must be
* reduced to 248Kb):
*/
diff --git a/nuttx/configs/xtrs/src/xtr_irq.c b/nuttx/configs/xtrs/src/xtr_irq.c
index 44df0fe4d..91d0cf42a 100644
--- a/nuttx/configs/xtrs/src/xtr_irq.c
+++ b/nuttx/configs/xtrs/src/xtr_irq.c
@@ -78,7 +78,7 @@ void up_irqinitialize(void)
*
* NOTE: Normally, there are seperate enables for "global" interrupts
* and specific device interrupts. In such a "normal" case, the timer
- * interrupt should be attached and enabled in the the function up_timerinit()
+ * interrupt should be attached and enabled in the function up_timerinit()
*/
irq_attach(Z80_IRQ_SYSTIMER, (xcpt_t)up_timerisr);
diff --git a/nuttx/configs/z80sim/src/z80_irq.c b/nuttx/configs/z80sim/src/z80_irq.c
index c2b64a1d5..334ea672c 100644
--- a/nuttx/configs/z80sim/src/z80_irq.c
+++ b/nuttx/configs/z80sim/src/z80_irq.c
@@ -78,7 +78,7 @@ void up_irqinitialize(void)
*
* NOTE: Normally, there are seperate enables for "global" interrupts
* and specific device interrupts. In such a "normal" case, the timer
- * interrupt should be attached and enabled in the the function up_timerinit()
+ * interrupt should be attached and enabled in the function up_timerinit()
*/
irq_attach(Z80_IRQ_SYSTIMER, (xcpt_t)up_timerisr);
diff --git a/nuttx/drivers/mmcsd/mmcsd_debug.c b/nuttx/drivers/mmcsd/mmcsd_debug.c
index 85e2d7d44..2b05f3df6 100644
--- a/nuttx/drivers/mmcsd/mmcsd_debug.c
+++ b/nuttx/drivers/mmcsd/mmcsd_debug.c
@@ -85,68 +85,6 @@
* Name: mmcsd_dmpcsd
*
* Description:
- * Dump the contents a buffer
- *
- ****************************************************************************/
-
-#ifdef CONFIG_MMCSD_DUMPALL
-void mmcsd_dumpbuffer(FAR const ubyte *buffer, unsigned int buflen)
-{
- int i, j, k;
-
- for (i = 0; i < buflen; i += 32)
- {
- message("%04x: ", i);
- for (j = 0; j < 32; j++)
- {
- k = i + j;
-
- if (j == 16)
- {
- message(" ");
- }
-
- if (k < buflen)
- {
- message("%02x", buffer[k]);
- }
- else
- {
- message(" ");
- }
- }
-
- message(" ");
- for (j = 0; j < 32; j++)
- {
- k = i + j;
-
- if (j == 16)
- {
- message(" ");
- }
-
- if (k < buflen)
- {
- if (buffer[k] >= 0x20 && buffer[k] < 0x7f)
- {
- message("%c", buffer[k]);
- }
- else
- {
- message(".");
- }
- }
- }
- message("\n");
- }
-}
-#endif
-
-/****************************************************************************
- * Name: mmcsd_dmpcsd
- *
- * Description:
* Dump the contents of the CSD
*
****************************************************************************/
diff --git a/nuttx/drivers/mmcsd/mmcsd_internal.h b/nuttx/drivers/mmcsd/mmcsd_internal.h
index 1a81b59b5..9d25a372a 100644
--- a/nuttx/drivers/mmcsd/mmcsd_internal.h
+++ b/nuttx/drivers/mmcsd/mmcsd_internal.h
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/mmcsd/mmcsd_internal.h
*
- * Copyright (C) 20082009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
+#include <debug.h>
/****************************************************************************
* Pre-Processor Definitions
@@ -85,9 +86,9 @@ extern "C" {
#endif
#ifdef CONFIG_MMCSD_DUMPALL
-EXTERN void mmcsd_dumpbuffer(FAR const ubyte *buffer, unsigned int buflen);
+# define mmcsd_dumpbuffer(m,b,l) fvdbgdumpbuffer(m,b,l)
#else
-# define mmcsd_dumpbuffer(b,l)
+# define mmcsd_dumpbuffer(m,b,l)
#endif
#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_FS)
diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.c b/nuttx/drivers/mmcsd/mmcsd_spi.c
index cd0870616..412969922 100644
--- a/nuttx/drivers/mmcsd/mmcsd_spi.c
+++ b/nuttx/drivers/mmcsd/mmcsd_spi.c
@@ -347,7 +347,7 @@ static void mmcsd_semtake(sem_t *sem)
* Name: mmcsd_waitready
*
* Description:
- * Wait until the the card is no longer busy
+ * Wait until the card is no longer busy
*
* Assumptions:
* MMC/SD card already selected
@@ -1170,7 +1170,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
mmcsd_semgive(&slot->sem);
fvdbg("Read %d bytes:\n", nbytes);
- mmcsd_dumpbuffer(buffer, nbytes);
+ mmcsd_dumpbuffer("Read buffer", buffer, nbytes);
return nsectors;
errout_with_eio:
@@ -1264,7 +1264,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
offset = start_sector * SECTORSIZE(slot);
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
}
- mmcsd_dumpbuffer(buffer, nbytes);
+ mmcsd_dumpbuffer("Write buffer", buffer, nbytes);
/* Select the slave */
diff --git a/nuttx/drivers/net/cs89x0.c b/nuttx/drivers/net/cs89x0.c
index bfabe6e93..d7ceef233 100644
--- a/nuttx/drivers/net/cs89x0.c
+++ b/nuttx/drivers/net/cs89x0.c
@@ -823,7 +823,7 @@ static int cs89x0_txavail(struct uip_driver_s *dev)
* Initialize the Ethernet driver
*
* Parameters:
- * impl - decribes the the implementation of the cs89x00 implementation.
+ * impl - decribes the implementation of the cs89x00 implementation.
* This reference is retained so so must remain stable throughout the
* life of the driver instance.
* devno - Identifies the device number. This must be a number between
diff --git a/nuttx/drivers/usbdev/usbdev_scsi.c b/nuttx/drivers/usbdev/usbdev_scsi.c
index e17999b20..700bb64fb 100644
--- a/nuttx/drivers/usbdev/usbdev_scsi.c
+++ b/nuttx/drivers/usbdev/usbdev_scsi.c
@@ -1900,7 +1900,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
if (priv->cbwdir == USBSTRG_FLAGS_DIRDEVICE2HOST)
{
- /* The number of bytes in the response cannot exceed the the host
+ /* The number of bytes in the response cannot exceed the host
* 'allocation length' in the command.
*/
diff --git a/nuttx/examples/README.txt b/nuttx/examples/README.txt
index 08c425b14..b31c37490 100644
--- a/nuttx/examples/README.txt
+++ b/nuttx/examples/README.txt
@@ -349,7 +349,7 @@ examples/usbserial
dmesg
- At the end of the dmesg output, you should see the the seria
+ At the end of the dmesg output, you should see the serial
device was successfully idenfied and assigned to a tty device,
probably /dev/ttyUSB0.
diff --git a/nuttx/examples/nsh/README.txt b/nuttx/examples/nsh/README.txt
index 17a541eef..e663071fc 100644
--- a/nuttx/examples/nsh/README.txt
+++ b/nuttx/examples/nsh/README.txt
@@ -551,7 +551,7 @@ o mount -t <fstype> <block-device> <dir-path>
create whatever psuedo directories that may be needed to complete
the full path but the full path must not already exist.
- After the the volume has been mounted in the NuttX psuedo file
+ After the volume has been mounted in the NuttX psuedo file
system, it may be access in the same way as other objects in the
file system.
@@ -898,7 +898,7 @@ NSH-Specific Configuration Settings
receiving TELNET commands/reponses
* CONFIG_EXAMPLES_NSH_DHCPC
- Obtain the the IP address via DHCP.
+ Obtain the IP address via DHCP.
* CONFIG_EXAMPLES_NSH_IPADDR
If CONFIG_EXAMPLES_NSH_DHCPC is NOT set, then the static IP
diff --git a/nuttx/examples/nsh/nsh_netcmds.c b/nuttx/examples/nsh/nsh_netcmds.c
index 3d64e662f..27ab06421 100644
--- a/nuttx/examples/nsh/nsh_netcmds.c
+++ b/nuttx/examples/nsh/nsh_netcmds.c
@@ -719,7 +719,7 @@ int cmd_wget(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
fullpath = nsh_getfullpath(vtbl, localfile);
- /* Open the the local file for writing */
+ /* Open the local file for writing */
fd = open(fullpath, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (fd < 0)
diff --git a/nuttx/examples/nxflat/nxflat_main.c b/nuttx/examples/nxflat/nxflat_main.c
index f8f608488..78146b913 100644
--- a/nuttx/examples/nxflat/nxflat_main.c
+++ b/nuttx/examples/nxflat/nxflat_main.c
@@ -93,7 +93,7 @@
#define ROMFSDEV "/dev/ram0"
#define MOUNTPT "/mnt/romfs"
-/* If CONFIG_DEBUG is enabled, use dbg instead of printf so that the the
+/* If CONFIG_DEBUG is enabled, use dbg instead of printf so that the
* output will be synchronous with the debug output.
*/
diff --git a/nuttx/examples/nxflat/tests/hello++/Makefile b/nuttx/examples/nxflat/tests/hello++/Makefile
index e28281619..113520da5 100644
--- a/nuttx/examples/nxflat/tests/hello++/Makefile
+++ b/nuttx/examples/nxflat/tests/hello++/Makefile
@@ -123,7 +123,7 @@ $(BIN2): $(BIN2).r2
@$(LDNXFLAT) $(LDNXFLATFLAGS) -o $@ $^
# BIN3 and BIN4 require that we include --cxx in the xflat-ld command.
-# This will instruct xflat-ld that we want it to put togethe the correct
+# This will instruct xflat-ld that we want it to put together the correct
# startup files to handle the C++ static initializers.
#
# BIN3 is equivalent to BIN2 except that is uses static initializers
diff --git a/nuttx/examples/pashello/device.c b/nuttx/examples/pashello/device.c
index b4401531a..def8f60ec 100644
--- a/nuttx/examples/pashello/device.c
+++ b/nuttx/examples/pashello/device.c
@@ -85,7 +85,7 @@ static ssize_t hello_read(struct file *filep, char *buffer, size_t len)
if (offset < hello_pex_len)
{
- /* Make sure the the read does not extend beyond the .pex file */
+ /* Make sure the read does not extend beyond the .pex file */
nread = len;
if (nread + offset > hello_pex_len)
diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c
index 7353dee88..b7ce20ec1 100644
--- a/nuttx/fs/fat/fs_fat32util.c
+++ b/nuttx/fs/fat/fs_fat32util.c
@@ -2492,7 +2492,7 @@ int fat_currentsector(struct fat_mountpt_s *fs, struct fat_file_s *ff,
sectoroffset = SEC_NSECTORS(fs, position) & CLUS_NDXMASK(fs);
- /* The current cluster is the the first sector of the cluster plus
+ /* The current cluster is the first sector of the cluster plus
* the sector offset
*/
diff --git a/nuttx/fs/fs_poll.c b/nuttx/fs/fs_poll.c
index dd71bfa48..5e377de94 100644
--- a/nuttx/fs/fs_poll.c
+++ b/nuttx/fs/fs_poll.c
@@ -304,7 +304,7 @@ int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
poll_semtake(&sem);
}
- /* Teardown the the poll operation and get the count of events */
+ /* Teardown the poll operation and get the count of events */
ret = poll_teardown(fds, nfds, &count);
}
diff --git a/nuttx/fs/fs_seekdir.c b/nuttx/fs/fs_seekdir.c
index ab1e7b621..bdbada7b6 100644
--- a/nuttx/fs/fs_seekdir.c
+++ b/nuttx/fs/fs_seekdir.c
@@ -166,7 +166,7 @@ static inline void seekmountptdir(struct internal_dir_s *idir, off_t offset)
pos++;
}
- /* If we get here the the directory position has been successfully set */
+ /* If we get here the directory position has been successfully set */
idir->fd_position = pos;
}
diff --git a/nuttx/graphics/nxfonts/nxfonts_convert.c b/nuttx/graphics/nxfonts/nxfonts_convert.c
index 7e80565f9..217605293 100644
--- a/nuttx/graphics/nxfonts/nxfonts_convert.c
+++ b/nuttx/graphics/nxfonts/nxfonts_convert.c
@@ -50,7 +50,7 @@
* Pre-Processor Definitions
****************************************************************************/
-/* Make sure the the bits-per-pixel value has been set */
+/* Make sure the bits-per-pixel value has been set */
#ifndef NXFONTS_BITSPERPIXEL
# error "NXFONTS_BITSPERPIXEL must be defined on the command line"
diff --git a/nuttx/graphics/nxglib/nxglib_bitblit.h b/nuttx/graphics/nxglib/nxglib_bitblit.h
index 02baba13a..b3deb66dd 100644
--- a/nuttx/graphics/nxglib/nxglib_bitblit.h
+++ b/nuttx/graphics/nxglib/nxglib_bitblit.h
@@ -49,7 +49,7 @@
* Pre-Processor Definitions
****************************************************************************/
-/* Make sure the the bits-per-pixel value has been set by the includer of
+/* Make sure the bits-per-pixel value has been set by the includer of
* this header file.
*/
diff --git a/nuttx/graphics/nxmu/nxfe.h b/nuttx/graphics/nxmu/nxfe.h
index 47a804c49..b808e5bf3 100644
--- a/nuttx/graphics/nxmu/nxfe.h
+++ b/nuttx/graphics/nxmu/nxfe.h
@@ -118,7 +118,7 @@ struct nxfe_conn_s
/* Server state structure ***************************************************/
-/* This the the server 'front-end' state structure */
+/* This the server 'front-end' state structure */
struct nxfe_state_s
{
@@ -443,7 +443,7 @@ extern "C" {
* NOTE: wnd must have been allocated using malloc() (or related allocators)
* Once provided to nxfe_constructwindow() that memory is owned and managed
* by NX. On certain error conditions or when the window is closed, NX will
- * free() the the window.
+ * free() the window.
*
* Input Parameters:
* handle - The handle returned by nx_connect
diff --git a/nuttx/graphics/nxmu/nxmu_constructwindow.c b/nuttx/graphics/nxmu/nxmu_constructwindow.c
index 0923696df..f7e62f711 100644
--- a/nuttx/graphics/nxmu/nxmu_constructwindow.c
+++ b/nuttx/graphics/nxmu/nxmu_constructwindow.c
@@ -85,7 +85,7 @@
* NOTE: wnd must have been allocated using malloc() (or related allocators)
* Once provided to nxfe_constructwindow() that memory is owned and managed
* by NX. On certain error conditions or when the window is closed, NX will
- * free() the the window.
+ * free() the window.
*
* Input Parameters:
* handle - The handle returned by nx_connect
diff --git a/nuttx/graphics/nxsu/nxfe.h b/nuttx/graphics/nxsu/nxfe.h
index a95ae9c60..9cecef7ed 100644
--- a/nuttx/graphics/nxsu/nxfe.h
+++ b/nuttx/graphics/nxsu/nxfe.h
@@ -61,7 +61,7 @@
/* Server state structure ***************************************************/
-/* This the the server 'front-end' state structure. It is really the same
+/* This the server 'front-end' state structure. It is really the same
* as the back-end state, but we wrap the back-end state so that we can add
* things to the structure in the future
*/
@@ -108,7 +108,7 @@ EXTERN const struct nx_callback_s g_bkgdcb;
* NOTE: wnd must have been allocated using malloc() (or related allocators)
* Once provided to nxfe_constructwindow() that memory is owned and managed
* by NX. On certain error conditions or when the window is closed, NX will
- * free() the the window.
+ * free() the window.
*
* Input Parameters:
* handle - The handle returned by nx_connect
diff --git a/nuttx/graphics/nxsu/nxsu_constructwindow.c b/nuttx/graphics/nxsu/nxsu_constructwindow.c
index e41071b26..d7a6df0a6 100644
--- a/nuttx/graphics/nxsu/nxsu_constructwindow.c
+++ b/nuttx/graphics/nxsu/nxsu_constructwindow.c
@@ -85,7 +85,7 @@
* NOTE: wnd must have been allocated using malloc() (or related allocators)
* Once provided to nxfe_constructwindow() that memory is owned and managed
* by NX. On certain error conditions or when the window is closed, NX will
- * free() the the window.
+ * free() the window.
*
* Input Parameters:
* handle - The handle returned by nx_connect
diff --git a/nuttx/include/debug.h b/nuttx/include/debug.h
index 7253d93e4..485bf8a20 100644
--- a/nuttx/include/debug.h
+++ b/nuttx/include/debug.h
@@ -71,21 +71,21 @@
# ifdef CONFIG_ARCH_LOWPUTC
# define lldbg(format, arg...) \
- lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
# else
# define lldbg(x...)
# endif
# ifdef CONFIG_DEBUG_VERBOSE
# define vdbg(format, arg...) \
- lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+ lib_rawprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
-# ifdef CONFIG_ARCH_LOWPUTC
-# define llvdbg(format, arg...) \
- lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
-# else
-# define llvdbg(x...)
-# endif
+# ifdef CONFIG_ARCH_LOWPUTC
+# define llvdbg(format, arg...) \
+ lib_lowprintf(EXTRA_FMT format EXTRA_ARG, ##arg)
+# else
+# define llvdbg(x...)
+# endif
# else
# define vdbg(x...)
@@ -322,6 +322,86 @@
#endif /* CONFIG_CPP_HAVE_VARARGS */
+/* Buffer dumping macros do not depend on varargs */
+
+#ifdef CONFIG_DEBUG
+# define dbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n)
+# ifdef CONFIG_DEBUG_VERBOSE
+# define vdbgdumpbuffer(m,b,n) lib_dumpbuffer(m,b,n)
+# else
+# define vdbgdumpbuffer(m,b,n)
+# endif
+#else
+# define dbgdumpbuffer(m,b,n)
+# define vdbgdumpbuffer(m,b,n)
+# endif
+
+/* Subsystem specific debug */
+
+#ifdef CONFIG_DEBUG_MM
+# define mdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define mvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define mdbgdumpbuffer(m,b,n)
+# define mvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_SCHED
+# define sdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define svdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define sdbgdumpbuffer(m,b,n)
+# define svdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_NET
+# define ndbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define nvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define ndbgdumpbuffer(m,b,n)
+# define nvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_USB
+# define udbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define uvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define udbgdumpbuffer(m,b,n)
+# define uvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_FS
+# define fdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define fvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define fdbgdumpbuffer(m,b,n)
+# define fvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_GRAPHICS
+# define gdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define gvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define gdbgdumpbuffer(m,b,n)
+# define gvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_BINFMT
+# define bdbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define bvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define bdbgdumpbuffer(m,b,n)
+# define bvdbgdumpbuffer(m,b,n)
+#endif
+
+#ifdef CONFIG_DEBUG_LIB
+# define ldbgdumpbuffer(m,b,n) dbgdumpbuffer(m,b,n)
+# define lvdbgdumpbuffer(m,b,n) vdbgdumpbuffer(m,b,n)
+#else
+# define ldbgdumpbuffer(m,b,n)
+# define lvdbgdumpbuffer(m,b,n)
+#endif
+
/****************************************************************************
* Public Type Declarations
****************************************************************************/
@@ -354,6 +434,10 @@ EXTERN int lib_rawprintf(const char *format, ...);
EXTERN int lib_lowprintf(const char *format, ...);
#endif
+/* Dump a buffer of data */
+
+EXTERN int lib_dumpbuffer(FAR const char *msg, FAR const ubyte *buffer, unsigned int buflen);
+
/* If the cross-compiler's pre-processor does not support variable
* length arguments, then these additional APIs will be built.
*/
diff --git a/nuttx/include/nuttx/arch.h b/nuttx/include/nuttx/arch.h
index f3cb5c184..a1182b198 100644
--- a/nuttx/include/nuttx/arch.h
+++ b/nuttx/include/nuttx/arch.h
@@ -229,7 +229,7 @@ EXTERN void up_unblock_task(FAR _TCB *tcb);
*
* Inputs:
* tcb: Refers to a task in the ready-to-run list (normally
- * the task at the the head of the list). It most be
+ * the task at the head of the list). It most be
* stopped, its context saved and moved into one of the
* waiting task lists. It it was the task at the head
* of the ready-to-run list, then a context to the new
@@ -293,7 +293,7 @@ EXTERN void up_reprioritize_rtr(FAR _TCB *tcb, ubyte priority);
* This function causes the currently executing task to cease
* to exist. This is a special case of task_delete() where the task to
* be deleted is the currently executing task. It is more complex because
- * a context switch must be perform to the the next ready to run task.
+ * a context switch must be perform to the next ready to run task.
*
* Unlike other UP APIs, this function may be called directly from user
* programs in various states. The implementation of this function should
diff --git a/nuttx/include/nuttx/can.h b/nuttx/include/nuttx/can.h
index 7a9562b05..370297615 100644
--- a/nuttx/include/nuttx/can.h
+++ b/nuttx/include/nuttx/can.h
@@ -195,7 +195,7 @@ struct can_ops_s
CODE int (*co_send)(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg);
/* Return TRUE if all message have been sent. If for example, the CAN
- * hardware implements FIFOs, then this would mean the the transmit FIFO is
+ * hardware implements FIFOs, then this would mean the transmit FIFO is
* empty. This method is called when the driver needs to make sure that
* all characters are "drained" from the TX hardware before calling co_shutdown().
*/
diff --git a/nuttx/include/nuttx/cs89x0.h b/nuttx/include/nuttx/cs89x0.h
index 6e2f5bc34..fc990d850 100755
--- a/nuttx/include/nuttx/cs89x0.h
+++ b/nuttx/include/nuttx/cs89x0.h
@@ -140,7 +140,7 @@ extern "C" {
* Initialize the Ethernet driver
*
* Parameters:
- * impl - decribes the the implementation of the cs89x00 implementation.
+ * impl - decribes the implementation of the cs89x00 implementation.
* This reference is retained so so must remain stable throughout the
* life of the driver instance.
* devno - Identifies the device number. This must be a number between
diff --git a/nuttx/include/nuttx/serial.h b/nuttx/include/nuttx/serial.h
index ed5c6a1c0..fad9ecd89 100644
--- a/nuttx/include/nuttx/serial.h
+++ b/nuttx/include/nuttx/serial.h
@@ -167,7 +167,7 @@ struct uart_ops_s
CODE boolean (*txready)(FAR struct uart_dev_s *dev);
/* Return TRUE if all characters have been sent. If for example, the UART
- * hardware implements FIFOs, then this would mean the the transmit FIFO is
+ * hardware implements FIFOs, then this would mean the transmit FIFO is
* empty. This method is called when the driver needs to make sure that
* all characters are "drained" from the TX hardware.
*/
diff --git a/nuttx/include/nxflat.h b/nuttx/include/nxflat.h
index 8e551b252..14f071806 100644
--- a/nuttx/include/nxflat.h
+++ b/nuttx/include/nxflat.h
@@ -73,7 +73,7 @@ struct nxflat_hdr_s
/* The following fields provide the memory map for the nxflat binary.
*
- * h_entry - Offset to the the first executable insruction from
+ * h_entry - Offset to the first executable insruction from
* the beginning of the file.
* h_datastart - Offset to the beginning of the data segment from
* the beginning of the file. This field can also
diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile
index 6774868f9..14af7fe33 100644
--- a/nuttx/lib/Makefile
+++ b/nuttx/lib/Makefile
@@ -53,7 +53,7 @@ STRING_SRCS = lib_checkbase.c lib_isbasedigit.c lib_memset.c lib_memcpy.c \
CTYPE_SRCS =
-STDIO_SRCS = lib_printf.c lib_rawprintf.c lib_lowprintf.c lib_dbg.c \
+STDIO_SRCS = lib_printf.c lib_rawprintf.c lib_lowprintf.c \
lib_sprintf.c lib_snprintf.c lib_libsprintf.c lib_vsprintf.c \
lib_vsnprintf.c lib_libvsprintf.c lib_meminstream.c \
lib_memoutstream.c lib_lowinstream.c lib_lowoutstream.c \
@@ -93,8 +93,11 @@ SQ_SRCS = sq_addlast.c sq_addfirst.c sq_addafter.c \
DQ_SRCS = dq_addlast.c dq_addfirst.c dq_addafter.c dq_addbefore.c \
dq_rem.c dq_remlast.c dq_remfirst.c
+DBG_SRCS = lib_dbg.c lib_dumpbuffer.c
+
CSRCS = $(MISC_SRCS) $(STRING_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) \
- $(MATH_SRCS) $(UNISTD_SRCS) $(NET_SRCS) $(LIBGEN_SRCS) $(SQ_SRCS) $(DQ_SRCS)
+ $(MATH_SRCS) $(UNISTD_SRCS) $(NET_SRCS) $(LIBGEN_SRCS) $(SQ_SRCS) \
+ $(DQ_SRCS) $(DBG_SRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
diff --git a/nuttx/mm/mm_shrinkchunk.c b/nuttx/mm/mm_shrinkchunk.c
index 4612c426d..4e81f5b3a 100644
--- a/nuttx/mm/mm_shrinkchunk.c
+++ b/nuttx/mm/mm_shrinkchunk.c
@@ -55,7 +55,7 @@
* Reduce the size of the chunk specified by the node
* structure to the specified size. this internal logic
* is used both from memalign to dispose of any trailing
- * memory in the the aligned allocation and also by realloc
+ * memory in the aligned allocation and also by realloc
* when there is a request to reduce the size of an allocation.
*
* NOTES:
diff --git a/nuttx/net/netdev_register.c b/nuttx/net/netdev_register.c
index 86d8bf83f..b173bf231 100644
--- a/nuttx/net/netdev_register.c
+++ b/nuttx/net/netdev_register.c
@@ -132,7 +132,7 @@ int netdev_register(FAR struct uip_driver_s *dev)
int devnum;
netdev_semtake();
- /* Assign a device name to the the interface */
+ /* Assign a device name to the interface */
devnum = g_next_devnum++;
snprintf( dev->d_ifname, IFNAMSIZ, "eth%d", devnum );
diff --git a/nuttx/net/uip/uip_icmpping.c b/nuttx/net/uip/uip_icmpping.c
index 9a68ca543..00c6a7905 100644
--- a/nuttx/net/uip/uip_icmpping.c
+++ b/nuttx/net/uip/uip_icmpping.c
@@ -171,7 +171,7 @@ static uint16 ping_interrupt(struct uip_driver_s *dev, void *conn,
else
{
/* Check if this is a ICMP ECHO reply. If so, return the sequence
- * number to the the caller. NOTE: We may not even have sent the
+ * number to the caller. NOTE: We may not even have sent the
* requested ECHO request; this could have been the delayed ECHO
* response from a previous ping.
*/
diff --git a/nuttx/net/uip/uip_tcpbacklog.c b/nuttx/net/uip/uip_tcpbacklog.c
index e27c70a51..8e6d1fb90 100644
--- a/nuttx/net/uip/uip_tcpbacklog.c
+++ b/nuttx/net/uip/uip_tcpbacklog.c
@@ -120,7 +120,7 @@ int uip_backlogcreate(FAR struct uip_conn *conn, int nblg)
return -ENOMEM;
}
- /* Then add all of the pre-allocated containers to the the free list */
+ /* Then add all of the pre-allocated containers to the free list */
blc = (FAR struct uip_blcontainer_s*)(((FAR ubyte*)bls) + offset);
for (i = 0; i < nblg; i++)
diff --git a/nuttx/netutils/dhcpc/dhcpc.c b/nuttx/netutils/dhcpc/dhcpc.c
index 96d945aa6..670b2256c 100644
--- a/nuttx/netutils/dhcpc/dhcpc.c
+++ b/nuttx/netutils/dhcpc/dhcpc.c
@@ -512,7 +512,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult)
state = STATE_HAVE_LEASE;
}
- /* NAK means the the server has refused our request. Break out of
+ /* NAK means the server has refused our request. Break out of
* this loop with state == STATE_HAVE_OFFER and send DISCOVER again
*/
diff --git a/nuttx/netutils/telnetd/telnetd.c b/nuttx/netutils/telnetd/telnetd.c
index 61f3dcda6..fb5c2c8e2 100644
--- a/nuttx/netutils/telnetd/telnetd.c
+++ b/nuttx/netutils/telnetd/telnetd.c
@@ -127,42 +127,13 @@ struct telnetd_s
****************************************************************************/
#ifdef CONFIG_NETUTILS_TELNETD_DUMPBUFFER
-static void telnetd_dumpbuffer(const char *msg, const char *buffer, ssize_t nbytes)
+static inline void telnetd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes)
{
-#ifdef CONFIG_DEBUG
- char line[128];
- int ch;
- int i;
- int j;
-
- dbg("%s:\n", msg);
- for (i = 0; i < nbytes; i += 16)
- {
- sprintf(line, "%04x: ", i);
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- sprintf(&line[strlen(line)], "%02x ", buffer[i+j] );
- }
- else
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- ch = buffer[i+j];
- sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
- }
- }
- dbg("%s\n", line);
- }
-#endif
+ /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be
+ * defined or the following does nothing.
+ */
+
+ nvdbgdumpbuffer(msg, (FAR const ubyte*)buffer, nbytes);
}
#else
# define telnetd_dumpbuffer(msg,buffer,nbytes)
diff --git a/nuttx/netutils/tftpc/tftpc_internal.h b/nuttx/netutils/tftpc/tftpc_internal.h
index 9e853efba..214f7306d 100644
--- a/nuttx/netutils/tftpc/tftpc_internal.h
+++ b/nuttx/netutils/tftpc/tftpc_internal.h
@@ -161,7 +161,7 @@ extern ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *
extern ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to);
#ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS
-extern void tftp_dumpbuffer(const char *msg, ubyte *buffer, int nbytes);
+# define tftp_dumpbuffer(msg, buffer, nbytes) nvdbgdumpbuffer(msg, buffer, nbytes)
#else
# define tftp_dumpbuffer(msg, buffer, nbytes)
#endif
diff --git a/nuttx/netutils/tftpc/tftpc_packets.c b/nuttx/netutils/tftpc/tftpc_packets.c
index 73e4bd110..d190c4f1a 100644
--- a/nuttx/netutils/tftpc/tftpc_packets.c
+++ b/nuttx/netutils/tftpc/tftpc_packets.c
@@ -1,7 +1,7 @@
/****************************************************************************
* netuils/tftp/tftpc_packets.c
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -326,52 +326,4 @@ ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to)
}
}
-/****************************************************************************
- * Name: tftp_sendto
- *
- * Description:
- * Dump a buffer of data
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS
-void tftp_dumpbuffer(const char *msg, ubyte *buffer, int nbytes)
-{
-#ifdef CONFIG_DEBUG
- char line[128];
- int ch;
- int i;
- int j;
-
- dbg("%s:\n", msg);
- for (i = 0; i < nbytes; i += 16)
- {
- sprintf(line, "%04x: ", i);
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- sprintf(&line[strlen(line)], "%02x ", buffer[i+j] );
- }
- else
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
-
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- ch = buffer[i+j];
- sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
- }
- }
- dbg("%s\n", line);
- }
-#endif
-}
-#endif
-
#endif /* CONFIG_NET && CONFIG_NET_UDP && CONFIG_NFILE_DESCRIPTORS */
diff --git a/nuttx/netutils/webserver/httpd.c b/nuttx/netutils/webserver/httpd.c
index 900cc3bea..c37958c3d 100644
--- a/nuttx/netutils/webserver/httpd.c
+++ b/nuttx/netutils/webserver/httpd.c
@@ -115,42 +115,16 @@ static const char g_httpheader404[] =
****************************************************************************/
#ifdef CONFIG_NETUTILS_HTTPD_DUMPBUFFER
-static void httpd_dumpbuffer(const char *buffer, ssize_t nbytes)
+static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes)
{
-#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_NET)
- char line[128];
- int ch;
- int i;
- int j;
-
- for (i = 0; i < nbytes; i += 16)
- {
- sprintf(line, "%04x: ", i);
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- sprintf(&line[strlen(line)], "%02x ", buffer[i+j] );
- }
- else
- {
- strcpy(&line[strlen(line)], " ");
- }
- }
- for ( j = 0; j < 16; j++)
- {
- if (i + j < nbytes)
- {
- ch = buffer[i+j];
- sprintf(&line[strlen(line)], "%c", ch >= 0x20 && ch <= 0x7e ? ch : '.');
- }
- }
- nvdbg("%s\n", line);
- }
-#endif
+ /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be
+ * defined or the following does nothing.
+ */
+
+ nvdbgdumpbuffer(msg, (FAR const ubyte*)buffer, nbytes);
}
#else
-# define httpd_dumpbuffer(buffer,nbytes)
+# define httpd_dumpbuffer(msg,buffer,nbytes)
#endif
#ifdef CONFIG_NETUTILS_HTTPD_DUMPPSTATE
@@ -280,7 +254,7 @@ static int httpd_addchunk(struct httpd_state *pstate, const char *buffer, int le
{
/* The buffer is full.. Send what we have and reset to send again */
- httpd_dumpbuffer(pstate->ht_buffer, newlen);
+ httpd_dumpbuffer("Outgoing buffer", pstate->ht_buffer, newlen);
ret = send(pstate->ht_sockfd, pstate->ht_buffer, newlen, 0);
if (ret < 0)
{
@@ -382,7 +356,7 @@ static int httpd_sendfile(struct httpd_state *pstate)
if (ret == OK && pstate->ht_sndlen > 0)
{
- httpd_dumpbuffer(pstate->ht_buffer, pstate->ht_sndlen);
+ httpd_dumpbuffer("Outgoing buffer", pstate->ht_buffer, pstate->ht_sndlen);
if (send(pstate->ht_sockfd, pstate->ht_buffer, pstate->ht_sndlen, 0) < 0)
{
ret = ERROR;
@@ -405,7 +379,7 @@ static inline int httpd_cmd(struct httpd_state *pstate)
ndbg("[%d] recv failed: %d\n", pstate->ht_sockfd, errno);
return ERROR;
}
- httpd_dumpbuffer(pstate->ht_buffer, recvlen);
+ httpd_dumpbuffer("Incoming buffer", pstate->ht_buffer, recvlen);
/* We will handle only GET */
diff --git a/nuttx/sched/mq_timedreceive.c b/nuttx/sched/mq_timedreceive.c
index a6cf00338..fd8f0edd8 100644
--- a/nuttx/sched/mq_timedreceive.c
+++ b/nuttx/sched/mq_timedreceive.c
@@ -114,7 +114,7 @@ static void mq_rcvtimeout(int argc, uint32 pid)
wtcb->pterrno = ETIMEDOUT;
- /* Restart the the task. */
+ /* Restart the task. */
up_unblock_task(wtcb);
}
diff --git a/nuttx/sched/mq_timedsend.c b/nuttx/sched/mq_timedsend.c
index 4cd508d3b..b50cdcef3 100644
--- a/nuttx/sched/mq_timedsend.c
+++ b/nuttx/sched/mq_timedsend.c
@@ -115,7 +115,7 @@ static void mq_sndtimeout(int argc, uint32 pid)
wtcb->pterrno = ETIMEDOUT;
- /* Restart the the task. */
+ /* Restart the task. */
up_unblock_task(wtcb);
}
diff --git a/nuttx/sched/mq_waitirq.c b/nuttx/sched/mq_waitirq.c
index 75ecbb08f..417aa84bf 100644
--- a/nuttx/sched/mq_waitirq.c
+++ b/nuttx/sched/mq_waitirq.c
@@ -113,7 +113,7 @@ void mq_waitirq(FAR _TCB *wtcb)
wtcb->pterrno = EINTR;
- /* Restart the the task. */
+ /* Restart the task. */
up_unblock_task(wtcb);
}
diff --git a/nuttx/sched/pthread_keycreate.c b/nuttx/sched/pthread_keycreate.c
index c11ccafe1..402d0e690 100644
--- a/nuttx/sched/pthread_keycreate.c
+++ b/nuttx/sched/pthread_keycreate.c
@@ -81,7 +81,7 @@
* thread.
*
* Upon key creation, the value NULL will be associated with
- * the the new key in all active threads. Upon thread
+ * the new key in all active threads. Upon thread
* creation, the value NULL will be associated with all
* defined keys in the new thread.
*
diff --git a/nuttx/sched/sem_holder.c b/nuttx/sched/sem_holder.c
index 825f04b02..66ee2592a 100644
--- a/nuttx/sched/sem_holder.c
+++ b/nuttx/sched/sem_holder.c
@@ -114,7 +114,7 @@ static inline FAR struct semholder_s *sem_allocholder(sem_t *sem)
pholder->flink = sem->hlist.flink;
sem->hlist.flink = pholder;
- /* Make sure the the initial count is zero */
+ /* Make sure the initial count is zero */
pholder->counts = 0;
}
diff --git a/nuttx/sched/sem_waitirq.c b/nuttx/sched/sem_waitirq.c
index 3aded997d..e5572acb1 100644
--- a/nuttx/sched/sem_waitirq.c
+++ b/nuttx/sched/sem_waitirq.c
@@ -117,7 +117,7 @@ void sem_waitirq(FAR _TCB *wtcb)
wtcb->pterrno = EINTR;
- /* Restart the the task. */
+ /* Restart the task. */
up_unblock_task(wtcb);
}
diff --git a/nuttx/sched/wd_gettime.c b/nuttx/sched/wd_gettime.c
index 77d71eb5c..40322e00a 100644
--- a/nuttx/sched/wd_gettime.c
+++ b/nuttx/sched/wd_gettime.c
@@ -70,7 +70,7 @@
* Function: wd_gettime
*
* Description:
- * This function returns the time remaining before the the specified watchdog
+ * This function returns the time remaining before the specified watchdog
* expires.
*
* Parameters: