Skip to content

Commit 6de7702

Browse files
kartbennashif
authored andcommitted
boards: doc: native_sim: adopt zephyr-board directive
Update documentation of native_sim to leverage zephyr-board Shinx magic, in particular the ability to generate the table of supported HW features. Signed-off-by: Benjamin Cabé <[email protected]>
1 parent 3c1f7f1 commit 6de7702

File tree

47 files changed

+83
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+83
-87
lines changed

boards/native/doc/arch_soc.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Types of POSIX arch based boards
3434
================================
3535

3636
Today there are two types of POSIX boards:
37-
:ref:`native_sim<native_sim>`, and the :ref:`bsim boards<bsim boards>`.
37+
:zephyr:board:`native_sim<native_sim>`, and the :ref:`bsim boards<bsim boards>`.
3838
While they share the main objectives and principles, the first is intended as
3939
a HW agnostic test platform which in some cases utilizes the host OS
4040
peripherals, while the second intend to simulate a particular HW platform,
@@ -320,8 +320,8 @@ Architecture and design
320320

321321
Relationship between Zephyr, the native_sim target and the native simulator
322322

323-
When building targeting Zephyr's :ref:`native_sim<native_sim>` board, we build our embedded SW,
324-
that is, our application, the Zephyr kernel, and any subsystems and drivers we have selected,
323+
When building targeting Zephyr's :zephyr:board:`native_sim<native_sim>` board, we build our embedded
324+
SW, that is, our application, the Zephyr kernel, and any subsystems and drivers we have selected,
325325
with the :ref:`POSIX architecture<posix_arch_design_archl>` and the
326326
:ref:`inf_clock<posix_arch_design_socl>` SOC layers.
327327
The result of this build is a pre-linked elf library, which contains what we can call the
@@ -449,9 +449,9 @@ Busy waits
449449
==========
450450

451451
Busy waits work thanks to logic provided by the board and native simulator.
452-
This does not need to be the same for all boards, but both :ref:`native_sim<native_sim>` and the
453-
:ref:`nrf*bsim boards<bsim boards>` work similarly through the combination of a board specific
454-
:c:func:`arch_busy_wait()` and an special fake HW timer provided by the native simulator.
452+
This does not need to be the same for all boards, but both :zephyr:board:`native_sim<native_sim>`
453+
and the :ref:`nrf*bsim boards<bsim boards>` work similarly through the combination of a board
454+
specific :c:func:`arch_busy_wait()` and an special fake HW timer provided by the native simulator.
455455

456456
Please check the
457457
`native simulator busy wait design documentation <https://github.com/BabbleSim/native_simulator/blob/main/docs/Design.md#busy-waits>`_

boards/native/doc/bsim_boards_design.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ These tests are run in workstation, that is, without using real embedded HW.
6060
The intention being to be able to run tests much faster than real time,
6161
without the need for real HW, and in a deterministic/reproducible fashion.
6262

63-
Unlike :ref:`native_sim <native_sim>`, bsim boards do not interact directly with any host
63+
Unlike :zephyr:board:`native_sim <native_sim>`, bsim boards do not interact directly with any host
6464
peripherals, and their execution is independent of the host load, or timing.
6565

6666
These boards are also designed to be used as prototyping and development environments,
@@ -106,12 +106,12 @@ to these boards.
106106
an special driver that handles the EDTT communication (its RPC transport)
107107
and an embedded application that handles the RPC calls themselves, while
108108
the python test scripts provide the test logic.
109-
- Using Zephyr's :ref:`native_sim <native_sim>` board: It also allows integration testing of
109+
- Using Zephyr's :zephyr:board:`native_sim <native_sim>` board: It also allows integration testing of
110110
the embedded code, but without any specific HW. In that way, many embedded
111111
components which are dependent on the HW would not be suited for testing in
112112
that platform. Just like the bsim boards, this Zephyr target board can
113113
be used with or without Zephyr's ztest system and twister.
114-
The :ref:`native_sim <native_sim>` board shares the :ref:`POSIX architecture<Posix arch>`,
114+
The :zephyr:board:`native_sim <native_sim>` board shares the :ref:`POSIX architecture<Posix arch>`,
115115
and native simulator runner with the bsim boards.
116116

