Commit Graph

4565 Commits

Author SHA1 Message Date
Jamie McCrae 21c7e3ba65 doc: mgmt: mcumgr: Add SMP groups to separate heading
This adds the SMP groups to a separate heading and makes them visible
in the contents list so that they can be selected without having to
go to a specific page to find them.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-26 15:11:11 +02:00
Dominik Ermel 7fccdd170b doc/storage/flash_map: Move to FIXED_PARTITION_ API
Rework of documentation that replaces nformation on
FLASH_AREA_ macro usage with information on FIXED_PARTITION_ macros.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-25 17:41:50 +02:00
Jamie McCrae 8e4d30f5e6 doc: release: 3.3: Add note on fixed mcumgr bt deadlock bug fix
Adds a note about a possible deadlock with mcumgr using the
Bluetooth transport being fixed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 17:37:17 +02:00
Henrik Brix Andersen f8a88cdb27 drivers: can: use flags fields for can_frame and can_filter structs
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.

This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.

Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.

Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.

As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.

Fixes: #50776

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Jamie McCrae 1a161b9d93 doc: release: 3.3: Add note on fixed mcumgr bt sample stack overflow
Adds a note about a possible stack overflow with the smp_svr sample
application using the Bluetooth transport being fixed.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 16:25:13 +02:00
Jim Mussared 49a03b3bcb doc: Add note about -z option to btproxy.
When running bluetooth samples with qemu_cortex_m3, it will sometimes
send a null byte at startup. By default, btproxy will detect this as
an invalid HCI payload and terminate. The -z option can be used to
work around this.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-10-25 10:54:09 +02:00
Fabio Baltieri 35ec706d82 doc: release process: drop the comment about changing the release name
Now that the automation picks the right name automatically, there's no
need to edit it manually as part of the release process.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-10-24 11:17:00 -04:00
Sam Hurst 76730da1a2 doc: add API documentation for USB-C VBUS Driver
This commit adds the USB-C driver API documentation in peripherals section
of the reference guide. The USB-C VBUS API is declared experimental.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Sam Hurst 0d68ebc52c doc: Document the USB-C Subsystem
Documents the USB-C Subsystem API.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00
Robert Lubos 7811410991 doc: net: Add documentation on network interface admin/oper states
Extend the net_if documentation with a section describing the
administrative and operational states on an interface, and how do they
interact with each other.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-20 10:00:31 +02:00
Øyvind Rønningstad c97c49f2d7 west.yml: Update zcbor to 0.6.0
Brings a few quality-of-life improvements for Zephyr, notably:
- No more collision with ARRAY_SIZE()
- C++ improvements

Add entry in release notes.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-10-19 16:04:56 +02:00
Stephanos Ioannidis 28b22b276a lib: libc: newlib: Make newlib nano variant optional
The newlib nano variant is currently enabled by default when
`CONFIG_NEWLIB_LIBC=y` and the selected toolchain-architecture
combination includes the newlib nano variant support, even if
`CONFIG_NEWLIB_LIBC_NANO` is not selected by the user.

When `CONFIG_NEWLIB_LIBC=y`, this results in the newlib nano variant
being selected for some architectures (e.g. ARC, ARM and RISC-V), while
the full variant is selected for the rest of the architectures.

The above behaviour is problematic because there exist functional
differences between the newlib full and nano variants (e.g. C99 format
modifiers such as `hh`, `ll`, `z`, `j` and `t` are not available in the
newlib nano variant), and this effectively leads to different level of
C standard support across different architectures when
`CONFIG_NEWLIB_LIBC=y`.

This commit fixes this problem by making the `CONFIG_NEWLIB_LIBC_NANO`
not `default y` and requiring its user to explicitly set this symbol to
`y` when they want to use the newlib nano variant.

Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
2022-10-19 16:02:51 +02:00
Torsten Rasmussen f4d372bf7d doc: clarify where application can use ExternalZephyrProject_Add
The sysbuild documentation refers to CMakeLists.txt which can lead the
user to believe this call can be added to the <sample>/CMakeLists.txt
file.

This file is sourced as part of the Zephyr CMake build and not sysbuild
CMake build.

