Commit Graph

71456 Commits

Author SHA1 Message Date
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
Jamie McCrae 7bab5c1b75 mgmt: mcumgr: transport: smp_bt: Fix deadlock on disconnect with data
This fixes an issue with the bluetooth transport whereby if a device
drops the connection prior to receiving all the output data it could
cause a deadlock.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 17:37:17 +02:00
Andrei Emeltchenko 42b6af2ee8 soc: raptor_lake: Cleanup CMakeLists
Cleanup CMakeLists fixing error message:
...
No SOURCES given to Zephyr library: soc__x86__raptor_lake
...

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2022-10-25 09:50:15 -05:00
Henrik Brix Andersen 30c7d31fde samples: drivers: can: babbling: set CAN-FD mode if requested
Set the CAN controller to CAN-FD mode before attempting to send FD format
frames.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +02:00
Henrik Brix Andersen c49011442a tests: drivers: can: api: test sending CAN-FD frame in non-FD mode
Add test case for verifying that CAN-FD format frames cannot be sent in
non-FD mode.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-10-25 16:32:10 +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
Henrik Brix Andersen a9c7c58345 canbus: isotp: avoid reusing CAN controller driver API definitions
Avoid reusing the CAN_EXTENDED_IDENTIFIER and CAN_STANDARD_IDENTIFIER
definitions from the CAN controller driver API for ISO-TP structure members
as this is a fragile design.

The ISO-TP layer must be responsible for its own definitions where
needed. Replace the "id_type" ISO-TP struct member with a well-known
abbreviated "ide" bit (Identifier Extension Bit) struct member.

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
Jamie McCrae ff624a186c samples: mgmt: mcumgr: smp_svr: Fix stack overflow with bt
Fixes an issue with a possible stack overflow when using the
Bluetooth transport for large mcumgr transfer, the issue was caused
by moving to a dedicated workqueue but not moving the enlarged
system workqueue overlay to the new smp workqueue.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2022-10-25 16:25:13 +02:00
Dominik Ermel 8e0464ef68 mgmt/mcumgr/lib: Remove zephyr_ and _impl_ from function names
The commit removes zephyr_ and _impl_ from function names in image
management group, and renames img_mgmt_impl.* source files to
img_mgmt_priv and merges img_mgmt_priv.h headers.
The zephyr_ and _impl_ have been removed because they no longer make
sense, as the mcugr is internal part of Zephyr, and removal makes
function names shorter.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-25 16:24:18 +02:00
Dominik Ermel 552217cd68 mgmt/mcumgr/lib: Remove stubbed logging calls from img group
The commit removes some leftover code from feature that has been
supposed to log image upload events with use of SMP, but has never
been actually implemented.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-10-25 16:24:18 +02:00
Jeremy Bettis a84c271e58 twister: Fix OUTPUT: blank lines after test end
When running twister -vv many blank lines would be logged.

Fix handing of empty lines from the reader thread. Real blank likes will
be b"\n" not b"".

Change open call to use with, and logger to use %s to fix pylint
warnings.

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2022-10-25 09:28:15 -04:00
Johan Hedberg 99f9512fec boards: x86: rpl_crb: Remove redundant HPET enabling
The HPET timer already defaults to 'y', so it's unnecessary to enable it
in the board configuration.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2022-10-25 14:10:50 +03:00
Sjors Hettinga 8a4734d45c net: ip: Add unit test for the IP/UDP/TCP checksum
Validate the faster IP checksum algorithm against the straightforward
implemation using a variety of packet length and contents.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2022-10-25 12:46:11 +02:00
Sjors Hettinga 14cb6cb419 net: ip: Speed up the IP/UDP/TCP checksum calculation
Instead of doing a 1-complement addition for every 16-bit word, process
32-bit words and handle the 1-complement addition at the end.

This work is a colaboration with Diego Pino García. The algorithm is
inspired by:
https://blogs.igalia.com/dpino/2018/06/14/fast-checksum-computation/

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2022-10-25 12:46:11 +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
Nicolas Pitre 74fbf8edf5 Revert "riscv: PMP-based stack guard is incompatible with stack sentinel"
This reverts commit a7b5d606c7.

