samples: net: Update compilation instructions for cmake

Update network sample documentation for cmake.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2017-11-10 12:25:45 +02:00 committed by Anas Nashif
parent 94c6e47667
commit dea2868a82
16 changed files with 112 additions and 109 deletions

View file

@ -27,11 +27,7 @@ be obtained by using a tool like tcpdump or wireshark.
See the `net-tools`_ project for more details.
It can be built and executed on QEMU as follows:
.. code-block:: console
make run
It can be built and executed on QEMU as described in :ref:`networking_with_qemu`.
Sample output
=============

View file

@ -38,12 +38,7 @@ or wireshark.
See the `net-tools`_ project for more details
It can be built and executed on QEMU as follows:
.. code-block:: console
make run
It can be built and executed on QEMU as described in :ref:`networking_with_qemu`.
Use this command on the host to run the`libcoap`_ implementation of
the ETSI test cases:
@ -53,12 +48,7 @@ the ETSI test cases:
sudo ./examples/etsi_coaptest.sh -i tap0 2001:db8::1
To build the version supporting the TI CC2520 radio, use the supplied
configuration file enabling IEEE 802.15.4:
.. code-block:: console
make CONF_FILE=prj_cc2520.conf run
prj_cc2520.conf configuration file enabling IEEE 802.15.4.
.. _`net-tools`: https://github.com/zephyrproject-rtos/net-tools

View file

@ -49,10 +49,11 @@ using this conf file:
Run Zephyr samples/net/dhcpv4_client application in QEMU:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/dhcpv4_client
$ make pristine && make run
.. zephyr-app-commands::
:zephyr-app: samples/net/dhcpv4_client
:board: qemu_x86
:goals: run
:compact:
Once DHCPv4 client address negotiation completed with server, details
are shown like this:
@ -117,11 +118,11 @@ using this conf file:
Build Zephyr samples/net/dhcpv4_client application:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/dhcpv4_client
$ make pristine && make BOARD=frdm_k64f
$ cp outdir/frdm_k64f/zephyr.bin /media/rveerama/MBED/
.. zephyr-app-commands::
:zephyr-app: samples/net/dhcpv4_client
:board: frdm_k64f
:goals: build flash
:compact:
Once DHCPv4 client address negotiation completed with server, details
are shown like this:

View file

@ -122,18 +122,11 @@ FRDM K64F
Open a terminal window and type:
.. code-block:: console
$ make BOARD=frdm_k64f
The FRDM K64F board is detected as a USB storage device. The board
must be mounted (i.e. to /mnt) to 'flash' the binary:
.. code-block:: console
$ cp outdir/frdm_k64f/zephyr.bin /mnt
.. zephyr-app-commands::
:zephyr-app: samples/net/dns_resolve
:board: frdm_k64f
:goals: build flash
:compact:
See :ref:`Freedom-K64F board documentation <frdm_k64f>` for more information
about this board.
@ -154,10 +147,11 @@ Arduino 101
Open a terminal window and type:
.. code-block:: console
$ make BOARD=arduino_101
.. zephyr-app-commands::
:zephyr-app: samples/net/dns_resolve
:board: arduino_101
:goals: build
:compact:
To load the binary in the development board follow the steps
in :ref:`arduino_101`.

View file

@ -61,13 +61,14 @@ echo-client directory:
Build echo-client sample application like this:
.. code-block:: console
.. zephyr-app-commands::
:zephyr-app: samples/net/echo_client
:board: <board to use>
:conf: <config file to use>
:goals: build
:compact:
$ cd $ZEPHYR_BASE/samples/net/echo_client
$ make pristine && make CONF_FILE=<your desired conf file> \
BOARD=<board to use>
Make can select the default configuration file based on the BOARD you've
Cmake can select the default configuration file based on the BOARD you've
specified automatically so you might not always need to mention it.
Running echo-server in Linux Host
@ -86,7 +87,8 @@ In a terminal window:
Run echo-client application in QEMU:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/echo_client
$ make pristine && make run
.. zephyr-app-commands::
:zephyr-app: samples/net/echo_client
:board: qemu_x86
:goals: run
:compact:

View file

@ -62,11 +62,12 @@ echo-server directory:
Build echo-server sample application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/echo_server
$ make pristine && make CONF_FILE=<your desired conf file> \
BOARD=<board to use>
.. zephyr-app-commands::
:zephyr-app: samples/net/echo_server
:board: <board to use>
:conf: <config file to use>
:goals: build
:compact:
Make can select the default configuration file based on the BOARD you've
specified automatically so you might not always need to mention it.
@ -81,10 +82,11 @@ To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
Run echo-server application in QEMU:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/echo_server
$ make pristine && make run
.. zephyr-app-commands::
:zephyr-app: samples/net/echo_server
:board: qemu_x86
:goals: run
:compact:
In a terminal window:

View file

@ -60,9 +60,12 @@ code with a 404 Not Found HTML body.
To build this sample on your Linux host computer, open a terminal window,
locate the source code of this sample application and type:
.. code-block:: console
.. zephyr-app-commands::
:zephyr-app: samples/net/http_server
:board: qemu_x86
:goals: run
:compact:
make run
Sample Output
=============
@ -175,9 +178,13 @@ The sample code also includes a HTTPS (HTTP over TLS) server example
running side by side with the HTTP server, this server runs on QEMU.
In order to compile and run the code execute:
.. code-block:: console
.. zephyr-app-commands::
:zephyr-app: samples/net/http_server
:board: qemu_x86
:conf: prj_tls.conf
:goals: run
:compact:
make CONF_FILE=prj_tls.conf run
Known Issues and Limitations
============================

