|
| 1 | +.. zephyr:board:: qemu_riscv |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | + |
| 6 | +The RISCV QEMU board configuration is used to emulate the RISCV architecture. |
| 7 | + |
| 8 | +Get the Toolchain and QEMU |
| 9 | +************************** |
| 10 | + |
| 11 | +The minimum version of the `Zephyr SDK tools |
| 12 | +<https://github.com/zephyrproject-rtos/sdk-ng/releases>`_ |
| 13 | +with toolchain and QEMU support for the RISCV64 architecture is v0.10.2. |
| 14 | +Please see the :ref:`installation instructions <install-required-tools>` |
| 15 | +for more details. |
| 16 | + |
| 17 | +Programming and Debugging |
| 18 | +************************* |
| 19 | + |
| 20 | +.. zephyr:board-supported-runners:: |
| 21 | +
|
| 22 | +Applications for the ``qemu_riscv`` board configuration can be built and run in |
| 23 | +the usual way for emulated boards (see :ref:`build_an_application` and |
| 24 | +:ref:`application_run` for more details). |
| 25 | + |
| 26 | +Flashing |
| 27 | +======== |
| 28 | + |
| 29 | +While this board is emulated and you can't "flash" it, you can use this |
| 30 | +configuration to run basic Zephyr applications and kernel tests in the QEMU |
| 31 | +emulated environment. For example, with the :zephyr:code-sample:`synchronization` sample: |
| 32 | + |
| 33 | +.. zephyr-app-commands:: |
| 34 | + :zephyr-app: samples/synchronization |
| 35 | + :host-os: unix |
| 36 | + :board: qemu_riscv/qemu_virt_riscv32 |
| 37 | + :goals: run |
| 38 | + |
| 39 | + |
| 40 | +.. zephyr-app-commands:: |
| 41 | + :zephyr-app: samples/synchronization |
| 42 | + :host-os: unix |
| 43 | + :board: qemu_riscv/qemu_virt_riscv32e |
| 44 | + :goals: run |
| 45 | + |
| 46 | + |
| 47 | +.. zephyr-app-commands:: |
| 48 | + :zephyr-app: samples/synchronization |
| 49 | + :host-os: unix |
| 50 | + :board: qemu_riscv/qemu_virt_riscv64 |
| 51 | + :goals: run |
| 52 | + |
| 53 | +This will build an image with the synchronization sample app, boot it using |
| 54 | +QEMU, and display the following console output: |
| 55 | + |
| 56 | +.. code-block:: console |
| 57 | +
|
| 58 | + ***** BOOTING ZEPHYR OS v1.8.99 - BUILD: Jun 27 2017 13:09:26 ***** |
| 59 | + threadA: Hello World from riscv64! |
| 60 | + threadB: Hello World from riscv64! |
| 61 | + threadA: Hello World from riscv64! |
| 62 | + threadB: Hello World from riscv64! |
| 63 | + threadA: Hello World from riscv64! |
| 64 | + threadB: Hello World from riscv64! |
| 65 | + threadA: Hello World from riscv64! |
| 66 | + threadB: Hello World from riscv64! |
| 67 | + threadA: Hello World from riscv64! |
| 68 | + threadB: Hello World from riscv64! |
| 69 | +
|
| 70 | +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. |
| 71 | + |
| 72 | +Debugging |
| 73 | +========= |
| 74 | + |
| 75 | +Refer to the detailed overview about :ref:`application_debugging`. |
0 commit comments