The cleanup pass (336c7da) to address long lines accidentally
removed a needed comma in the jlink runner.
Fixes#83605
Signed-off-by: David Leach <david.leach@nxp.com>
Using `west patch` with the `--patch-base`, `--patch-yaml` or
`--west-workspace` option results in an unhandled AttributeError in
filter_args() because the function expects these args to be of type
path. Adding the type to the argument definition forces argparse to
create variables of type path.
Signed-off-by: Gerhard Jörges <joerges@metratec.com>
Add support for .cold and .coldrodata sections, used to implement
a cold module. Assigning code and read-only data to those sections
makes them suitable for use in a cold module, stored and executed in
slow memory.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In smaller projects and organizations, forking Zephyr is usually
a tenable solution for development continuity, in the case that
bug-fixes or enhancements need to be applied to Zephyr to
unblock development.
In larger organizations, perhaps in the absence of healthy patch
management, technical debt management, and open-source policies,
forking and in-tree changes can quickly get out of hand.
In other organizations, it may simply be preferable to have a
zero-forking / upstream-first policy.
Regardless of the reason, this change adds a `west patch`
command that enables users to manage patches locally in their
modules, under version control, with complete transparence.
The format of the YAML file (detailed in a previous comit)
includes fields for filename, checksum, author, email, dates,
along with pr and issue links. There are fields indicating
whether the patch is upstreamble or whether it has been merged
upstream already. There is a custom field that is not validated
and can be used for any purpose.
Workflows can be created to notify maintainers when a merged
patch may be discarded after a version or a commit bump.
In Zephyr modules, the file resides conventionally under
`zephyr/patches.yml`, and patch files reside under
`zephyr/patches/`.
Sample usage applying patches (the `-v` argument for additional
detail):
```shell
west -v patch apply
reading patch file zephyr/run-tests-with-rtt-console.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/twister-rtt-support.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/multiple_icntl.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/move-bss-to-end.patch
checking patch integrity... OK
patching zephyr... OK
4 patches applied successfully \o/
```
Cleaning previously applied patches
```shell
west patch clean
```
After manually corrupting a patch file (the `-r` option will
automatically roll-back all changes if one patch fails)
```shell
west -v patch apply -r
reading patch file zephyr/run-tests-with-rtt-console.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/twister-rtt-support.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/multiple_icntl.patch
checking patch integrity... OK
patching zephyr... OK
reading patch file zephyr/move-bss-to-end.patch
checking patch integrity... FAIL
ERROR: sha256 mismatch for zephyr/move-bss-to-end.patch:
expect: 00e42e5d89f68f8b07e355821cfcf492faa2f96b506bbe87a9b35a823fd719cb
actual: b9900e0c9472a0aaae975370b478bb26945c068497fa63ff409b21d677e5b89f
Cleaning zephyr
FATAL ERROR: failed to apply patch zephyr/move-bss-to-end.patch
```
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Instead of unconditionally erasing the whole target, add
support for using the common --erase flag.
Signed-off-by: Peter Johanson <peter@peterjohanson.com>
The ecpprog command is an utility written by Greg Davill for flashing
FPGAs such as ECP5 or CrossLink-NX series. Devkits typically have an
FTDI interface chip to access the external flash. FPGA image is
typically at flash offset 0x00000000 flash offset, and the Zephyr
image offset can be set via CONFIG_FLASH_LOAD_OFFSET.
Signed-off-by: Josuah Demangeon <me@josuah.net>
Add new '--start-address' argument to the STM32CubeProgrammer west runner.
This argument can be used to specify an address from which the MCU should
start executing, instead of relying on the default value in CubeProgrammer.
Also update STM32CubeProgrammer runner tests to support new argument.
Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
"west sign" uses the C preprocessor to generate a TOML configuration
file, needed for rimage. When creating LLEXTs rimage also uses a
configuration file where all supporting components are configured as
LLEXT. This adds such a file generation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This code had a growing "enumerate all the platforms" wart. In point
of fact only intel_adsp is special here. Other rimage platforms don't
have a bootloader and use zephyr.elf directly.
Don't hard code platform names (especially since they aren't the same
as board/soc names!). Just autodetect which scheme we have at
runtime.
Signed-off-by: Andy Ross <andyross@google.com>
This commit adds a runner wrapper for the 'minichlink' program which
offers a free, open mechanism to use the CH-LinkE programming dongle for
the CH32V003.
https://github.com/cnlohr/ch32v003fun/tree/master/minichlink
Signed-off-by: Michael Hope <michaelh@juju.nz>
Signed-off-by: Dhiru Kholia <dhiru.kholia@gmail.com>
Commit e2a32d8b0ca596afeae48739c43817f693720a88 introduced an unbound
cmd issue for jlink flashing.
Fixed by moving cmd assignment outside of condition.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a new west command as helper for package management of Zephyr
and modules.
The first package manager to get supported is pip, where west projects
can list individual packages or requirements files in their module file.
A convenience --install argument is added to install the packages instead.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
These ignores were added with an older version of pylint and are
either removed or ignored by default.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>