View file

@ -39,11 +39,12 @@ samples/net/lwm2m_client directory:
Build the lwm2m-client sample application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/lwm2m_client
$ make pristine && make CONF_FILE=<your desired conf file> \
BOARD=<board to use>
.. zephyr-app-commands::
:zephyr-app: samples/net/lwm2m_client
:board: <board to use>
:conf: <config file to use>
:goals: build
:compact:
The easiest way to setup this sample application is to build and run it
via QEMU using the default configuration :file:`prj.conf`.
@ -61,10 +62,11 @@ can watch and manage connected LwM2M devices.
Build the lwm2m-client sample application for QEMU like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/lwm2m_client
$ make pristine && make run
.. zephyr-app-commands::
:zephyr-app: samples/net/lwm2m_client
:board: qemu_x86
:goals: run
:compact:
The sample will start and automatically connect to the Leshan Demo Server with
both an IPv4 client endpoint (qemu_x86-ipv4-########) and an IPV6 client

View file

@ -22,7 +22,9 @@ a) Change the server, netmask and client addresses according to your network
b) From a terminal window, type:
make pristine && make BOARD=galileo
$ cd $ZEPHYR_BASE/samples/net/mbedtls_sslclient
$ mkdir qemu_build && cd qemu_build
$ cmake -DBOARD=<board to use> -DCONF_FILE=<your desired conf file> ..
c) Copy the binary (outdir/zephyr.strip) to the Galileo's boot
device. Insert the boot device.

View file

@ -96,9 +96,11 @@ following macros to specify those values:
On your Linux host computer, open a terminal window, locate the source code
of this sample application (i.e. :file:`samples/net/mqtt_publisher`) and type:
.. code-block:: console
$ make BOARD=frdm_k64f
.. zephyr-app-commands::
:zephyr-app: samples/net/mqtt_publisher
:board: frdm_k64f
:goals: build flash
:compact:
Open another terminal window and type:

View file

@ -66,8 +66,11 @@ Running RPL node
To build and run RPL node, follow the below steps to build and install
it on IEEE 802.15.4 radio supported board.
.. code-block:: console
$ make pristine and make flash
.. zephyr-app-commands::
:zephyr-app: samples/net/rpl-node
:board: <board to use>
:conf: <config file to use>
:goals: build flash
:compact:
Wait until the RPL node joins with Border-Router and updates the list in the web UI.

View file

@ -31,11 +31,11 @@ Building and Running
Build the Zephyr version of the sockets/echo application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/sockets/dumb_http_server
$ make pristine
$ make BOARD=<board_to_use>
.. zephyr-app-commands::
:zephyr-app: samples/net/sockets/dump_http_server
:board: <board_to_use>
:goals: build
:compact:
``board_to_use`` defaults to ``qemu_x86``. In this case, you can run the
application in QEMU using ``make run``. If you used another BOARD, you

View file

@ -25,11 +25,11 @@ Building and Running
Build the Zephyr version of the sockets/echo application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/sockets/echo
$ make pristine
$ make BOARD=<board_to_use>
.. zephyr-app-commands::
:zephyr-app: samples/net/sockets/echo
:board: <board_to_use>
:goals: build
:compact:
``board_to_use`` defaults to ``qemu_x86``. In this case, you can run the
application in QEMU using ``make run``. If you used another BOARD, you

View file

@ -27,11 +27,11 @@ Building and Running
Build the Zephyr version of the sockets/echo_async application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/sockets/echo_async
$ make pristine
$ make BOARD=<board_to_use>
.. zephyr-app-commands::
:zephyr-app: samples/net/sockets/echo_async
:board: <board_to_use>
:goals: build
:compact:
``board_to_use`` defaults to ``qemu_x86``. In this case, you can run the
application in QEMU using ``make run``. If you used another BOARD, you

View file

@ -28,11 +28,11 @@ Building and Running
Build the Zephyr version of the application like this:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/sockets/http_get
$ make pristine
$ make BOARD=<board_to_use>
.. zephyr-app-commands::
:zephyr-app: samples/net/sockets/http_get
:board: <board_to_use>
:goals: build
:compact:
``board_to_use`` defaults to ``qemu_x86``. In this case, you can run the
application in QEMU using ``make run``. If you used another BOARD, you

View file

@ -31,10 +31,11 @@ To use QEMU for testing, follow the :ref:`networking_with_qemu` guide.
Run Zephyr samples/net/telnet application in QEMU:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/telnet
$ make pristine && make run
.. zephyr-app-commands::
:zephyr-app: samples/net/telnet
:board: qemu_x86
:goals: run
:compact:
Once started, you should see you IP address details for example:
@ -76,10 +77,11 @@ DHCP server on a local network is not in the scope of this README.
Build Zephyr samples/net/telnet application:
.. code-block:: console
$ cd $ZEPHYR_BASE/samples/net/dhcpv4_client
$ make pristine && make BOARD=frdm_k64f
.. zephyr-app-commands::
:zephyr-app: samples/net/telnet
:board: frdm_k64f
:goals: build
:compact:
Flash the resulting Zephyr binary following the :ref:`Freedom-K64F <frdm_k64f>`
board documentation noted above.