From f166caf9f05b96205f4b9c3166e4ab2dbacc74f6 Mon Sep 17 00:00:00 2001 From: patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> Date: Wed, 13 Apr 2011 22:47:04 +0000 Subject: [PATCH] Fix error in strrch() git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3501 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 5 +++++ Documentation/NuttX.html | 22 +++++++++++++++++++++- README.txt | 33 +++++++++++++++++++++++++++++++++ lib/string/lib_strrchr.c | 2 +- 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4222df076..954517e043 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1687,5 +1687,10 @@ * arch/arm/src/lpc17xx: Correct some typos/bugs in configuration of LPC17xx UART2 and UART3. + * nuttx/clock.h: Replace all references to the global variable g_system_timer + with clock_systemtimer() (currently just a macro that that returns g_system_timer). + * lin/string/strrch.c: Would fail if the searched-for character were the first + character in the string. + diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 141b279295..47fd194b75 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: April 10, 2011</p> + <p>Last Updated: April 13, 2011</p> </td> </tr> </table> @@ -2204,6 +2204,26 @@ nuttx-6.2 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * Makefile: Fix an error introduced in the top-level Makefile in NuttX-6.1. This error only shows up if you have a /tftpboot directory. Then the make will fail with an obscure error about not being able to stat pass2. + * configs/lpcxpresso-lpc1768/nsh: Add an NSH configuration for the + LPCXpresso board. + * configs/*/ld.script: Removed 'sh_link not set for section .ARM.edix' for + a few of the builds. In you have this warning, it can be removed with the + following change to the ld.script file: + + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + - __exidx_start = ABSOLUTE(.); + *(.ARM.exidx*) + - __exidx_end = ABSOLUTE(.); + } >sram + + __exidx_end = ABSOLUTE(.); + + * arch/arm/src/lpc17xx: Correct some typos/bugs in configuration of LPC17xx + UART2 and UART3. + * nuttx/clock.h: Replace all references to the global variable g_system_timer + with clock_systemtimer() (currently just a macro that that returns g_system_timer). + * lin/string/strrch.c: Would fail if the searched-for character were the first + character in the string. apps-6.1 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/README.txt b/README.txt index 7b149a06f0..41d18f5de9 100755 --- a/README.txt +++ b/README.txt @@ -51,6 +51,39 @@ Download and Unpack: match the various instructions in the documentation and some scripts in the source tree. +Semi-Optional apps/ package. + + All NuttX libraries and example code used to be in included within + the NuttX source tree. As of NuttX-6.0, this application code was + moved into a separate tarball, the apps tarball. If you are just + beginning with NuttX, then you will want to download the versioned + apps tarball along with the NuttX tarball. If you already have your + own product application directory, then you may not need the apps + tarball. + + It is call "Semi-optional" because if you don't have some apps/ + directory, NuttX will *fail* to build! + + Download the unpack the apps tarball in the same directly where you + unpacked the NuttX tarball. After you unpack the apps tarball, you + will have a new directory called apps-versioin (where the version + should exactly match the version of the NuttX tarball). Again, you + might want to rename the directory to simply apps/ to match what + you read in the documentation + + After unpacking the apps tarball, you will have two directories side + by side like this: + + | + +----+----+ + | | + nuttx/ apps/ + + This is important because the NuttX build will expect to find the + apps directory in that (default) location. )That default location + can be changed by editting your NuttX configuration file, but that + is another story). + Installation Directories with Spaces in the Path The nuttx build directory should reside in a path that contains no diff --git a/lib/string/lib_strrchr.c b/lib/string/lib_strrchr.c index c80542341a..e89b26d523 100644 --- a/lib/string/lib_strrchr.c +++ b/lib/string/lib_strrchr.c @@ -54,7 +54,7 @@ char *strrchr(const char *s, int c) if (s) { const char *p = &s[strlen(s) - 1]; - for (; p > s; p--) + for (; p >= s; p--) { if (*p == c) { -- GitLab