The assumption behind that commit was wrong. The software-based stack
sentinel writes to the very bottom of the _writable_ stack area i.e.
right next to the actual PMP based guard area. So they are compatible.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-10-25 10:53:34 +02:00
Kumar Gala d60c62e457 arch: arm64: Convert to CONFIG_MP_MAX_NUM_CPUS
Convert CONFIG_MP_NUM_CPUS to CONFIG_MP_MAX_NUM_CPUS as we work on
phasing out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-25 10:52:34 +02:00
Kumar Gala 3369997dd2 arch: riscv: Convert to CONFIG_MP_MAX_NUM_CPUS
Convert CONFIG_MP_NUM_CPUS to CONFIG_MP_MAX_NUM_CPUS as we work on
phasing out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-25 10:52:25 +02:00
Kumar Gala a12b7734de interrupt_controller: gic: Rework usage of CONFIG_MP_NUM_CPUS
Replace usage of CONFIG_MP_NUM_CPUS with CONFIG_MP_MAX_NUM_CPUS for
init and declaration as we phase out CONFIG_MP_NUM_CPUS usage.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-25 10:52:17 +02:00
Ming Shao 1402d0d3ab log_link: fix the log_link test failure on adsp boards
The log_link tests are meant to work with 2 mock log backends.
But Intel ADSP platform has an extra default backend named
"log_backend_adsp" when CONFIG_LOG_BACKEND_ADSP=y, which will
mess things up.

Fix it by disabling the default backend.

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-10-25 10:52:00 +02:00
Keith Packard fc3f1480c5 arch/arc: Add -mcpu flag to TOOLCHAIN_LD_FLAGS
Make sure the linker knows what the target is, in case it needs to find
additional target-specific libraries (like picolibc).

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-10-25 10:51:46 +02:00
Théo Battrel 2d1d309936 Bluetooth: Move out `BT_ASSERT` of `common/log.h`
Macro that was defined in the `common/log.h` has been moved to the newly
created `common/assert.h` file.

Files that were using those macro has been updated consequently. Also, the
include of `common/log.h` has been removed of files that were actually not
using any logging methods.

Some `#include "common/log.h"` have been removed. Those were required
before when including `hal/debug.h`. With this change, `hal/debug.h` no
longer has this requirement, because the replacement, `common/assert.h`
includes what it uses.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-10-25 10:48:17 +02:00
Théo Battrel fdd0a26348 Bluetooth: Remove `BT_HEXDUMP_DBG`
Replace unnecessary `BT_HEXDUMP_DBG` with `LOG_HEXDUMP_DBG`.

`BT_HEXDUMP_DBG` did an extra cast to `const uint8_t *` on its first
argument. This was probably the reason it was introduced. But the
current definition of `LOG_HEXDUMP_DBG` does this cast for us.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2022-10-25 10:48:17 +02:00
Ahmed Moheb b8a957a0eb bluetooth: host: id: Fix copy BT_HCI_OP_VS_READ_STATIC_ADDRS response
Fix copying addresses returned in response to command
BT_HCI_OP_VS_READ_STATIC_ADDRS for reading controller static addresses.
The loop was iterating only over the destination locations while
keeping the source address pointing to the first location of
the command response.

Signed-off-by: Ahmed Moheb <ahmed.moheb@nordicsemi.no>
2022-10-25 10:03:27 +03:00
Mariusz Skamra 0b825d0ee4 Bluetooth: audio: csis: Fix bt_conn_foreach function parameter
Exclude non-LE connections when sending notifications.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2022-10-25 09:53:23 +03:00
Kumar Gala c73b0e28a3 arch: x86: Convert to CONFIG_MP_MAX_NUM_CPUS
Convert CONFIG_MP_NUM_CPUS to CONFIG_MP_MAX_NUM_CPUS as we work on
phasing out CONFIG_MP_NUM_CPUS.

Signed-off-by: Kumar Gala <kumar.gala@intel.com>
2022-10-25 09:52:17 +03:00
Yinfang Wang b2fe7045d1 soc: x86: Add Raptor Lake SoC definition
Add a basic definition for the Raptor Lake SoC.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-10-25 09:51:37 +03:00
Yinfang Wang ba99952147 boards: x86: Add rpl_crb board definition
Add initial definition for the Raptor Lake CRB board.

Signed-off-by: Yinfang Wang <yinfang.wang@intel.com>
2022-10-25 09:51:37 +03:00
TOKITA Hiroshi 88cf0ad506 boards: arduino_nano_33_ble: add support for blackmagicprobe
Add support to debugging and flashing with the blackmagicprobe.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2022-10-24 18:37:35 -05:00
Markus Swarowsky 1fb23b6509 west: nrfjprog: Allow flashing UICR without erase
Currently, it is not possible to use a normal flash command to flash two
hex files that contain data in the UICR region, even though these
data don't conflict with each other.
However, that is not a technical limitation of the device, but of the
nrfjprog runner as it fails as soon as the hex file contained UICR data
and there was no --force/--erase/--recover used.
That approach was used in the past as program operation was used
without --verify, but as this option was added a while ago it is an
unnecessary limitation.

If the UICR wasn't erased before programming, the verify of the program
operation will now fail, so giving the user a warning in this case that
the hex files contain data in the UICR will still give the user a hint
of what might have caused the failing verify.
Additionally, it enables partial programming of the UICR without the
use of the --force option.

Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
2022-10-24 21:35:24 +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
Fabio Baltieri f5b3bdc60d ci: release: drop "v" prefix from release names
Documentation page says release should be named without the "v" prefix,
make the CI do that.

