File tree Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -1050,6 +1050,25 @@ requirement files in the ``scripts`` directory of the module.
10501050 - scripts/requirements-build.txt
10511051 - scripts/requirements-doc.txt
10521052
1053+
1054+ .. _modules-runners :
1055+
1056+ External Runners
1057+ ================
1058+
1059+ If a module has out of tree boards that require custom :ref: `runners <west-runner >`,
1060+ then it can add a list to its ``zephyr/module.yml `` file, for example:
1061+
1062+
1063+ .. code-block :: yaml
1064+
1065+ runners :
1066+ - file : scripts/my-runner.py
1067+
1068+
1069+ Each file entry is imported when executing ``west flash `` or ``west debug `` and
1070+ subclasses of the ``ZephyrBinaryRunner `` are registered for use.
1071+
10531072Module Inclusion
10541073================
10551074
Original file line number Diff line number Diff line change @@ -779,18 +779,26 @@ To view all available options Renode supports, use::
779779
780780 west simulate --runner=renode --renode-help
781781
782+ Out of tree runners
783+ *******************
784+
785+ :ref: `Zephyr modules <modules >` can have external runners discovered by adding python
786+ files in their :ref: `module.yml <modules-runners >`. Create an external runner class by
787+ inheriting from ``ZephyrBinaryRunner `` and implement all abstract methods.
788+
789+ .. note ::
790+
791+ Support for custom out-of-tree runners makes the ``runners.core `` module part of
792+ the public API and backwards incompatible changes need to undergo the
793+ :ref: `deprecation process <breaking_api_changes >`.
794+
782795Hacking
783796*******
784797
785798This section documents the ``runners.core `` module used by the
786799flash and debug commands. This is the core abstraction used to implement
787800support for these features.
788801
789- .. warning ::
790-
791- These APIs are provided for reference, but they are more "shared code" used
792- to implement multiple extension commands than a stable API.
793-
794802Developers can add support for new ways to flash and debug Zephyr programs by
795803implementing additional runners. To get this support into upstream Zephyr, the
796804runner should be added into a new or existing ``runners `` module, and imported
You can’t perform that action at this time.
0 commit comments