File tree Expand file tree Collapse file tree 5 files changed +43
-1
lines changed
boards/vendor/custom_plank Expand file tree Collapse file tree 5 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 3
3
4
4
board_runner_args (jlink "--device=nrf52" "--speed=4000" )
5
5
board_runner_args (pyocd "--target=nrf52840" "--frequency=4000000" )
6
+ board_runner_args (example "--param=custom_plank" )
6
7
7
8
set (OPENOCD_NRF5_SUBFAMILY "nrf52" )
8
9
9
10
include (${ZEPHYR_BASE} /boards/common/nrfjprog.board.cmake )
10
11
include (${ZEPHYR_BASE} /boards/common/jlink.board.cmake )
11
12
include (${ZEPHYR_BASE} /boards/common/pyocd.board.cmake )
12
13
include (${ZEPHYR_BASE} /boards/common/openocd-nrf5.board.cmake )
14
+ include (${CMAKE_CURRENT_LIST_DIR} /example_runner.board.cmake )
Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: Apache-2.0
2
+
3
+ board_set_sim_runner_ifnset (example )
4
+ board_finalize_runner_args (example ) # No default arguments to provide.
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2024 Basalte bv
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ from runners .core import RunnerCaps , ZephyrBinaryRunner
6
+
7
+
8
+ class ExampleRunner (ZephyrBinaryRunner ):
9
+ """Dummy example runner."""
10
+
11
+ def __init__ (self , cfg , param ):
12
+ super ().__init__ (cfg )
13
+ self .param = param
14
+
15
+ @classmethod
16
+ def name (cls ):
17
+ return "example"
18
+
19
+ @classmethod
20
+ def capabilities (cls ):
21
+ return RunnerCaps (commands = ({"simulate" }))
22
+
23
+ @classmethod
24
+ def do_add_parser (cls , parser ):
25
+ parser .add_argument ("--param" , action = "store" , help = "An example parameter" )
26
+
27
+ @classmethod
28
+ def do_create (cls , cfg , args ):
29
+ return cls (cfg , param = args .param )
30
+
31
+ def do_run (self , command , ** kwargs ):
32
+ self .logger .info (f"Running { command } on { self .param } " )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ manifest:
12
12
projects :
13
13
- name : zephyr
14
14
remote : zephyrproject-rtos
15
- revision : main
15
+ revision : pull/83190/head
16
16
import :
17
17
# By using name-allowlist we can clone only the modules that are
18
18
# strictly needed by the application.
Original file line number Diff line number Diff line change 18
18
# `<dts_root>/dts/bindings` for additional dts binding files. The `.` is
19
19
# the root of this repository.
20
20
dts_root : .
21
+ runners :
22
+ # Additional runners, Zephyr will import these when discovering
23
+ # subclasses of the `ZephyrBinaryRunner` class.
24
+ - file : scripts/example_runner.py
You can’t perform that action at this time.
0 commit comments