Link: https://docs.zephyrproject.org/latest/project/release_process.html#tagging
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-10-24 11:17:00 -04:00
Peter Mitsis 6c1e8efa09 ztest: Make cpu hold time configurable
3000 milliseconds may not always be enough time for all 1cpu type
tests to finish on all platforms. Making the CPU hold time
configurable allows for additional flexibility.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2022-10-24 11:15:00 -04:00
Robert Lubos caab8cb1b3 net: lwm2m: Don't assume time_t data type size
sizeof(time_t) can vary depending on architecture/libc being in use,
therefore LwM2M should not assume time_t data type size. Instead of
using magic numbers, use a proper sizeof.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-10-24 16:13:40 +03:00
Piotr Węgliński 08eb361846 ci: twisterlib: Modify the overlay regular expression
Modify the regex used to merge overlays specified for
test samples in twister tests.
Overlays without any prefixes will be merged and passed to cmake.
Overlays with prefixes won't be merged but passed to cmake as they are.

Signed-off-by: Piotr Węgliński <piotr.weglinski@nordicsemi.no>
2022-10-24 08:26:17 -04:00
Gerard Marull-Paretas c022dd7756 drivers: mipi_dsi: mcux: add missing soc.h
It looks like this platform is using soc.h to declare some display APIs,
imxrt_pre/post_init_display_interface(). This likely deserves a better
design, but for now let's fix compiler warnings.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-24 12:44:57 +02:00
Gerard Marull-Paretas eafc6e7851 drivers: display: rm68200: add missing kernel.h include
Kernel API was being used (k_sleep) without including Kernel headers.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-24 12:44:57 +02:00
Emil Gydesen d5499e6b87 Bluetooth: Audio: Add CAP stream
Add a new stream object, bt_cap_stream, which is an extension
of the BAP bt_audio_stream. The purpose of this stream
is that we can extend the data stored in the BAP stream for
CAP usage, as well as making it more explicit what type
of stream should be used for CAP.

The callbacks will be extended for CAP in specific use cases,
e.g. when starting one or more unicast audio streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen 7a1e827a8b Bluetooth: Audio: Make CAP acceptor more explicit
Remove the generic CONFIG_BT_CAP and CONFIG_BT_DEBUG_CAP
and only use Kconfigs specific to the individual roles.

This also includes renaming cap.c to cap_acceptor.c.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen ce05cb5c2c Bluetooth: Audio: CAP initiator discover CSIS
The CAP initiator will now discover, or return a
known, CSIS instance included by CAS (if any).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen ed11295cf6 Bluetooth: Audio: CSIS client register multiple callbacks
Change the CSIS client callback to a slist so that
multiple applications can register it. An example of
such a case is that both the application and CAP initiator
want to get the callbacks.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen 2e42105df0 Bluetooth: Audio: CSIS: Refactor CSIS client discover API
The API will now take a simple bt_conn instead of a
set member struct. This is due to the set member struct
being moved to the stack. The reasoning for this is that
having the struct in the stack, rather than in the
application, the stack itself can initiate the CSIS
discovery which is useful if the remote device
has a service that includes a CSIS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen ee70dffc6d Bluetooth: Audio: CAP shell implementations
Implements the CAP shell functionality.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen 7a49de12af Bluetooth: Audio: Implement CAP initiator discover
This is the primary discovery of the CAS on the remote device,
but does not include discovering the (optional) CSIS.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Emil Gydesen 760177b1be Bluetooth: Audio: Add CAP initiator skeleton
Add skeleton for the expected APIs and
implementation. May be subject to change as
implementation progresses.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:39:11 +02:00
Juha Heiskanen 4bcc880670 net: lwm2m: LwM2M engine time API update
Updated lwm2m_enigen_set/get_time API for support time_t.

Updated LwM2M engine set/get resource time to time resource support
time_t and uint32_t input.

LwM2M engine put and get time API update to use time_t.

Time series data cache entry have own type for time resource.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-24 10:39:03 +02:00
Juha Heiskanen e1e2228e9c net: lwm2m: LwM2M object time resource update
Updated Timestamp resource default buffer type to time_t.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-10-24 10:39:03 +02:00
Emil Gydesen 31bf99cbd2 Bluetooth: ISO: Change ISO seq_num to 16-bit
The sequence number is by the core spec defined as 16-bit.
We had implemented a workaround for the wrapping of the
sequence number, which required the type to be larger
than 16-bit (32-bit).

However, since the definition of the sequence number,
and the use of, is poorly defined by the core spec, we
are reverting this workaround and reducing the sequence
number to 16-bit again. This way it is more in line
with the core spec, as well as more intuitive given the
other uses for the sequence number.

This change moves the responsibility of using the
right value to the upper layers, as the stack can
and will no longer provide any guarantees.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-10-24 10:38:49 +02:00