From d2001a6fab85af0bde533e5613f12f98016d11ec Mon Sep 17 00:00:00 2001 From: Michal Smola Date: Fri, 5 Jan 2024 13:25:05 +0100 Subject: [PATCH] doc: add how to run application in QEMU on Windows Documentation does not describe how to run QEMU on Windows. Add description of steps needed to run QEMU and use QEMU with Twister on Windows in Beyond the Getting Started Guide. Add a reference to it in Aplication Development section. Tested using Windows 11 and QEMU installer from https://qemu.weilnetz.de/w64/ Signed-off-by: Michal Smola --- doc/develop/application/index.rst | 11 +++++++---- doc/develop/beyond-GSG.rst | 7 +++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/develop/application/index.rst b/doc/develop/application/index.rst index 62758cf71d022c..83d7dbb3fdd6d0 100644 --- a/doc/develop/application/index.rst +++ b/doc/develop/application/index.rst @@ -1060,10 +1060,13 @@ for additional information on how to flash your board. Running in an Emulator ====================== -The kernel has built-in emulator support for QEMU (on Linux/macOS only, this -is not yet supported on Windows). It allows you to run and test an application -virtually, before (or in lieu of) loading and running it on actual target -hardware. Follow these instructions to run an application via QEMU: +Zephyr has built-in emulator support for QEMU. +It allows you to run and test an application virtually, before +(or in lieu of) loading and running it on actual target hardware. + +Check out :ref:`beyond-GSG` for additional steps needed on Windows. + +Follow these instructions to run an application via QEMU: #. Build your application for one of the QEMU boards, as described in :ref:`build_an_application`. diff --git a/doc/develop/beyond-GSG.rst b/doc/develop/beyond-GSG.rst index d9336af5381794..8f5361d8512a8a 100644 --- a/doc/develop/beyond-GSG.rst +++ b/doc/develop/beyond-GSG.rst @@ -279,6 +279,13 @@ system using `QEMU `_ when targeting either the x86 or ARM Cortex-M3 architectures. (QEMU is included with the Zephyr SDK installation.) +On Windows, you need to install QEMU manually from +`Download QEMU `_. After installation, +add path to QEMU installation folder to PATH environment variable. +To enable QEMU in Test Runner (Twister) on Windows, +:ref:`set the environment variable ` +``QEMU_BIN_PATH`` to the path of QEMU installation folder. + For example, you can build and run the :ref:`hello_world` sample using the x86 emulation board configuration (``qemu_x86``), with: