Several duplicates were found with
scripts/twister -T samples/ -T tests/ --dry-run --list-test-duplicates
This is an issue since duplicated names causes overwriting of
results. Most duplicates looked like obvious copy-pase errors.
New names where addopted looking at other tests in the same yaml
or looking at the directory/descriptio.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add an overlay to avoid running the samples/modules/canopennode
on the external octo NOR flash of the stm32h573i disco kit.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Change sample to set CONFIG_FULL_LIBCPP_REQUIRED and to filter on
CONFIG_FULL_LIBCPP_SUPPORTED. Since not all toolchains provide a
full libc++ this will restrict the sample only to those environments
that do.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
When the only C library available is the minimal one, this test cannot
work. Accept only platforms with full C library support to prevent build
failures.
Signed-off-by: Keith Packard <keithp@keithp.com>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
The samples under the tensorflow modules directory has been renamed
since commit 6fd1b02496. However, the path
in their README.rst was not updated.
Additionnaly, the modules top directory under the samples is missing for
the samples magic_wand and tflm_ethosu.
This fixes the path to the tensorflow lite micro samples in their
README.rst.
Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
For mcuboot support, this Kconfig option needs to be selected, this
is done by having a separate project configuration file when
building the version that supports mcuboot.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
* ensure Thrift documents are globbed in `modules/index.rst`
* add a "What is Thrift?" section to the Thrift sample
Signed-off-by: Chris Friedt <cfriedt@meta.com>
The "Thrift Layers" image gives a good visual representation
of Thrift in what would otherwise take many words.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Here we add a client and server samples for the basic
"hello" service.
These samples are designed to be run by either Zephyr or
the host machine, interchangeably.
Additionally, there is a python version of the client
to demonstrate Thrift's cross-language capabilities.
This code was merged from the following repository
at the commit specified below, with minor formatting
and coding-style modifications.
https://github.com/zephyrproject-rtos/gsoc-2022-thrift
e12e014d295918cc5ba0b4c507d1bf595a2f539a
Signed-off-by: Chris Friedt <cfriedt@meta.com>
glibc and newlib print "(nil)" for NULL pointers while picolibc just prints
"0". Allow either by replacing the exact "(nil)" match with ".*" instead
Signed-off-by: Keith Packard <keithp@keithp.com>
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.
Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.
The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases. Some newer tests are missing:
filter: TOOLCHAIN_HAS_NEWLIB == 1
so add that to testcases that needed.
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
This commit updates all deprecated `CONFIG_LIB_CPLUSPLUS` usages to:
* check if the Zephyr minimal C++ library is enabled using
`CONFIG_MINIMAL_LIBCPP` instead of relying on the
`CONFIG_LIB_CPLUSPLUS`-based inference.
* select `CONFIG_REQUIRES_FULL_LIBCPP` when there exists a component-
level C++ standard library dependency. This allows a component to
declare C++ standard library dependency without designating a
specific libray implementation.
* select the correct type of C++ standard library implementation to use
through one of the `CONFIG_LIBCPP_IMPLEMENTATION` choices.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
This commit updates all in-tree code to use `CONFIG_CPP` instead of
`CONFIG_CPLUSPLUS`, which is now deprecated.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Convert the CANopenNode sample to use sysbuild for generating MCUboot +
CANopenNode sample binaries instead of using manual instructions.
Rework the twister sample filtering to just list the known good boards.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Tags the chre sample so it may be ignored for platforms that don't want
to build or run this sample.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This test used to only run on native_posix due to the test filter until
e478a4e850 was merged. Now it's running on all platforms but it's failing
on qemu_leon3 for some address alignment issue.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The sample depends on the log output to check for a successful run. This
means that with a small enough log buffer we could lose messages and
fail the run, as it's happening right now on qemu_cortex_m0.
Switching to CONFIG_LOG_MODE_MINIMAL to avoid the problem in the first
place.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
On targets where POST_KERNEL initialization routines, executed after
the logging thread has started, take significant amount of time,
log messages produced during CHRE initialization may collide with
printk messages output by the sample. Prevent this by flushing all
log messages right after the initialization is performed.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add a sample program that demonstates how to run inferences on
Arm Ethos-U.
Signed-off-by: Kristofer Jonsson <kristofer.jonsson@arm.com>
Signed-off-by: Fredrik Knutsson <fredrik.knutsson@arm.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
C++ standard requires C++ main() to have the return type of 'int'.
This commit updates the CHRE sample to define main() as
`int main(void)` and enable `CONFIG_CPP_MAIN`, which instructs the
Zephyr kernel to call the C++ main().
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Sample is now maintained in the SOF repository, no need for duplication.
The SoF project maintains the board configurations and SOF related
configs better than we do.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
SoF pins threads to specific cores and don't need them to be executed in
multiple cores. This options allows Zephyr to do cache optimizations
during context switches.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).
Automated using:
```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Updates tflite-micro sample hello_world to use CMSIS-NN optimized
kernels. This is also documented in the corresponding README file.
Signed-off-by: Måns Nilsson <mans.nilsson@arm.com>
Enable Zephyr device runtime power management mechanisms in Intel SSP
driver. This allows Zephyr to track usage reference for power
domain gating.
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
The magic_want sample requires I2C bus to be enabled (used sensor is
connected to the bus).
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This is not a sample of an audio subsystem in zephyr, it is a sample
that completely depends on sof and its audio support.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sensor Kconfig sybmols should be enabled if CONFIG_SENSOR=y
and the devicetree node for the sensor is enabled. We can
remove explicitly enabling specific sensor drivers in .conf
files.
Signed-off-by: Kumar Gala <galak@kernel.org>
This commits is restricting the execution of the
samples/modules/canopennode to board configuration where
the nvs_sector_size is less than 0x10000.
When the CONFIG_CANOPENNODE_STORAGE is selected, the
settings_subsys_init do not accept
nvs_sector_size > UINT16_MAX.
Then all the stm32h723/h743/h745/h750 cannot run the
sample.modules.canopennode testcase
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Move to use DEVICE_DT_GET instead of device_get_binding as
we work on phasing out use of DTS 'label' property.
Signed-off-by: Kumar Gala <galak@kernel.org>
In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add initial build rules for CHRE. This change includes a Kconfig and
CMakeLists.txt to begin compiling code from the CHRE module.
Additional files are included to bridge the APIs from CHRE's to
Zephyr's. These can be found in modules/chre/include and
modules/chre/src.
Additionally, add a sample to make sure that the module builds. It can
be built via:
```
$ west build -b native_posix -p=always samples/application_development/chre
```
Signed-off-by: Yuval Peress <peress@google.com>
Changes console blocks in hello_world and magic_wand tflite-micro
samples to Kconfig blocks to match content. Fixes typos in
some networking samples so that code blocks display instead
of being hidden. Fixes path to litex-vexriscv-tflite.resc.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
The CANopenNode stack does not support CAN-FD. Depend on it being
disabled and explicitly disable it in the CANopenNode sample.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Corrects number of loops mentioned in README of sample
to match NUM_LOOPS in main.c. NUM_LOOPS was lowered in
PR #41123 to reduce the noise the sample produced in CI,
but the PR missed changing the README.
Cleans up one line.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>