Therefore change the description to sysbuild.cmake.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-10-19 11:07:03 +02:00
Torsten Rasmussen 303c1eb60c sysbuild: support sample configuration of extra images
This commit introduces the possibility of a sample to locate
configuration files for extra images that are used when building with
MCUboot.

This allows use-cases where a sample, A, want to include MCUboot but has
adjustments to the default MCUboot configuration.

By adding a Kconfig fragment `<sample>/sysbuild/mcuboot.conf`, then that
fragment will be used together with the default configuration for
MCUboot.

It is also possible to completely replace the MCUboot configuration.
This is done by creating `<sample>/sysbuild/mcuboot/` folder.
This folder will then be used as the `APPLICATION_CONFIG_DIR` when
building MCUboot.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-10-18 14:13:27 +02:00
Dominik Ermel 6755999bb3 doc: releases: Note on deprecation of zephyr_ prefix in SMP API
The commit adds note on deprecation of zephyr_ prefix in SMP API
used by SMP transports, that allow MCUMgr receive and process
SMP frames.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-18 12:05:42 +02:00
Florian Grandel 5bc6b157f1 net: fix minor typos
This change just fixes some insignificant typos.

Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
2022-10-17 16:54:37 +02:00
Krzysztof Chruscinski 5cdbd95875 doc: reference: logging: Add multidomain section
Add documentation for multidomain logging.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Krzysztof Chruscinski e322447109 logging: Initial multidomain support
Adding multidomain support by introducing log_link module which
acts as a receiver of log messages created by another domain.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00
Sean Madigan 5b1dd71f3e Bluetooth: kconfig: Add config options for PAST
Add config options specific for periodic advertising sync transfer.

