For tracing_user, the sys_trace_isr_enter() & sys_trace_isr_exit()
block any nest interrupts & most SMP interrupts for the user. It is
hard to analyze the IRQ preemption(e.g., each IRQ counter and execution
time). This commit adds ISR nest level for each CPU to the user instead
of blocking user call back when nest interrupts.
Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
Document the existance of `zephyr.tag` by providing a link on the main
documentation guide page. Also include an example of how to use this
file in an external project.
Implements #41529.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The commit adds guide on backporting mcumgr fixes to Zephyr 2.7.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Co-Authored-By: Francesco Servidio <francesco.servidio@nordicsemi.no>
Provide a _ns target for b_u585i_iot02a board.
Flash partition is given as default for most applications,
with the following sizes:
MCUBoot: 208K
Secure: 256K
Non secure: 512K
Tested using tfm_ipc sample.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
LaTeX code generated by Sphinx causes problems when using extlinks in
references. Mitigate the problem by just using the extlink role
directly.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Fix some syntax errors, e.g. :c:kconfig:`...`
- Remove references to missing symbols (replaced with literals)
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Convert the CAN loopback driver from being configured via Kconfig to
multi-instance configured via devicetree.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The pinsN group name can be a confusing in some circumstances, so change
it to groupN. Some platforms (e.g. nrf or gd32) are already using
groupN. Documentation and API tests have been updated.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The PINCTRL_DT_(INST_)DEFINE macros already defined the trailing ;,
making its usage inconsistent with other macros such as
DEVICE_DT_DEFINE.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Added framework for concurrency testing. Framework setup multiple
priority contexts and executes user handlers in that context. Test
terminates after certain number of repetitions or preemptions or
when timeout occurs. It can also be aborted by the user.
Framework can be used for testing resiliency to preemptions.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Adds notes on how to run the two main test suites for TF-M using
the supplied sample applications.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
The pm_device_runtime_enable did not suspend devices, so it assumed that
the device was in a physically suspended state. This change makes sure
that device is left in a suspended state if the device is initially
active.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Tracing guide in the docs was missing references to the added tracing
syscall macro hooks. This adds those.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Change the function pm_device_runtime_enable() to return 0 on
success or an error code in case of error.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
When CONFIG_TRACING_OBJECT_TRACKING is enabled, the kernel will keep
lists of some objects (detailed below), so that debuggers or other tools
can keep track of them.
The lists of objects are:
struct k_timer *_track_list_k_timer;
struct k_mem_slab *_track_list_k_mem_slab;
struct k_sem *_track_list_k_sem;
struct k_mutex *_track_list_k_mutex;
struct k_stack *_track_list_k_stack;
struct k_msgq *_track_list_k_msgq;
struct k_mbox *_track_list_k_mbox;
struct k_pipe *_track_list_k_pipe;
struct k_queue *_track_list_k_queue;
Note that while CONFIG_TRACING is needed, one can always use
CONFIG_TRACE_NONE=y. Also, tracking will only be done for objects that
are also being traced (so, to prevent tracking of some type of object,
such as k_timer, just make CONFIG_TRACING_TIMER=n).
Some simple "sanity checking" tests are also added in this patch.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Adds Xtensa as supported architecture for coredump. Fixes
a few typos in documentation, Kconfig and a C file. Dumps
minimal set of registers shown by 'info registers' in GDB
for the sample_controller and ESP32 SOCs. Updates tests.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
This was moved into the application development guide in commit
bf9ceac ("doc: move env_vars into application development").
That commit claimed the following rationale:
No reason why we are duplicating this information in a standalone
guide when we already talk about env variables in the application
developer guide.
A github comment later says the duplication was in "Important build
system variables":
https://github.com/zephyrproject-rtos/zephyr/pull/34364#discussion_r616646517
This is incorrect and a misreading of the application development
guide.
The application development guide is talking about **cmake**
variables. These are not the same thing at all as **environment**
variables; treating them as if they are the same is simply wrong and
misleading, especially the "option 4" part that is really about
CMake variables, not environment variables.
In fact, the separate environment variables page was created for a
reason, which was to have a single place to explain to people unused
to managing their environment how things work, without cluttering
things up for people who already understand this.
There is nothing wrong with small, self-contained guides and in fact I
would argue they are a good thing.
Fix this confusing situation by restoring the original, separate page
and extricating the portions of it that are not related to environment
variables.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Many documents relied on single quotes to create references, e.g.
`my_reference`. This is possible because `default_role = "any"` is
enabled in Sphinx conf.py. However, this method comes with its problems:
- It mixes all domains together, so it's not clear to what are you
referencing: a document? a Kconfig option? a C function?...
- It creates inconsistencies: in some places explicit roles are used
(e.g. :ref:`my_page`) while in some others not.
- _Conflictis_ with markdown. Single quotes are used for literals in
Markdown, so people tend to use the same syntax in Sphinx, even though
it has a different purpose.
Usages have been found using `git grep ' `[^`]*` ' -- **/*.rst`.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Reflect the removal of BOARD.dts.pre.tmp in favor of zephyr.dts.pre in
SVG diagrams. Clean up adjacent text.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The sample implements a dummy ARoT (Application Root of Trust) partition
in TF-M and calls it from the app.
Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
It will unlock and unhold the CS line. Note that the lock and the CS
being hold on are 2 separate config bits, so if only one is selected
spi_release() will only apply on this configuration.
Note: this has been already the case in the controller drivers, where
there implementation of spi_release() calls
spi_context_unlock_unconditionally(). And that function always forces
the CS line to an inactive state.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Make it clearer that you can set it explicitly or the build system
will try to set it for you, and try to make it clearer what the build
system is doing when it tries to set it on your behalf.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Updated the Zephyr build process description to include description of
all Zephyr link stages.
It extends the guide with description of the intermediate binaries as
well as the post-processing of those binaries.
- Unfixed size binary
- Fixed size binary
Post-processing
- Partition alignment
- ISR table generation
Build stages images has been updated and new images showing the
post-processing stages of the intermediate binaries has been added.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
- Add tracing to the subsys group
- Use `subsys_tracing` "namespace"
- Some minor header style improvements
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a new and more extensive guide that describes the device runtime
API. It contains a brief introduction, API design principles and goals,
some example sequence diagrams and usage guidelines.
While the API still needs important additions, such a guide will
hopefully guide developers when trying to deal with device PM in Zephyr.
Note: sequence diagrams have been created using PlantUML (2021 version).
The rendered SVG diagrams embed the original code if they have to be
edited and re-rendered.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The API is already rendered automatically by breathe, so do not manually
add definitions again.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The API is already rendered automatically by breathe, so do not
duplicate it manually.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Remove duplicated information (e.g. enum list, available in the API
docs)
- Use C domain to reference
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Splitted the PM reference document into smaller chunks (overview,
system, device and device_runtime). Moved this content to the guides
section, since the documentation intent is to provide general PM subsys
information and usage guidelines.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Update TF-M documentation to match the current integrated TF-M version.
Include mention of the Platform secure partition that can be enabled.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Diagrams were pre-rendered and code included at the end, however, it is
possible to use the Graphviz extension to render them directly. The
advantage is that diagrams follow pre-defined defaults, making them
consistent with the documentation style.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
With this commit a dedicated APPLICATION_CONFIG_DIR is added to the
Zephyr build system.
Currently, the APPLICATION_SOURCE_DIR is identical also the base
location of configuration files.
This is very practical for simple samples, but also has it limitations
for more complex setups.
Introducing a dedicated APPLICATION_CONFIG_DIR allows users more
customization options in Zephyr build system.
Especially in terms of custom build configuration files unknown to
Zephyr itself.
For example, instead of all configuration files being located directly
in the application source folder, a project might prefer to organize
their configuration files on a per board basis, for example:
<app>/boards/custom_board_A/prj.conf
<app>/boards/custom_board_A/app.overlay
<app>/boards/custom_board_A/custom_file.mine
<app>/boards/custom_board_B/prj.conf
<app>/boards/custom_board_B/app.overlay
<app>/boards/custom_board_B/custom_file.mine
...
instead of n-files located in the root of the sample.
If the user / sample specifies APPLICATION_CONFIG_DIR, then this folder
will always be used instead of the default configuration folder.
As part of this extension the behaviour of
`-DCONF_FILE=<relative-path>/prj_<build>.conf` and additional Kconfig
fragments automatic sourcing has been aligned with the default behavior
of `prj.conf`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>