This brings in content from commits in the upstream West
repository. Since both the version here and upstream have diverged,
this synchronizes them again.
Signed-off-by: Marti Bolivar <marti@foundries.io>
This allows for scripts using nrfjrog to specify the serial number of
the attached device to use instead of showing a list of available
devices by adding an optional parameter.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdtech.com>
Bring in the changes from upstream 321ab2e17 ("runner: core: fix
docstrings for ReST integration"). This is a minimal change necessary
to avoid documentation build issues. The rest of West has gained other
features that are too late to pull in to the RC period, so just bring
in what's needed to get to v1.12.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Add the build directory to the central runner configuration.
This is commonly useful information.
The first place we can use it is to eliminate guessing the current
working directory when building objects to parse .config.
It's not necessary to modify the build system for this, so leave the
relevant command line flag among the general options.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Continue better integration of the runner subpackage into west by
moving the common runner configuration options into the command
core. This allows commands like "west flash -h" to display help for
common overrides like --kernel-hex.
Adjustments needed to make this happen are:
- Change the build system to separate common configuration values from
runner-specific options and arguments
- Prepare the runner core by defining a new RunnerConfig class that
represents the common configuration, and accepting that from a new
create() method, which replaces create_from_args().
- Convert all concrete runner classes to use the new style of
argument parsing and initialization.
- Group the command options appropriately for help output readability
There's still a bit of tool-specific stuff in the common
configuration (gdb and openocd configuration in particular); a more
generic way to deal with that will be necessary to better support
things like non-GDB debuggers, but that's out of scope of this patch.
All the runner-specific options are still in the runner packge, which
currently prevents them from being included in "west flash -h" etc.
Fixing that is also out of scope of this patch.
This has the ancillary benefit of getting rid of the legacy 'debug'
argument to ZephyrBinaryRunner, which is no longer appropriate since
verbose debug logging is handled by log.py in west.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Replace all informational messages with calls to log functions.
Cases which must interact via the terminal and standard output are not
modified.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
There are a few issues with the intel_s1000 runner:
- it doesn't attach to the client when running debug (this is
a part of the command's contract specified in core.py)
- it uses hard-coded sleeps when running subprocesses instead of
waiting for them to terminate
- it re-implements pre-existing popen_ignore_int() functionality (in a
way that is not portable to Windows) rather than using it directly
Fix these issues.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Make the flake8 linter happy, spell the board name with the correct
case in the module docstring, and keep the usual camel case naming
convention used for classes.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This is redundant information. The command is already known from the
top-level west command line. We can just feed it to run without
inserting it on the command line as well, which is safe to do now that
zephyr_flash_debug.py is gone.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Add a utility method for getting a runner class given its name. This
will be used in an upcoming patch which adds a command for printing
runner information.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
There is a copy in the west util module; now that runner is a
subpackage of west, just import it from there.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This is a stepping-stone to adding runner functionality into west
itself.
Since all of the runner tools assume a Zephyr build directory layout,
this doesn't put anything generic into a Zephyr-specific tool.
Make minimal adjustments to zephyr_flash_debug.py to keep existing
build system targets working unmodified.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>