22cd0d47fa
This makes the user interface a little hostile. People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header). A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length. Instead, we define the packet buffer size then derive the MTU. The MTU is not common currency in networking. On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP). Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes. So we should be all good and without the recurring 14 byte error in MTU's and MSS's. Squashed commit of the following: Trivial update to fix some spacing issues. net/: Rename several macros containing _MTU to _PKTSIZE. net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes). net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU. These are not the MTU which does not include the size of the link layer header. These are the full size of the packet buffer memory (minus any GUARD bytes). net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE. This is not the MTU which does not include the size of the link layer header. This is the full size of the packet buffer memory (minus any GUARD bytes). net/: Rename the file d_mtu in the network driver structure to d_pktsize. That value saved there is not the MTU. The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header. The MTU does not include the link layer header. |
||
---|---|---|
.. | ||
hello | ||
include | ||
nsh | ||
scripts | ||
src | ||
Kconfig | ||
README.txt |
Misoc README ============ This README applies to a port to NuttX running on a Qemu LM32 system. You can find the Qemu setup at https://bitbucket.org/key2/qemu This initial release supports two UARTs, but does not have a system timer or other peripherals. More to come. Buildroot Toolchain =================== A GNU GCC-based toolchain is assumed. The PATH environment variable should be modified to point to the correct path to the LM32 GCC toolchain (if different from the default in your PATH variable). If you have no LM32 toolchain, one can be cloned from the NuttX Bitbucket GIT repository (https://bitbucket.org/nuttx/buildroot). This GNU toolchain builds and executes in the Linux or Cygwin environment. 1. You must have already configured Nuttx in <some-dir>/nuttx. tools/configure.sh misoc/<sub-dir> make oldconfig context 2. Clone the latest buildroot package into <some-dir>/buildroot git clone git@bitbucket.org:nuttx/buildroot.git <some-dir>/buildroot or git clone https://patacongo@bitbucket.org/nuttx/buildroot.git <some-dir>/buildroot 3. cd <some-dir>/buildroot 4. cp lm32-elf-defconfig-6.1.0 .config 5. make oldconfig 6. make 7. By default, the tools will be at the absolute path: <some-dir>/buildroot/build_lm32/staging_dir/bin Or the NuttX relative path: ../buildroot/build_lm32/staging_dir/bin Make sure that he PATH variable includes the path to the newly built binaries. See the file configs/README.txt in the buildroot source tree. That has more detailed PLUS some special instructions that you will need to follow if you are building a LM32 toolchain for Cygwin under Windows. Also included in that README file is a FAQ of frequent build issues that their work-arounds. In order to use the buildroot toolchain, you also must set the following in your .config file: CONFIG_LM3S_TOOLCHAIN_BUILDROOT=y configs/misoc/include/generated =============================== In order to build this configuration, you must provide the configs/misoc/include/generated directory. It contains the generated Misoc files and may be a symbolic link. The base configurtion will NOT build without this directory! There is a sample generated directory at configs/misoc/include/generated-sample. If you want to do a test build without generating the architecture, then you can simply link this sample directory like: $ ln -s configs/misoc/include/generated-sample configs/misoc/include/generated That should permit a test build.