net/icmp and icmpv6: Fix some errors in debug assertions introduced with last changes in this area. Also updates a REAME.txt file

This commit is contained in:
Gregory Nutt 2017-11-22 11:37:25 -06:00
parent 8d6c997551
commit af65eac4f2
3 changed files with 2 additions and 167 deletions

View File

@ -9,11 +9,6 @@ Contents
LCPXpresso LPC1768 Board
Embedded Artist's Base Board
Development Environment
GNU Toolchain Options
NuttX EABI "buildroot" Toolchain
NuttX OABI "buildroot" Toolchain
NXFLAT Toolchain
Code Red IDE
LEDs
LPCXpresso Configuration Options
@ -227,71 +222,6 @@ USB Device
P0.9/I2STX-SDA/MOSI1/MAT2.3 | 5 | PIO0_9-MOSI OLED data in (D1)
----------------------------+-------+-------------- ----------------------------------------
Development Environment
^^^^^^^^^^^^^^^^^^^^^^^
Either Linux or Cygwin on Windows can be used for the development environment.
The source has been built only using the GNU toolchain (see below). Other
toolchains will likely cause problems. Testing was performed using the Cygwin
environment.
GNU Toolchain Options
^^^^^^^^^^^^^^^^^^^^^
The NuttX make system has been modified to support the following different
toolchain options.
1. The Code Red GNU toolchain
2. The CodeSourcery GNU toolchain,
3. The devkitARM GNU toolchain,
4. The NuttX buildroot Toolchain (see below).
All testing has been conducted using the Code Red toolchain and the
make system is setup to default to use the Code Red Linux toolchain. To use
the other toolchain, you simply need add one of the following configuration
options to your .config (or defconfig) file:
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux
CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
CONFIG_ARMV7M_TOOLCHAIN_CODEREDW=n : Code Red toolchain under Windows
CONFIG_ARMV7M_TOOLCHAIN_CODEREDL=y : Code Red toolchain under Linux
You may also have to modify the PATH environment variable if your make cannot
find the tools.
NOTE: the CodeSourcery (for Windows), devkitARM, and Code Red (for Windoes)
are Windows native toolchains. The CodeSourcey (for Linux), Code Red (for Linux)
and NuttX buildroot toolchains are Cygwin and/or Linux native toolchains. There
are several limitations to using a Windows based toolchain in a Cygwin
environment. The three biggest are:
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
performed automatically in the Cygwin makefiles using the 'cygpath' utility
but you might easily find some new path problems. If so, check out 'cygpath -w'
2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
are used in Nuttx (e.g., include/arch). The make system works around these
problems for the Windows tools by copying directories instead of linking them.
But this can also cause some confusion for you: For example, you may edit
a file in a "linked" directory and find that your changes had no effect.
That is because you are building the copy of the file in the "fake" symbolic
directory. If you use a Windows toolchain, you should get in the habit of
making like this:
make clean_context all
An alias in your .bashrc file might make that less painful.
NOTE 1: The CodeSourcery toolchain (2009q1) does not work with default optimization
level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with
-Os.
NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that
the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM
path or will get the wrong version of make.
Code Red IDE
^^^^^^^^^^^^
@ -395,101 +325,6 @@ Code Red IDE
All of the above steps are automated in the bash script flash.sh that can
be found in the configs/lpcxpresso/tools directory.
NuttX EABI "buildroot" Toolchain
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A GNU GCC-based toolchain is assumed. The PATH environment variable should
be modified to point to the correct path to the Cortex-M3 GCC toolchain (if
different from the default in your PATH variable).
If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX
Bitbucket download site (https://bitbucket.org/nuttx/nuttx/downloads/).
This GNU toolchain builds and executes in the Linux or Cygwin environment.
1. You must have already configured Nuttx in <some-dir>/nuttx.
cd tools
./configure.sh lpcxpresso-lpc1768/<sub-dir>
2. Download the latest buildroot package into <some-dir>
3. unpack the buildroot tarball. The resulting directory may
have versioning information on it like buildroot-x.y.z. If so,
rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.
4. cd <some-dir>/buildroot
5. cp configs/cortexm3-eabi-defconfig-4.6.3 .config
6. make oldconfig
7. make
8. Make sure that the PATH variable includes the path to the newly built
binaries.
See the file configs/README.txt in the buildroot source tree. That has more
details PLUS some special instructions that you will need to follow if you
are building a Cortex-M3 toolchain for Cygwin under Windows.
NOTE: Unfortunately, the 4.6.3 EABI toolchain is not compatible with the
the NXFLAT tools. See the top-level TODO file (under "Binary loaders") for
more information about this problem. If you plan to use NXFLAT, please do not
use the GCC 4.6.3 EABI toochain; instead use the GCC 4.3.3 OABI toolchain.
See instructions below.
NuttX OABI "buildroot" Toolchain
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The older, OABI buildroot toolchain is also available. To use the OABI
toolchain:
1. When building the buildroot toolchain, either (1) modify the cortexm3-eabi-defconfig-4.6.3
configuration to use EABI (using 'make menuconfig'), or (2) use an exising OABI
configuration such as cortexm3-defconfig-4.3.3
2. Modify the Make.defs file to use the OABI conventions:
+CROSSDEV = arm-nuttx-elf-
+ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
-CROSSDEV = arm-nuttx-eabi-
-ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
-NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
NXFLAT Toolchain
^^^^^^^^^^^^^^^^
If you are *not* using the NuttX buildroot toolchain and you want to use
the NXFLAT tools, then you will still have to build a portion of the buildroot
tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can
be downloaded from the NuttX Bitbucket download site
(https://bitbucket.org/nuttx/nuttx/downloads/).
This GNU toolchain builds and executes in the Linux or Cygwin environment.
1. You must have already configured Nuttx in <some-dir>/nuttx.
cd tools
./configure.sh lpcxpresso-lpc1768/<sub-dir>
2. Download the latest buildroot package into <some-dir>
3. unpack the buildroot tarball. The resulting directory may
have versioning information on it like buildroot-x.y.z. If so,
rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.
4. cd <some-dir>/buildroot
5. cp configs/cortexm3-defconfig-nxflat .config
6. make oldconfig
7. make
8. Make sure that the PATH variable includes the path to the newly built
NXFLAT binaries.
LEDs
^^^^

View File

@ -99,7 +99,7 @@ static uint16_t icmp_poll_eventhandler(FAR struct net_driver_s *dev,
ninfo("flags: %04x\n", flags);
DEBUGASSERT(info == NULL || (info->fds != NULL && conn != NULL));
DEBUGASSERT(info == NULL || info->fds != NULL);
/* 'priv' might be null in some race conditions (?). Only process the
* the event if this poll is from the same device that the request was

View File

@ -99,7 +99,7 @@ static uint16_t icmpv6_poll_eventhandler(FAR struct net_driver_s *dev,
ninfo("flags: %04x\n", flags);
DEBUGASSERT(info == NULL || (info->fds != NULL && conn != NULL));
DEBUGASSERT(info == NULL || info->fds != NULL);
/* 'priv' might be null in some race conditions (?). Only process the
* the event if this poll is from the same device that the request was