.. zephyr:board:: cortex_r8_virtual

Overview
********

The Cortex-R8 Virtual board is a virtual platform that can be emulated with Renode.
Edit the :zephyr_file:`boards/renode/cortex_r8_virtual/support/cortex_r8_virtual.repl` file to adapt the platform layout to your needs.

Refer to the `Renode documentation <https://renode.readthedocs.io/en/latest/>`_
to learn how to obtain Renode for your host.

Programming and debugging
*************************

.. zephyr:board-supported-runners::

Building
========

Applications for the ``cortex_r8_virtual`` board target can be built
using the standard build flow (see :ref:`build_an_application`):

.. zephyr-app-commands::
   :board: cortex_r8_virtual
   :goals: build

Flashing
========

Your software will run in simulation and you don't need to "flash" the board in a traditional way,
but you can use this configuration to run Zephyr applications
and kernel tests directly in Renode with the use of the ``run`` command.

For example, with the :zephyr:code-sample:`synchronization` sample:

.. zephyr-app-commands::
   :zephyr-app: samples/synchronization
   :host-os: unix
   :board: cortex_r8_virtual
   :goals: run

This will build an image with the synchronization sample app, boot it using
Renode, and display the following console output:

.. code-block:: console

        *** Booting Zephyr OS build v3.6.0-5689-g2a5c606abfa7 ***
        thread_a: Hello World from cpu 0 on cortex_r8_virtual!
        thread_b: Hello World from cpu 0 on cortex_r8_virtual!
        thread_a: Hello World from cpu 0 on cortex_r8_virtual!
        thread_b: Hello World from cpu 0 on cortex_r8_virtual!

Exit Renode by pressing :kbd:`CTRL+C`.

Debugging
=========

Refer to the detailed overview about :ref:`application_debugging`.

Renode can serve as a GDB server. For more information, refer to the
`Renode documentation about GDB debugging <https://renode.readthedocs.io/en/latest/debugging/gdb.html>`_.
