probe-rs is a new programming and debugging tool written in Rust, supports
many probes and targets.
This commit introduces initial support for probe-rs to Zephyr.
Signed-off-by: Chen Xingyu <hi@xingrz.me>
Running 'west blobs fetch' does not verify the digest of downloaded files:
1. if the checksum of the previously downloaded file does match
that in the blob metadata (status BLOB_PRESENT), do nothing
2. if the checksum of the previously downloaded file does not match
that in the blob metadata (status BLOB_OUTDATED),
download the "up to date" file
3. if the blob has not yet been downloaded (status BLOB_NOT_PRESENT),
download it
None of the 2) and 3) code paths will verify that the checksum of the file
just downloaded actually matches the digest in the blob's metadata.
In the event that the metadata of a module is incorrect, then the user
will not notice anything, and may rely on an unexpected binary,
e.g. a static library for a different architecture.
According to the Binary Blobs documentation [1], the expected
behavior is to check the blob digest after downloading.
[1] Fetching blobs, Zephyr 3.6.0 (still applies to Zephyr 3.7.0rc3)
docs.zephyrproject.org/3.6.0/contribute/bin_blobs.html#fetching-blobs
Signed-off-by: Christophe Dufaza <chris@openmarl.org>
With the recent change to hwmv2, loading the
boards is extremely slow and can take several
seconds.
To solve that problem this commit add a cache
of the boards. The cache is updated based on:
- when the latest commit of the manifest
file directory is updated or;
- when the manifest file directory is not
a git directory, when the manifest file
content itself is updated.
At the same time:
- update how the board completion is
displayed by including the board vendor to it;
- add missing `--board` and `--board-dir`
options;
- remove `hwmv1` board completion code.
Signed-off-by: Théo Battrel <theo.util@protonmail.ch>
The current option used as an example, --recover, is actually a separate
option in the runner itself. Instead use --clockspeed as an example,
which is applicable to all nrfjprog commands.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Allow for users to provide a --qspiini parameter that is passed directly to
the nrfjprog executable but only in the --program operation. This is
required since e073210ec2 enabled the
-O/--tool-opt for all operations, but --qspiini is only allowed combined
with --program.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When --erase was specified, esp32 runner was autodetecting serial port to
be used, regardless of --esp-device argument.
Append '--port SERIAL_DEVICE' parameter earlier, so that erase command
invocation uses explicitly specified serial device.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The default base timeout for pytest is statically set by
the TwisterHarnessConfig class to be 60 seconds. However,
sometimes it takes longer than 60s before the app starts
to run, especially on emulator/simulator where it takes
quite some time to start. So pass the test timeout as
the base timeout via pytest command line argument.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.
Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
Doing duplicates count of bugs, a PR fixing a bug is not a bug report.
Many PRs fixing an open bug are labeled with 'bug' and thuse are being
counted twice.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Address the cases where submitter is also the maintainer of the code
changed and other areas are being changed. In this case, assign to the
next area maintainers instead of assigning to submitter.
Example: maintainer of component A introduced significant changes to
area A but also makes changes to other areas B and C. Right now
maintainers of B and C are added as reviewers.
This change will assign to the next area after A, i.e. B in cases where the
submitter is also the maintainer of area A.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
When validating the flash runner configurations in `soc.yml`, the only
SoCs that were considered had to be defined under this structure:
family:
- series:
- socs:
- name: ...
However, the `family` and `series` keys are optional, so the `soc.yml`
files can also be arranged like this:
family:
- socs:
- name: ...
series:
- socs:
- name: ...
socs:
- name: ...
The solution is to move the validation code further down, so that it can
reuse the SoC data that was already correctly parsed while initializing
a `Systems` instance.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Updates the minimum version of imgtool to 2.1.0, which is one year
newer than the 2.0.0 release
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Previous OpenOCD version finding would fail when additional tokens were
prepended to the 'openocd --version' output, as happens with some third-
party OpenOCD repackages (xPack for one).
Fixes: #71955
Signed-off-by: Nick Kraus <nick@nckraus.com>
Disable branch coverage for the `__ASSERT` family of macros. Covering
all of the assertion branches by definition means triggering the
assertion, which can be either challenging or impossible to exercise,
and in either case results in the immediate termination of the test.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Multiple values for `--exclude-branches-by-pattern` will result in only
the last value taking effect. Resolve this by merging all the provided
regex patterns into a single pattern with the `|` operator.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The minimum version of pyelftools is 0.29 to make it working
with scripts/footprint/size_report
Fixes#75605
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Fixes#71761
The `west boards` command parses extra BOARD_ROOTs from Zephyr modules,
so that the boards defined in those modules are automatically listed.
In HWMv2, OOT boards can be described in terms of OOT SoCs, which means
that extra SOC_ROOTs must also be provided. Otherwise, an error message
will be displayed when attempting to list all boards. Therefore, every
Zephyr module SOC_ROOT should be included as well.
In HWMv1 (deprecated), OOT boards can be defined in terms of OOT archs,
but module ARCH_ROOTs had never been included automatically. The fix for
this is long overdue, but it's included for symmetry.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
The gTest harness asssumed that the lines end with the test name, but
some gTest implementations include the test duration in the line. Update
both the tests and regex to allow this and also avoid capturing
characters into the `test_name` that cannot be valid test name chars.
Fixes#72318
Signed-off-by: Yuval Peress <peress@google.com>
Increase the default SDO timeout for the CANopen program download west
runner from 0.3 seconds to 1 second. Depending on the flash size and speed,
a full erase may take slightly longer than 300 ms.
The timeout can be customized by using the --sdo-timeout runner parameter.
Fixes: #73987
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The current version of scipts do not consider OOT boards use cases and
the tests with robot now are strict to only one robot file, which is
not realistic for real environment. This address those issues and allow
multiple testsuits at command line and lists at tests entries. It add
another test parameter to allow configure robotframework options.
Fixes: #74563
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Ignore changes to the CANopen program download west runner in CI.
This script is only executed when performing a DFU using the CANopen
protocol via CAN, which is never triggered in CI anyways.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The flag won't work with sysbuild since there is no way to
reliably tell to a parser which data came from which image.
fixes: #74092
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
pylint keeps failing and complaining about arg_data_type is
used before assignment. So assign it to None to silence
the warning.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Python does not really support long long double, so %llx cannot
be formatted correctly, so we replace it with a simple %lx.
There is another variant %#llx and we also need replace it to
%#lx.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
... and put them into the LogParser class file instead of
the verisoned parser. This is in preparation for introducing
a new parser version.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Printing long long requires alignment on 64-bit before parsing
the actual argument. Or else the parser would be looking at
some unrelated bits. So fix it.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This extracts the DataTypes class into its own file. This is in
preparation to add a new version of parser which can reuse this
class.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adjust error message so that it clearly states runners.yaml is
missing from <build_dir>/zephyr, instead of referencing CMake cache
variable ZEPHYR_RUNNERS_YAML, which is no longer used (since
3124c02987 ).
Also clean up that variable in CMake since it is no longer used
(0 other references in entire tree).
Fixes#70605
Signed-off-by: Louis Feller <louis.feller@st.com>
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.
Signed-off-by: Jordan Yates <jordan@embeint.com>
When working with coredumps, it is useful to be able to modify base
registers. Adding this capability allows implementing scripts to
inspect backtrace of threads other than current the current thread.
Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
In size_report script, if the DWARF section of ELF file contains both
debug_loc and a debug_loclists sections, LocationListsPair class is
used to track locations. In that case, parse_from_attribute was missing
one argument which was causing the script to fail.
Signed-off-by: Zhani Baramidze <jbaramidze@meta.com>
Add `FILE` typedef in the `stdio.h` so that when doing
`FILE *file` definition checkpatch doesn't complain about
the position of the '*' and fail in CI.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
In order for the --recover option to work properly on the nRF54H20, it
requires executing it for both cores, the radio and the application one.
Extend the recover_target() function so that it does so for both 53 and
54H20.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Noticing many PRs that wait too long in the queue although once of the
maintainers approved with asignees set to other maintainers.
This changes the current behavior of picking the first maintainer in the
list and assigning to them only, instead we assign to all maintainers of
the main area being changed.
Who ends up driving the PR to a mergeable state is then to the
maintainers and they can unassign/assign based on availability.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
These clock selection Kconfigs should have been deprecated for
more than 2 releases, remove them:
- `CONFIG_COUNTER_RTC_STM32_CLOCK_SRC`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSI`
- `CONFIG_COUNTER_RTC_STM32_CLOCK_LSE`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Since b53a792ff0 Zephyr has the ability to define tristate Kconfig
options. When a tristate option FOO is selected as a "module", this
results in autoconf.h defining CONFIG_FOO_MODULE, not CONFIG_FOO.
This patch allows the check_compliance script to also accept references
to a Kconfig symbol ending in _MODULE if the prefix is defined.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Execute 'zephyr.exe' in application build directory as 'current working
directory' (cwd). This makes sure that native_sim specific drivers (like
flash simulator with file backend in 'flash.bin') are using unique context
for external resources with relative paths.
This fixes executing native_sim tests in twister with flash simulator.
Previously a shared 'flash.bin' was used for all executed 'zephyr.exe'
processes in twister. After this patch a unique 'flash.bin' file is used
for each tested sample, since those 'flash.bin' is placed in application
build directory instead of twister root directory.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
`west build` can be invoked without specifying the source directory when
being invoked from the source directory itself.
When using `west build` for incremental builds, then the build command
will examine the CMake cache to determine the application dir by using
the value of CMAKE_HOME_DIRECTORY.
With sysbuild, this leads to the wrong assumption that the sysbuild
itself is the application to build.
Instead, have west build look for APP_DIR which points to the correct
source dir when sysbuild is used. Use APPLICATION_SOURCE_DIR when
APP_DIR is not set, as this indicates a no-sysbuild build.
Keep CMAKE_HOME_DIRECTORY behavior as last fallback mechanism.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>