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>
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>
Cleanup CMakeLists fixing error message:
...
No SOURCES given to Zephyr library: soc__x86__raptor_lake
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>