117117
- Zephyr's ztest infrastructure and Zephyr's twister:

boards/native/native_sim/doc/index.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
.. _native_sim:
2-
3-
native_sim
4-
##########
5-
6-
.. contents::
7-
:depth: 1
8-
:backlinks: entry
9-
:local:
1+
.. zephyr:board:: native_sim
102
113
Overview
124
********
@@ -293,7 +285,9 @@ All times are kept in microseconds.
293285
Peripherals
294286
***********
295287

296-
The following peripherals are currently provided with this board:
288+
.. zephyr:board-supported-hw::
289+
290+
Here are more details on the peripherals that are currently provided with this board:
297291

298292
**Interrupt controller**
299293
A simple yet generic interrupt controller is provided. It can nest interrupts

doc/_scripts/gen_boards_catalog.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,9 @@ def get_catalog(generate_hw_features=False, hw_features_vendor_filter=None):
302302
if node.matching_compat is None:
303303
continue
304304

305-
# skip "zephyr,xxx" compatibles
306-
if node.matching_compat.startswith("zephyr,"):
305+
# skip "zephyr,xxx" compatibles (unless board is native_sim, since in this
306+
# case the "zephyr,"-prefixed peripherals are legitimate)
307+
if node.matching_compat.startswith("zephyr,") and board.name != "native_sim":
307308
continue
308309

309310
description = DeviceTreeUtils.get_cached_description(node)

doc/connectivity/bluetooth/autopts/autopts-linux.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Supported methods to test zephyr bluetooth host:
1313

1414
- Testing Zephyr Host Stack on QEMU
1515

16-
- Testing Zephyr Host Stack on :ref:`native_sim <native_sim>`
16+
- Testing Zephyr Host Stack on :zephyr:board:`native_sim <native_sim>`
1717

1818
- Testing Zephyr combined (controller + host) build on Real hardware (such as nRF52)
1919

20-
For running with QEMU or :ref:`native_sim <native_sim>`, see :ref:`bluetooth_qemu_native`.
20+
For running with QEMU or :zephyr:board:`native_sim <native_sim>`, see :ref:`bluetooth_qemu_native`.
2121

2222
.. contents::
2323
:local:
@@ -325,7 +325,7 @@ Testing Zephyr Host Stack on QEMU:
325325
~/zephyrproject/build/zephyr/zephyr.elf -i SERVER_IP -l LOCAL_IP
326326
327327
328-
Testing Zephyr Host Stack on :ref:`native_sim <native_sim>`:
328+
Testing Zephyr Host Stack on :zephyr:board:`native_sim <native_sim>`:
329329

330330
.. code-block::
331331

doc/connectivity/bluetooth/bluetooth-dev.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ This setup relies on a "dual-chip" :ref:`configuration <bluetooth-configs>`
7676
which is comprised of the following devices:
7777

7878
#. A :ref:`Host-only <bluetooth-build-types>` application running in the
79-
:ref:`QEMU <application_run_qemu>` emulator or the :ref:`native_sim <native_sim>` native
79+
:ref:`QEMU <application_run_qemu>` emulator or the :zephyr:board:`native_sim <native_sim>` native
8080
port of Zephyr
8181
#. A Controller, which can be one of the following types:
8282

@@ -117,7 +117,7 @@ native_sim
117117
.. note::
118118
This is currently only available on GNU/Linux
119119

120-
The :ref:`native_sim <native_sim>` target builds your Zephyr application
120+
The :zephyr:board:`native_sim <native_sim>` target builds your Zephyr application
121121
with the Zephyr kernel, and some minimal HW emulation as a native Linux
122122
executable.
123123

@@ -146,8 +146,8 @@ These boards, use:
146146
* The POSIX arch and native simulator to emulate the processor, and run natively on your host.
147147
* `Models of the nrf5x HW <https://github.com/BabbleSim/ext_NRF_hw_models/>`_
148148

