1.. _riscv32-virtual:
2
3RISCV32 Virtual
4###############
5
6Overview
7********
8
9The RISCV32 Virtual board is a virtual platform made with Renode as an alternative to QEMU.
10Contrary to QEMU, the peripherals of this platform can be easily configured by editing the
11``riscv32_virtual.repl`` script and the devicetree files accordingly, this allows certain hardware
12configurations that only exist in proprietary boards/SoCs to be tested in upstream CI.
13
14Programming and debugging
15*************************
16
17Building
18========
19
20Applications for the ``riscv32_virtual`` board configuration can be built as usual
21(see :ref:`build_an_application`):
22
23.. zephyr-app-commands::
24   :board: riscv32_virtual
25   :goals: build
26
27Flashing
28========
29
30While this board is emulated and you can't "flash" it, you can use this
31configuration to run basic Zephyr applications and kernel tests in the Renode
32emulated environment. For example, with the :zephyr:code-sample:`synchronization` sample:
33
34.. zephyr-app-commands::
35   :zephyr-app: samples/synchronization
36   :host-os: unix
37   :board: riscv32_virtual
38   :goals: run
39
40This will build an image with the synchronization sample app, boot it using
41Renode, and display the following console output:
42
43.. code-block:: console
44
45        *** Booting Zephyr OS build zephyr-v3.5.0-1511-g56f73bde0fb0 ***
46        thread_a: Hello World from cpu 0 on riscv32_virtual!
47        thread_b: Hello World from cpu 0 on riscv32_virtual!
48        thread_a: Hello World from cpu 0 on riscv32_virtual!
49        thread_b: Hello World from cpu 0 on riscv32_virtual!
50
51Exit Renode by pressing :kbd:`CTRL+C`.
52
53Debugging
54=========
55
56Refer to the detailed overview about :ref:`application_debugging`.
57