Signed-off-by: Sean Madigan <sean.madigan@nordicsemi.no>
2022-10-17 10:14:10 +02:00
Gerard Marull-Paretas e42888bf7c device: move independent groups to groups.dox
Some Doxygen groups do not belong to a specific header, they are used to
group multiple other sub-groups defined in other headers. For this
purpose we have the groups.dox file, there's no need to use device.h for
that.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 10:13:37 +02:00
Gerard Marull-Paretas 01fa3b0a7d doc: doxyfile: update to 1.9.4
Even though we use Doxygen 1.9.4, config file was never updated for it.
Changed made by `doxygen -u doc/zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 14:40:31 +09:00
Tomasz Moń fa86481692 doc: Verify write access in syscall example
Use z_user_to_copy() instead of directly writing to the user provided
pointer to validate that the user has write permission to underlying
memory location.

It is important to verify the memory not only for reads, but also for
writes, as otherwise the function can be abused by usermode code to
write to privileged read/write, unprivileged read-only memory partition.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-14 09:56:30 +02:00
Manuel Arguelles 31b3993d58 scripts: west: introduce Lauterbach TRACE32 runner
This patch introduces a West runner for flashing and debugging with
Lauterbach TRACE32 debuggers. The runner consists of a wrapper around
TRACE32 software, and allows a Zephyr board to execute a custom start-up
script (Practice Script) for the different commands supported, including
the ability to pass extra arguments from CMake. Is up to the board using
this runner to define the actions performed on each command.

The `debug` command launches TRACE32 GUI to allow debug the Zephyr
application, while the `flash` command hides the GUI and executes the
start-up script in a background process.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
2022-10-14 09:51:14 +02:00
Tomasz Moń 5c42b42116 doc: Add missing kconfig option prefix
Kconfig options have to be prefixed with :kconfig:option: in order to
appear as links in generated html output.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-13 13:16:06 -04:00
Gregory Shue cfcf630184 build: Overlay build vars expand ${ZEPHYR_<module>_MODULE_DIR}
Support referencing module directories by name in CONF_FILE,
OVERLAY_CONFIG, and DTC_OVERLAY_FILE so that projects can reference
overlay files in arbitrary modules.

Verified by passing all the following tests:
  ./scripts/twister -T tests/cmake/overlays/

Fixes #41830

Signed-off-by: Gregory Shue <gregory.shue@legrand.us>
2022-10-13 12:04:38 +02:00
Kyle Cooke 9892af1464 drivers: flash: soc_flash_nrf: Account for ticker in timeout
We have been encountering timeout issues when erasing large flash
 sections (before receiving an image via mcuboot) from this semaphore
 take:
5af0fbc2e3/drivers/flash/soc_flash_nrf_ticker.c (L225-L233)

I think this is because this constant is based on the time taken to erase
 the chip but doesn't take account of the fact it is being done by a
 ticker. If I understand correctly the ticker is a timeshare mechanism
 so the actual max erase time is some factor based on how much time is
 given to the task by the ticker.

This multiplies the max timeout by 1.5

Signed-off-by: Kyle Cooke <cookekyle97@gmail.com>
2022-10-13 16:06:08 +09:00
Stephanos Ioannidis 88af5964ed doc: Update to Zephyr SDK 0.15.1
Update the Getting Started Guide and the Zephyr SDK documentation to
point to the Zephyr SDK 0.15.1 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-10-12 19:23:32 -04:00
Gerard Marull-Paretas e42f58ec94 init: s/ARCH/EARLY, call it just before arch kernel init
The `ARCH` init level was added to solve a specific problem, call init
code (SYS_INIT/devices) before `z_cstart` in the `intel_adsp` platform.
The documentation claims it runs before `z_cstart`, but this is only
true if the SoC/arch takes care of calling:

```c
z_sys_init_run_level(_SYS_INIT_LEVEL_ARCH);
```

Which is only true for `intel_adsp` nowadays. So in practice, we now
have a platform specific init level. This patch proposes to do things in
a slightly different way. First, level name is renamed to `EARLY`, to
emphasize it runs in the early stage of the boot process. Then, it is
handled by the Kernel (inside `z_cstart()` before calling
`arch_kernel_init()`). This means that any platform can now use this
level. For `intel_adsp`, there should be no changes, other than
`gcov_static_init()` will be called before (I assume this will allow to
obtain coverage for code called in EARLY?).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-12 17:16:27 +09:00
Anas Nashif 8e99222114 doc: document ARCH initialization level
document new initialization level ARCH, used to init drivers/services
very early in the ARCH code and before z_cstart().

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-10-11 17:54:59 +02:00
Jamie McCrae b03de36195 doc: release: 3.3: Add mcumgr fs_mgmt workaround issue note
Adds a note about a workaround for an issue with mcumgr whereby a
file write command is sent to the same UART used for logging.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-11 11:15:02 +02:00
Tomasz Moń 0e5c717434 doc: Fix kernel data structures typos
Add missing colons to properly render C references.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-10 21:01:51 -04:00
Fabio Baltieri 34f74c96b0 ci: release: stop creating releases for RC tags
RC releases clutter the release page, there's no reason for keeping them
after the release is done, filter them out from the workflow so they
don't get created in the first place..

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-10-10 07:25:15 -07:00
Maureen Helm e73c363346 scripts: edtlib: gen_defines: Add model name macros based on compat
Follow up to 5b5aa6ebba adding model name
and existence macros for all compatibles of a node that match an entry
in vendor prefixes.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2022-10-07 11:48:02 -07:00
Fabio Baltieri 0da3b69b50 doc: release process: stop creating zephyr- prefixed tags
Drop the process step to create zephyr- prefixed tags.

This has been done so that autogenerated release files have a sensible
name, but GitHub started to automatically prefix the project names to
release artifacts anyway using HTTP headers, which now results in file
named like: zephyr-zephyr-v3.2.0.tar.gz, so the extra tags are now
causing the opposite problem.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-10-07 13:07:14 +00:00
Fabio Baltieri fa51b3db1c doc: release process: only use the overview for the release page
Change the release process documentation to only use the overview of the
release notes for GitHub releases rather than the full file.

The current instructions of copying the full content are broken (the
file does not fit anyway and the formatting is incompatible) and result
in a cluttered page anyway (the UI is not really meant for long release
notes).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-10-07 14:32:42 +02:00
Jamie McCrae a65fe8bc6a doc: release: 3.3: Add deprecated mcumgr Kconfig release note
Adds a release note about deprecated mcumgr Kconfig removal.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-06 16:34:58 +02:00
Jamie McCrae 100e0cf92f doc: mcumgr: Remove deprecated Kconfig tip
Removes a tip about using an old removed Kconfig value.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-06 16:34:58 +02:00
Cong Nguyen Huu 708fee8f61 doc: develop: test: update twister guide
add run steps guide for windows

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2022-10-06 07:23:17 -04:00
Juha Heiskanen 1e7e17de72 doc: lwm2m: Time series data document update
Added documentation for Time series data.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-05 14:23:32 +00:00
Daniel DeGrasse 50c7341070 doc: test: add documentation for twister sysbuild flag
Add sysbuild flag to twister supported options, with documentation on
how Kconfig and devicetree will be parsed

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-10-04 14:06:58 -04:00
Anders Storrø b9f776d2fb Bluetooth: Mesh: Shell: Clear CDB on local reset
Adds feature that clears the CDB entry on local reset.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-10-04 10:20:38 +00:00
Jamie McCrae cf3b10a2c0 doc: release: 3.3: Add working release notes file
Adds a base working release notes file for the Zephyr 3.3 release.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-04 11:21:23 +02:00
Tomasz Moń 800ec14cd3 doc: polling: Fix semaphore contested description
If a semaphore is contested, it is possible that the semaphore will no
longer be available when k_sem_take() is called, not k_sem_give().

Fix few typos and explicitly mention poll events instead of "they".

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2022-10-04 10:36:45 +02:00
Anders Storrø bea54c5691 Bluetooth: Mesh: Shell: Make prov features dynamic
Alters several provisioning related features to allow commands to be
functional with application defined Provisioning properties &
capabilities.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-10-04 10:33:30 +02:00
Juha Heiskanen 8279489aee net: lwm2m: RD Client update registration timeout
Renamed LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT.

Changed reported event type for registration timeout to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT from
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE.
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE should be only
reported case when server reject by response registration.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-03 10:20:13 +02:00
Erwan Gouriou bd6a25a661 doc: porting: shields: Provide guidelines for nodelabel
In order to avoid device definitions conflicts when compiling shields
description with boards embedding similar devices, nodelabels of devices
in shield's devicetree file should differ from the nodelabels used in
board's devicetree file.
The form to be used was discussed in #50040 and agreed to be as
<device>_<shield_name>.

Update shields documentation to make it an explicit rule.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-03 10:16:57 +02:00
Erwan Gouriou 656382e7a4 doc: porting: shields: Update instructions for nodelabel definitions
Update requirements regarding board connectors compatibility now that
dtc versions prior to 1.4.2 can't be used anymore (current required
version is 1.4.6).

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-10-03 10:16:57 +02:00
Gerard Marull-Paretas fdea3c9a44 devicetree: add DT(_INST)_FOREACH_PROP_ELEM_SEP(_VARGS)
Add a new set of helpers for expanding property entries with a
separator. These macros complement DT(_INST)FOREACH_PROP_ELEM(_VARGS) by
adding the capability to expand with a custom separator between property
entries. This allows, in some cases, to re-use existing macros (e.g.
DT_PROP_BY_IDX) without creating an auxiliary macro that just appends a
separator. Example:

```dts
n: node {
	...
	my-gpios = <&gpioa 0 GPIO_ACTIVE_HIGH>,
		   <&gpiob 1 GPIO_ACTIVE_HIGH>;
};
```

Before:

```c
 #define GPIO_DT_SPEC_BY_IDX_AND_COMMA(node_id, prop, idx) \
	GPIO_DT_SPEC_BY_IDX(node_id, prop, idx),

struct gpio_dt_spec specs[] = {
	DT_FOREACH_PROP_ELEM(DT_NODELABEL(n), my_gpios,
			     GPIO_DT_SPEC_BY_IDX_AND_COMMA)
};
```

After:

```c
struct gpio_dt_spec specs[] = {
	DT_FOREACH_PROP_ELEM_SEP(DT_NODELABEL(n), my_gpios,
				 GPIO_DT_SPEC_BY_IDX, (,))
};
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-03 10:11:18 +02:00
Gerard Marull-Paretas 1f98c24fc2 doc: dts: macros.bnf: add missing DT_FOREACH_PROP_ELEM entries
Entries for DT_FOREACH_PROP_ELEM_(VARGS) internal helpers were missing.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-03 10:11:18 +02:00
Fabio Baltieri 896935066b doc: conf: add release version 3.2.0
Add release version 3.2.0 to the documentation version list.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-09-30 11:31:32 -05:00