149-
Just like with the :ref:`native_sim <native_sim>` target, the build result is a normal Linux
150-
executable.
149+
Just like with the :zephyr:board:`native_sim <native_sim>` target, the build result is a normal
150+
Linux executable.
151151
You can find more information on how to run simulations with one or several
152152
devices in either of :ref:`these boards's documentation <nrf52bsim_build_and_run>`.
153153

doc/connectivity/bluetooth/bluetooth-tools.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Running on QEMU or native_sim
8484
*****************************
8585

8686
It's possible to run Bluetooth applications using either the :ref:`QEMU
87-
emulator<application_run_qemu>` or :ref:`native_sim <native_sim>`.
87+
emulator<application_run_qemu>` or :zephyr:board:`native_sim <native_sim>`.
8888

8989
In either case, a Bluetooth controller needs to be exported from
9090
the host OS (Linux) to the emulator. For this purpose you will need some tools
@@ -103,7 +103,7 @@ The host OS's Bluetooth controller is connected in the following manner:
103103
command-line option passed to the native_sim executable: ``--bt-dev=hci0``
104104

105105
On the host side, BlueZ allows you to export its Bluetooth controller
106-
through a so-called user channel for QEMU and :ref:`native_sim <native_sim>` to use.
106+
through a so-called user channel for QEMU and :zephyr:board:`native_sim <native_sim>` to use.
107107

108108
.. note::
109109
You only need to run ``btproxy`` when using QEMU. native_sim handles
@@ -147,7 +147,7 @@ building and running a sample:
147147
the :literal:`bt-server-bredr` UNIX socket, letting the application
148148
access the Bluetooth controller.
149149

150-
* To run a Bluetooth application in :ref:`native_sim <native_sim>`, first build it:
150+
* To run a Bluetooth application in :zephyr:board:`native_sim <native_sim>`, first build it:
151151

152152
.. zephyr-app-commands::
153153
:zephyr-app: samples/bluetooth/<sample>

doc/connectivity/networking/api/gptp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Boards supported:
4040
- :zephyr:board:`nucleo_h745zi_q`
4141
- :zephyr:board:`nucleo_f767zi`
4242
- :zephyr:board:`sam_e70_xplained`
43-
- :ref:`native_sim` (only usable for simple testing, limited capabilities
43+
- :zephyr:board:`native_sim` (only usable for simple testing, limited capabilities
4444
due to lack of hardware clock)
4545
- :zephyr:board:`qemu_x86` (emulated, limited capabilities due to lack of hardware clock)
4646

doc/connectivity/networking/eth_bridge_native_sim_setup.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Ethernet bridge with native_sim board
88
:depth: 2
99

1010
This document describes how to set up a bridged Ethernet network between a (Linux) host
11-
and a Zephyr application running in a :ref:`native_sim <native_sim>` board.
11+
and a Zephyr application running in a :zephyr:board:`native_sim <native_sim>` board.
1212

1313
This setup is useful when testing the Ethernet bridging feature that can be enabled with
1414
:kconfig:option:`CONFIG_NET_ETHERNET_BRIDGE` Kconfig option. In this setup, the net-tools
1515
configuration creates two host network interfaces ``zeth0`` and ``zeth1`` and connects them
16-
to Zephyr's :ref:`native_sim <native_sim>` application.
16+
to Zephyr's :zephyr:board:`native_sim <native_sim>` application.
1717

1818
First create the host interfaces. In this example two interfaces are created.
1919

doc/connectivity/networking/native_sim_setup.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Using virtual/TAP Ethernet driver
1111
*********************************
1212

1313
This paragraph describes how to set up a virtual network between a (Linux) host
14-
and a Zephyr application running in a :ref:`native_sim <native_sim>` board.
14+
and a Zephyr application running in a :zephyr:board:`native_sim <native_sim>` board.
1515

1616
In this example, the :zephyr:code-sample:`sockets-echo-server` sample application from
1717
the Zephyr source distribution is run in native_sim board. The Zephyr

0 commit comments

Comments
 (0)