From 60136f00cb8b040458ceed6ed2d542287da95fbc Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Wed, 28 Aug 2019 15:46:09 -0700 Subject: [PATCH] doc: add how to exit from QEMU in samples While trying out the hello_world sample built for QEMU, I was expecting the sample app to exit and I'd return to a command prompt. Nope. You need to exit QEMU manually, so add that step to the sample instructions. Looking around, there are more uses of QEMU like this that could use this added step after running the sample app. Signed-off-by: David B. Kinder --- boards/arm/qemu_cortex_m3/doc/index.rst | 2 ++ boards/nios2/qemu_nios2/doc/index.rst | 2 ++ boards/riscv/qemu_riscv32/doc/index.rst | 2 ++ boards/riscv/qemu_riscv64/doc/index.rst | 2 ++ boards/x86/qemu_x86/doc/index.rst | 2 ++ boards/xtensa/qemu_xtensa/doc/index.rst | 2 ++ doc/guides/networking/qemu_eth_setup.rst | 2 ++ doc/guides/networking/qemu_setup.rst | 1 + samples/hello_world/README.rst | 2 ++ samples/net/sockets/big_http_download/README.rst | 4 +++- samples/net/sockets/echo_client/README.rst | 1 + samples/net/sockets/http_get/README.rst | 1 + samples/philosophers/README.rst | 2 +- samples/portability/cmsis_rtos_v1/philosophers/README.rst | 2 ++ .../cmsis_rtos_v1/timer_synchronization/README.rst | 1 + samples/portability/cmsis_rtos_v2/philosophers/README.rst | 2 ++ .../cmsis_rtos_v2/timer_synchronization/README.rst | 2 ++ samples/subsys/console/getchar/README.rst | 1 + samples/subsys/console/getline/README.rst | 1 + samples/subsys/logging/logger/README.rst | 2 ++ samples/synchronization/README.rst | 2 ++ samples/userspace/shared_mem/README.rst | 2 ++ 22 files changed, 38 insertions(+), 2 deletions(-) diff --git a/boards/arm/qemu_cortex_m3/doc/index.rst b/boards/arm/qemu_cortex_m3/doc/index.rst index 6fcdfef0705..48fc54bf3f4 100644 --- a/boards/arm/qemu_cortex_m3/doc/index.rst +++ b/boards/arm/qemu_cortex_m3/doc/index.rst @@ -102,6 +102,8 @@ QEMU, and display the following console output: threadA: Hello World from arm! threadB: Hello World from arm! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/boards/nios2/qemu_nios2/doc/index.rst b/boards/nios2/qemu_nios2/doc/index.rst index 1b3c30aa7e1..7f7379415b8 100644 --- a/boards/nios2/qemu_nios2/doc/index.rst +++ b/boards/nios2/qemu_nios2/doc/index.rst @@ -107,6 +107,8 @@ QEMU, and display the following console output: threadA: Hello World from arm! threadB: Hello World from arm! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/boards/riscv/qemu_riscv32/doc/index.rst b/boards/riscv/qemu_riscv32/doc/index.rst index 65fea62053f..cc48b536f69 100644 --- a/boards/riscv/qemu_riscv32/doc/index.rst +++ b/boards/riscv/qemu_riscv32/doc/index.rst @@ -52,6 +52,8 @@ QEMU, and display the following console output: threadA: Hello World from riscv32! threadB: Hello World from riscv32! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/boards/riscv/qemu_riscv64/doc/index.rst b/boards/riscv/qemu_riscv64/doc/index.rst index 3130597b049..b3580caf385 100644 --- a/boards/riscv/qemu_riscv64/doc/index.rst +++ b/boards/riscv/qemu_riscv64/doc/index.rst @@ -62,6 +62,8 @@ QEMU, and display the following console output: threadA: Hello World from riscv64! threadB: Hello World from riscv64! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/boards/x86/qemu_x86/doc/index.rst b/boards/x86/qemu_x86/doc/index.rst index fcd9afa4125..f85efa8b630 100644 --- a/boards/x86/qemu_x86/doc/index.rst +++ b/boards/x86/qemu_x86/doc/index.rst @@ -111,6 +111,8 @@ QEMU, and display the following console output: threadA: Hello World from x86! threadB: Hello World from x86! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/boards/xtensa/qemu_xtensa/doc/index.rst b/boards/xtensa/qemu_xtensa/doc/index.rst index 0e0ee71d91a..4dccc6c6a9c 100644 --- a/boards/xtensa/qemu_xtensa/doc/index.rst +++ b/boards/xtensa/qemu_xtensa/doc/index.rst @@ -45,6 +45,8 @@ QEMU, and display the following console output: threadA: Hello World from xtensa! threadB: Hello World from xtensa! +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Debugging ========= diff --git a/doc/guides/networking/qemu_eth_setup.rst b/doc/guides/networking/qemu_eth_setup.rst index 9bf2992fe52..f558bae7f4a 100644 --- a/doc/guides/networking/qemu_eth_setup.rst +++ b/doc/guides/networking/qemu_eth_setup.rst @@ -81,3 +81,5 @@ In terminal #2, type: :gen-args: -DOVERLAY_CONFIG=overlay-e1000.conf :goals: run :compact: + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/doc/guides/networking/qemu_setup.rst b/doc/guides/networking/qemu_setup.rst index cf7c34efb90..b0eaafe545f 100644 --- a/doc/guides/networking/qemu_setup.rst +++ b/doc/guides/networking/qemu_setup.rst @@ -138,6 +138,7 @@ laptop to normal Wi-Fi use. To stop the daemons, press Ctrl+C in the corresponding terminal windows (you need to stop both ``loop-slip-tap.sh`` and ``loop-socat.sh``). +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. .. _networking_internet: diff --git a/samples/hello_world/README.rst b/samples/hello_world/README.rst index 0a6e124d3ec..70a819f9497 100644 --- a/samples/hello_world/README.rst +++ b/samples/hello_world/README.rst @@ -30,3 +30,5 @@ Sample Output .. code-block:: console Hello World! x86 + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/net/sockets/big_http_download/README.rst b/samples/net/sockets/big_http_download/README.rst index cefa34da6aa..3661235484b 100644 --- a/samples/net/sockets/big_http_download/README.rst +++ b/samples/net/sockets/big_http_download/README.rst @@ -37,7 +37,9 @@ Build the Zephyr version of the application like this: :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 +application in QEMU using ``make run``. +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. +If you used another BOARD, you will need to consult its documentation for application deployment instructions. You can read about Zephyr support for specific boards in the documentation at :ref:`boards`. diff --git a/samples/net/sockets/echo_client/README.rst b/samples/net/sockets/echo_client/README.rst index 6cbc0892a4f..095eafb2dda 100644 --- a/samples/net/sockets/echo_client/README.rst +++ b/samples/net/sockets/echo_client/README.rst @@ -154,6 +154,7 @@ Run echo-client application in QEMU: Note that echo-server must be running in the Linux host terminal window before you start the echo-client application in QEMU. +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. You can verify TLS communication with a Linux host as well. See https://github.com/zephyrproject-rtos/net-tools documentation for information diff --git a/samples/net/sockets/http_get/README.rst b/samples/net/sockets/http_get/README.rst index 7c82d0f83a1..000f2e21bcd 100644 --- a/samples/net/sockets/http_get/README.rst +++ b/samples/net/sockets/http_get/README.rst @@ -44,6 +44,7 @@ After the sample starts, it issues HTTP GET request to "google.com:80" and dumps the response. You can edit the source code to issue a request to any other site on the Internet (or on the local network, in which case no NAT/routing setup is needed). +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. Enabling TLS support ================================= diff --git a/samples/philosophers/README.rst b/samples/philosophers/README.rst index 06ac7968862..175947ca624 100644 --- a/samples/philosophers/README.rst +++ b/samples/philosophers/README.rst @@ -62,4 +62,4 @@ Sample Output Philosopher 4 [C:-1] THINKING [ 2200 ms ] Philosopher 5 [C:-2] THINKING [ 1700 ms ] - +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/portability/cmsis_rtos_v1/philosophers/README.rst b/samples/portability/cmsis_rtos_v1/philosophers/README.rst index 896e35e3522..729698d7831 100644 --- a/samples/portability/cmsis_rtos_v1/philosophers/README.rst +++ b/samples/portability/cmsis_rtos_v1/philosophers/README.rst @@ -54,3 +54,5 @@ Sample Output CMSIS RTOS V1 APIs. This particular implementation demonstrates the usage of multiple preemptible threads of differing priorities, as well as semaphores and thread sleeping. + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/portability/cmsis_rtos_v1/timer_synchronization/README.rst b/samples/portability/cmsis_rtos_v1/timer_synchronization/README.rst index 3b669c8eb89..093cf70c5be 100644 --- a/samples/portability/cmsis_rtos_v1/timer_synchronization/README.rst +++ b/samples/portability/cmsis_rtos_v1/timer_synchronization/README.rst @@ -64,3 +64,4 @@ Sample Output Sample execution successful +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/portability/cmsis_rtos_v2/philosophers/README.rst b/samples/portability/cmsis_rtos_v2/philosophers/README.rst index 416d8487e33..73b6bc49619 100644 --- a/samples/portability/cmsis_rtos_v2/philosophers/README.rst +++ b/samples/portability/cmsis_rtos_v2/philosophers/README.rst @@ -54,3 +54,5 @@ Sample Output CMSIS RTOS V2 APIs. This particular implementation demonstrates the usage of multiple preemptible threads of differing priorities, as well as semaphores and thread sleeping. + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/portability/cmsis_rtos_v2/timer_synchronization/README.rst b/samples/portability/cmsis_rtos_v2/timer_synchronization/README.rst index 5cad80f5569..db4bcd36e1e 100644 --- a/samples/portability/cmsis_rtos_v2/timer_synchronization/README.rst +++ b/samples/portability/cmsis_rtos_v2/timer_synchronization/README.rst @@ -63,3 +63,5 @@ Sample Output Read from message queue: 15 Sample execution successful + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/subsys/console/getchar/README.rst b/samples/subsys/console/getchar/README.rst index c0e487bc22b..92eafba9f40 100644 --- a/samples/subsys/console/getchar/README.rst +++ b/samples/subsys/console/getchar/README.rst @@ -39,3 +39,4 @@ The easiest way to run this sample is using QEMU: Now start pressing keys on a keyboard, and they will be printed both as hex values and in character form. Be sure to press Enter, Up/Down, etc. key to check what control characters are produced for them. +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/subsys/console/getline/README.rst b/samples/subsys/console/getline/README.rst index 07d521df33d..200b89b4e4f 100644 --- a/samples/subsys/console/getline/README.rst +++ b/samples/subsys/console/getline/README.rst @@ -40,3 +40,4 @@ Now start pressing keys on a keyboard, followed by Enter. The input line will be printed back, with a hex code of the last character, to show that line does not include any special "end of line" characters (like LF, CR, etc.) +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/subsys/logging/logger/README.rst b/samples/subsys/logging/logger/README.rst index c83ce143e11..e3ed5e04e64 100644 --- a/samples/subsys/logging/logger/README.rst +++ b/samples/subsys/logging/logger/README.rst @@ -67,3 +67,5 @@ Sample Output [00:00:03.166,006] ext_log_system: warning level log, 2 arguments: 12 [00:00:03.166,025] ext_log_system: notice level log, 3 arguments: 105 [00:00:03.166,044] ext_log_system: info level log, 4 arguments : 1 24 + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/synchronization/README.rst b/samples/synchronization/README.rst index 9a74874dcc0..f45d3d42d3e 100644 --- a/samples/synchronization/README.rst +++ b/samples/synchronization/README.rst @@ -42,3 +42,5 @@ Sample Output threadB: Hello World! + +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. diff --git a/samples/userspace/shared_mem/README.rst b/samples/userspace/shared_mem/README.rst index 173a6747ffd..1860b2d89a7 100644 --- a/samples/userspace/shared_mem/README.rst +++ b/samples/userspace/shared_mem/README.rst @@ -38,6 +38,8 @@ message is the output of the first message, and the resulting output is the first message without spaces. The two messages are marked as 1 and 1' respectively. +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. + Two definitions can be inserted to change the wheel settings and print the state information. To enable the definitions uncomment the last two lines in CMakelists.txt.