|
| 1 | +.. _qemu_microblaze: |
| 2 | + |
| 3 | +Microblaze Emulation (QEMU) |
| 4 | +########################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The Microblaze QEMU board configuration is used to emulate the Microblaze architecture. |
| 10 | +The Microblaze QEMU machine instantiates its peripherals using a Devicetree Blob (DTB) |
| 11 | +file located at `boards/microblaze/qemu_microblaze/board-qemu-microblaze-demo.dtb`. |
| 12 | +This file has been produced by compiling the QEMU system devicetree inside |
| 13 | +`boards/microblaze/qemu_microblaze/hw-dtb`. This directory also includes a Makefile |
| 14 | +and a README explaining the compilation process to produce the DTB file. |
| 15 | +For the applications to work properly, Zephyr devicetree and QEMU system devicetree must match. |
| 16 | + |
| 17 | +Programming and Debugging |
| 18 | +************************* |
| 19 | + |
| 20 | +Applications for the ``qemu_microblaze`` board configuration can be built and run in |
| 21 | +the usual way for emulated boards (see :ref:`build_an_application` and |
| 22 | +:ref:`application_run` for more details). |
| 23 | + |
| 24 | +Flashing |
| 25 | +======== |
| 26 | + |
| 27 | +While this board is emulated and you can't "flash" it, you can use this |
| 28 | +configuration to run basic Zephyr applications and kernel tests in the QEMU |
| 29 | +emulated environment. For example, with the :ref:`synchronization_sample`: |
| 30 | + |
| 31 | +.. zephyr-app-commands:: |
| 32 | + :zephyr-app: samples/synchronization |
| 33 | + :host-os: unix |
| 34 | + :board: qemu_microblaze |
| 35 | + :goals: run |
| 36 | + |
| 37 | +This will build an image with the synchronization sample app, boot it using |
| 38 | +QEMU, and display the following console output: |
| 39 | + |
| 40 | +.. code-block:: console |
| 41 | +
|
| 42 | + *** Booting Zephyr OS build v3.4.0-rc3-271-g230a121f6740 *** |
| 43 | + thread_a: Hello World from cpu 0 on qemu_microblaze! |
| 44 | + thread_b: Hello World from cpu 0 on qemu_microblaze! |
| 45 | + thread_a: Hello World from cpu 0 on qemu_microblaze! |
| 46 | + thread_b: Hello World from cpu 0 on qemu_microblaze! |
| 47 | + thread_a: Hello World from cpu 0 on qemu_microblaze! |
| 48 | + thread_b: Hello World from cpu 0 on qemu_microblaze! |
| 49 | +
|
| 50 | +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. |
| 51 | + |
| 52 | +Debugging |
| 53 | +========= |
| 54 | + |
| 55 | +Refer to the detailed overview about :ref:`application_debugging`. |
0 commit comments