From c0b98435519199874716495c3654fffff8f6fab9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 19 Nov 2008 00:23:38 +0000 Subject: Add host side helper for poll test git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1284 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/examples/README.txt | 67 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) (limited to 'nuttx/examples/README.txt') diff --git a/nuttx/examples/README.txt b/nuttx/examples/README.txt index be94471c8..58de1ff8a 100644 --- a/nuttx/examples/README.txt +++ b/nuttx/examples/README.txt @@ -100,7 +100,42 @@ examples/poll A test of the poll() and select() APIs using FIFOs and, if available, stdin, and a TCP/IP socket. This example also includes a nice select - based TCP/IP server example. + based TCP/IP server example. In order to build this test, you must the + following selected in your NuttX configuration file: + + CONFIG_NFILE_DESCRIPTORS - Defined to be greater than 0 + CONFIG_DISABLE_POLL - NOT defined + + In order to use the TCP/IP select test, you have also the following + additional things selected in your NuttX configuration file: + + CONFIG_NET - Defined for general network support + CONFIG_NET_TCP - Defined for TCP/IP support + CONFIG_NSOCKET_DESCRIPTORS - Defined to be greater than 0 + CONFIG_NET_NTCP_READAHEAD_BUFFERS - Defined to be greater than zero + + In additional to the target device-side example, there is also + a host-side application in this directory. It can be compiled under + Linux or Cygwin as follows: + + cd examples/usbserial + make -f Makefile.host TOPDIR=../../. TARGETIP= + + Where is the IP address of your target board. + + This will generate a small program called 'host'. Usage: + + 1. Build the examples/poll target program with TCP/IP poll support + and start the target. + + 3. Then start the host application: + + ./host + + The host and target will exchange are variety of small messages. Each + message sent from the host should cause the select to return in target. + The target example should read the small message and send it back to + the host. The host should then receive the echo'ed message. examples/romfs ^^^^^^^^^^^^^^ @@ -157,6 +192,36 @@ examples/usbserial CONFIG_EXAMPLES_USBSERIAL_ONLYBIG Send only large, multi-packet messages. Default: Send large and small. + In additional to the target device-side example, there is also + a host-side application in this directory. It can be compiled under + Linux or Cygwin as follows: + + cd examples/usbserial + make -f Makefile.host TOPDIR=../../. + + This will generate a small program called 'host'. Usage: + + 1. Build the examples/usbserial target program and start the target. + + 2. Wait a bit, then do enter: + + dmesg + + At the end of the dmesg output, you should see the the seria + device was successfully idenfied and assigned to a tty device, + probably /dev/ttyUSB0. + + 3. Then start the host application: + + ./host [] + + Where: + + is the USB TTY device to use. The default is /dev/ttyUSB0. + + The host and target will exchange are variety of very small and very large + serial messages. + examples/usbstorage ^^^^^^^^^^^^^^^^^^ -- cgit v1.2.3