In order to simplify the usage of `west build`, take a positional
argument with the source directory instead of requiring the `-s,
--source-dir` flag. This makes it easier and quicker to invoke west when
building, as well as being consistent with CMake.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fix some usability issues with this command.
- add help making it clear that either imgtool must be installed, or
the path to imgtool.py must be provided using --tool-path.
- in case people don't read that, print a helpful message if imgtool
is not installed and --tool-path is not provided.
- in case the build directory is not properly set up for an MCUboot
chain-loaded image, make the BuildConfiguration inspection more
robust, printing out errors using check_force() when values are
missing.
- mark the --tool option required to print usage and avoid a
RuntimeError if it is not provided.
- make sure we search for the default build directory before checking
for its existence, in case it was not provided
Signed-off-by: Marti Bolivar <marti@foundries.io>
Use DT_FLASH_WRITE_BLOCK_SIZE prefixed defined instead of
FLASH_WRITE_BLOCK_SIZE as the non-DT version is deprecated.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The Adafruit SAMD51 boards use a combined BOSSA / U2F bootloader that
resides in the first 16 KiB. Add support for pulling the application
partition offset from the configuration and using that to offset where
the binary gets flashed.
Signed-off-by: Michael Hope <mlhx@google.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This command is useful for signing binaries for loading by a
bootloader. At present, only MCUboot's "imgtool" is supported, but it
would be straightforward to add support for additional tools.
Using this command instead of "plain" imgtool avoids looking up any
numbers for the flash write block size, text section offset, or slot
size to get a signed binary. All users need to specify is the location
of the signing key.
This greatly improves usability for those unfamiliar with MCUboot, or
even experienced users who have to deal with multiple flash partition
layouts, boards, etc.
The command works by inspecting state in the Zephyr build system, some
of which is also provided by the runner package.
Signed-off-by: Marti Bolivar <marti@foundries.io>
This is a prep work patch for adding another command. Refactor
build.py to use a new Forceable superclass and find_build_dir() helper
routine. Fix a help string while we are here.
Signed-off-by: Marti Bolivar <marti@foundries.io>
pyocd 0.14.0 merged its command-line tools into a unified pyocd tool
with subcommands. The separate command-line tools still remain, but are
deprecated. Update the pyocd runner to use the new unified pyocd tool
with subcommands.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
nRF91 only does `--sectorerase` (no UICR) and does not need to
enable pin reset (`--pinresetenable`).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When flashing nRF9160_pca10090 board with nrfjprog, explicitly
request for --sectorerase, instead of --sectoranduicrerase (used
when flashing boards with nRF52 SOC).
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Although each of these command implementations has good output for
"west <command> --help", the "west --help" output is missing the
one-line descriptions.
Add them by modifying west-commands.yml to use a new 'help' key in
each command name. These need to be kept in sync with the Python
sources. For now just do that by copy/pasting. We could add fancy
logic to load the help from west-commands.yml later if we want.
Signed-off-by: Marti Bolivar <marti@foundries.io>
Extend the list with the new nRF91 SoC.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In order to be able to merge the topic branch, we require a few
fixes to CI.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Incorporate these into run_ci.sh the same way that btsim results were
done. This adds a dependency on pytest.
Signed-off-by: Marti Bolivar <marti@foundries.io>
West now supports a mechanism for extension commands. Use it to move
the command implementations that are tightly coupled with boards and
the zephyr build system back into the Zephyr repository.
This patch doesn't include test cases. Those will be moved over in a
subsequent patch.
Signed-off-by: Marti Bolivar <marti@foundries.io>