West: runners: Add explicit capabilities
Add explicit capabilities to nios2, nsim and openocd runners to prevent them from having potentially unwanted ones (for example when new capabilities are added to Zephyr). Signed-off-by: Michał Szprejda <mszprejda@antmicro.com>
This commit is contained in:
parent
73b73c91f4
commit
f155ff596c
3 changed files with 15 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
'''Runner for NIOS II, based on quartus-flash.py and GDB.'''
|
||||
|
||||
from runners.core import ZephyrBinaryRunner, NetworkPortHelper
|
||||
from runners.core import ZephyrBinaryRunner, NetworkPortHelper, RunnerCaps
|
||||
|
||||
|
||||
class Nios2BinaryRunner(ZephyrBinaryRunner):
|
||||
|
@ -29,6 +29,10 @@ class Nios2BinaryRunner(ZephyrBinaryRunner):
|
|||
def name(cls):
|
||||
return 'nios2'
|
||||
|
||||
@classmethod
|
||||
def capabilities(cls):
|
||||
return RunnerCaps(commands={'flash', 'debug', 'debugserver', 'attach'})
|
||||
|
||||
@classmethod
|
||||
def do_add_parser(cls, parser):
|
||||
# TODO merge quartus-flash.py script into this file.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from os import path
|
||||
|
||||
from runners.core import ZephyrBinaryRunner
|
||||
from runners.core import ZephyrBinaryRunner, RunnerCaps
|
||||
|
||||
DEFAULT_ARC_GDB_PORT = 3333
|
||||
DEFAULT_PROPS_FILE = 'nsim_em.props'
|
||||
|
@ -40,6 +40,10 @@ class NsimBinaryRunner(ZephyrBinaryRunner):
|
|||
def name(cls):
|
||||
return 'arc-nsim'
|
||||
|
||||
@classmethod
|
||||
def capabilities(cls):
|
||||
return RunnerCaps(commands={'flash', 'debug', 'debugserver', 'attach'})
|
||||
|
||||
@classmethod
|
||||
def do_add_parser(cls, parser):
|
||||
parser.add_argument('--gdb-port', default=DEFAULT_ARC_GDB_PORT,
|
||||
|
|
|
@ -18,7 +18,7 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
from runners.core import ZephyrBinaryRunner
|
||||
from runners.core import ZephyrBinaryRunner, RunnerCaps
|
||||
|
||||
DEFAULT_OPENOCD_TCL_PORT = 6333
|
||||
DEFAULT_OPENOCD_TELNET_PORT = 4444
|
||||
|
@ -100,6 +100,10 @@ class OpenOcdBinaryRunner(ZephyrBinaryRunner):
|
|||
def name(cls):
|
||||
return 'openocd'
|
||||
|
||||
@classmethod
|
||||
def capabilities(cls):
|
||||
return RunnerCaps(commands={'flash', 'debug', 'debugserver', 'attach'})
|
||||
|
||||
@classmethod
|
||||
def do_add_parser(cls, parser):
|
||||
parser.add_argument('--config', action='append',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue