Adds an option to inform twister a testsuite should only be built and
run for platforms with unique sets of attributes. This enables
for example keying on unique (arch, simulation) platforms to run the test
suite on.
The most common usage may be test suites configured to run once per
(arch, simulation) pair as being enough. Additional information about
platforms may enable running a test once per hardware IP block or once
per soc family or soc avoiding duplicated effort in building and running
tests when once suffices.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
We want to be able to have platform or architecture extra configs
without having to duplicate a whole section of the test specification.
This adds support for namespacing of extra configs, for example:
arch:nios2:CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
or
platform:qemu_x86:CONFIG_FOO=y
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Inclusion of this file is now deprecated in favor of
find_package(Zephyr ...). Update documentation appropriately.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Expands kconfigfunctions to include checks for value existence in
an array property by nodelabel, or a chosen's boolean prop value.
Signed-off-by: Stephen Stauts <stephen.stauts@nordicsemi.no>
This removes the tinycbor module and replaces references in it
e.g. in sample text to use the zcbor replacement.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Improves the documentation when OR'ing multiple events of the same
group together to describe that this is only supported for events
that are part of the same group, giving example of correct and
incorrect usage.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The old random timer test was not random-looking
enough on some platforms.
Replace with new test which is psuedo-xoshiro.
The generator is still deterministic
and does not depend on entropy at all,
but should look more random for testing.
Change name of generator tree-wide also.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The 'Creating an Application' section has existed for several years
and predates the introduction of the example-application repository.
It's still a good reference, but it's not really the easiest way to
make an applications any more. Judging by experience watching users
ask questions and receive support on Discord, the example-application
repository is serving its purpose as a better 'pre-cooked' starting
point.
Adjust the hierarchy so that there's a single, parent section about
creating applications, which has using example-application as one
alternative, and doing it by hand as a less-recommended option. Add
more text on exactly what you need to do with example-application to
get something you can actually use.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
The 'Example Application' text is similar to but not the same as the
name of the repository, which is example-application. Use the name of
the repository instead. This is easier to search for and plants seeds
in people's memory about where to find it on GitHub.
Add more cross references.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
Add more cross-references to the overview and make a few other
improvements. In particular, adapt to David Kinder's recommended
style (lowercase 'zephyr' for the repository, capitalized 'Zephyr' for
the more general software distribution).
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
A few things are stale or missing:
- Using the term 'kernel' is outdated at this point. It's been years
since Zephyr was just a kernel, and we now include many modules as
well as our internal subsystems and driver layers. Make that clearer
in the overview.
- Devicetree overlays are a basic piece of zephyr applications and
they're worth highlighting at this introductory place as well. Note
that neither app.overlay or prj.conf are actually required to be
present, so if we're mentioning prj.conf here, we might as well
mention app.overlay too.
- Explain the basic purpose of and differences between Kconfig
fragments and DT overlays.
Clean up some other language and provide some more cross references.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
It is well known that putting your application inside the west
workspace where zephyr is installed, i.e. defining a workspace
application, makes it easier to use west build, since you don't have
to juggle setting ZEPHYR_BASE appropriately.
Therefore, recommend doing thing this way, while leaving a hint about
how to do something else.
The current state of affairs where the application is assumed to be in
$HOME/app is longstanding and precedes the introduction of west to
zephyr, and I think it's overdue for the page to get with the times
and use conventions that work well with west: our reference
application has been a workspace application for almost 2 years at
this point.
Create a new meta-variable <app> to describe the location of the
application to keep things short and make it clearer that the actual
location on the file system doesn't matter as long as things are set
up properly.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
When using llvm we need to set the gcov-tool to "llvm-cov gcov" but
the lcov tool is incapable of passing arguments to the gcov-tool. i.e.
the following cannot work:
$ lcov --gcov-tool "llvm-cov gcov" ...
Instead, create a symlink to llvm-cov prefixed as `gcov` which by the
documentation of llvm-cov will alias to `llvm-cov gcov` subcommand.
Signed-off-by: Yuval Peress <peress@google.com>
PlatformIO seems to not keep up with Zephyr (they don't seem to even
support 3.0), so we should not recommend it as an IDE as part of our
official docs. Also, it is frequent to see people reporting problems on
our Discord channels.
Ref. https://github.com/platformio/platform-ststm32/issues/602
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Adds information on renaming of MCUmgr Kconfig options
and migration script that can be used to help with transition.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
There are scenarios when it is necessary to globally redefine
a log macro. The existing logging frontend is not sufficient since
it redirects at the function level.
One example is using pigweed_tokenzier. The pigweed tokenizer depends
on intercepting log strings at the macro level to function.
Introduce an option to include a custom application provided header
named "zephyr_custom_log.h" at the end of log.h. This allows an
application to extend the LOG_* macros globally.
This change includes a simple test that redefines the core LOG macros
to include a custom prefix.
Signed-off-by: Rob Barnes <robbarnes@google.com>
This Kconfig is moved to the soc level since it determines
the flexspi clock initialization for XIP.
Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
Adds a note on MCUmgr Bluetooth and UDP transports now being
automatically registered without needing an application to
manually register them.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a note on MCUmgr handlers now being automatically called
without needing an application to manually register them.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add a note about the "branch out of date" and "Update branch" GitHub
feature. That message is confusing for new users and we often see people
losing approvals and introducing merge commits with it. Adding a note
in the contribution guidelines would hopefully help some.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
There hasn't been any topic branch in widespread use. This point is
still relevant for backports or some advanced usage, but since this list
is meant to help contributor approaching the project it may be a good
idea to drop the point and make the list a tiny bit shorter and less
intimidating.
Instead, mention that main should be used "if unsure" in the previous
point.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Adds a note on rc responses to mcumgr commands where the status is
good that these responses will henceforth be emitted.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
The `TEST_RANDOM_GENERATOR` Kconfig symbol indicates that a non-random
number generator (i.e. a random number generator that is not truly
random) is _allowed_ to be used for testing purposes, and not
necessarily that a non-random number generator is _selected_ -- that is
indicated by the `RNG_GENERATOR_CHOICE` choices that depend on
`TEST_RANDOM_GENERATOR` (i.e. only `TIMER_RANDOM_GENERATOR` as of now).
This commit updates the `TEST_RANDOM_GENERATOR` Kconfig symbol
description to reflect and clarify that.
It also removes the `TEST_RANDOM_GENERATOR`'s dependency on
`ENTROPY_HAS_DRIVER` because the act of _allowing_ a non-random number
generator to be used does not depend on the availability of an entropy
driver -- when an entropy driver is available, by default, the
`ENTROPY_DEVICE_RANDOM_GENERATOR` will be selected; otherwise,
`TIMER_RANDOM_GENERATOR`, a non-random generator, will be selected.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Commit f17630ba75
("doc: application: added description of WARN_EXPERIMENTAL setting")
introduced a new section in the Kconfig settings bit about
experimental features.
This broke the structure of the document, however, because it used the
wrong kind of section underline, resulting in a hierarchy that looks
like this:
Application Configuration
└── Kconfig Configuration
Experimental Features
└── Devicetree Overlays
when it should have looked like this:
Application Configuration
├── Kconfig Configuration
| └── Experimental Features
└── Devicetree Overlays
This falsely make it look like DT overlays are an experimental
feature!
Fix it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
There is already CONFIG_SETTINGS_FILE_PATH, which is set to full file path,
while CONFIG_SETTINGS_FILE_DIR is required to be set to its parent
directory. This is redundant, as parent directory path can be easily found
out either during runtime or optionally during buildtime by CMake.
CONFIG_SETTINGS_FILE_DIR was actually introduced recently after Zephyr 3.2
release as a replacement of deprecated CONFIG_SETTINGS_FS_DIR. This means,
that there is no need to deprecate it for 3.3 release and dropping it
should be fine. Adjust 3.3 release notes accordingly, so that
CONFIG_SETTINGS_FILE_PATH will be used directly.
This patch stops using deprecated CONFIG_SETTINGS_FS_DIR. There is actually
no value in respecting it, as setting anything other than parent directory
of CONFIG_SETTINGS_FS_FILE makes no sense.
There is actually one use of CONFIG_SETTINGS_FILE_DIR in file backend
tests, to derive directory for files containing tested settings.
CONFIG_SETTINGS_FILE_PATH is not used there, so it makes little sense to
derive directory name from it. Instead, just use hardcoded "/settings"
subdirectory, as this was the default value of CONFIG_SETTINGS_FILE_DIR.
Deriving parent directory can be done either in runtime or in
buildtime (e.g. using some helper CMake function). Doing it in runtime
however allows to create directory recursively (which this patch actually
implements), e.g. for some more nested FS tree structure. Additionally it
will simplify migration of settings configuration from Kconfig to
device-tree (yet to be developed feature).
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
There is little reason to panic on settings backend initialization error.
Such behavior was introduced with initial settings subsystem support, which
was adapted from MyNewt. This is not the usual way how Zephyr handles
errors, so it is time to change that.
There is already handling of some errors by simply returning / propagating
them to caller. Rework all the paths that resulted in k_panic() to also
return error codes.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>