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.
1050
1050
- scripts/requirements-build.txt
1051
1051
- scripts/requirements-doc.txt
1052
1052
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
+
1053
1072
Module Inclusion
1054
1073
================
1055
1074
Original file line number Diff line number Diff line change @@ -779,18 +779,26 @@ To view all available options Renode supports, use::
779
779
780
780
west simulate --runner=renode --renode-help
781
781
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
+
782
795
Hacking
783
796
*******
784
797
785
798
This section documents the ``runners.core `` module used by the
786
799
flash and debug commands. This is the core abstraction used to implement
787
800
support for these features.
788
801
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
-
794
802
Developers can add support for new ways to flash and debug Zephyr programs by
795
803
implementing additional runners. To get this support into upstream Zephyr, the
796
804
runner should be added into a new or existing ``runners `` module, and imported
You can’t perform that action at this time.
0 commit comments