Add advertising option for undirected one-time advertising, and
directed advertising using identity, and peer direct is RPA option.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Allow calling bt_le_adv_start with no connection object available
when not the option BT_LE_ADV_OPT_ONE_TIME has been set. In this
case the advertiser will be restarted once there is a connectable
advertiser object available.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
The zephyr,code-parition was set incorrectly to SRAM. Set it to the
slot0 partition, so that enabling BOOTLOADER_MCUBOOT will place the code
at the proper address.
Signed-off-by: David Brown <david.brown@linaro.org>
The partition table in DTS are offsets within the flash device, not
absolute addresses. The flash doesn't start at 0 on the lpc55s6x
(because of the secure execution bit), but the offsets in the partition
table should.
Signed-off-by: David Brown <david.brown@linaro.org>
Current implementation of net_ipv6_send_rs() uses
net_ipv6_addr_create_ll_allnodes_mcast() for creating RS packet.
As result we send RS packet to all-nodes destination [FF02::1],
but RFC4291 requires all-routers destination [FF02::2] for RS packets.
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Instead of replacing of copyright year with the new one,
necessary to add new to the existing one
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
To improve Zephyr tests, I think that it will necessary to have test,
that verifies a child thread inherits resource pool assignment
of their parent.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Add new semaphore tests, to test important features like:
-count limit
-semaphore define at compile time
-mutual exclusion
I decided to add new test cases that can improve Zephyr
semaphore testing infrastructure.
For each new test added informative Doxygen description.
New test cases test next important requirements:
1. test_k_sem_correct_count_limit()
That test verifies that semaphore can be taken correctly by a thread,
and taking of semaphore decrements its count as expected.
2. test_k_sem_define()
Explicit ans standalone test to test semaphore can be defined
compile time.
3. test_sem_queue_mutual_exclusion
Test that our system can provide a traditional counting
semaphore abstraction for mutual exclusion.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
The DT_INST_* macros for PWM may not exactly point to the hardware
instance (e.g. DT_INST_0 may not point to PWM0). So use the node
labels for a more precise match.
Fixes#26782
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
After commit 8a6b02b5bf ("lib/os/heap: some code simplification in
sys_heap_aligned_alloc()") it is no longer required to have a "big"
heap for aligned allocations to work on 32-bit targets. While the
natural alignment for returned memory has an offset of 4 within a chunk
unit due to the smaller header size, returning to a chunkid from a
memory pointer with an offset of 8 will fall back onto the proper chunk
number once the 4 is substracted and then divided by 8.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
The code is doing a split in split_alloc(), adding the leftover to the
free list, then splitting the suffix away in sys_heap_aligned_alloc(),
removing the former leftover from the free list, combining it with the
suffix and finally adding the combined chunk back to the free list.
Instead, let's have each allocator do their own splitting only once by
moving the split_alloc() processing upstream rather than downstream.
This also allows for the "used" flag to be set only once at the end
rather than being overwritten along the way.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Instead of limiting the excess split-off to sufficiently large chunks
in split_alloc(), let's allow normal allocations to create "solo free
headers" just like with aligned allocations. There is no point leaving
them in the allocated chunk if the user didn't ask for it. Doing so
makes them eligible for merging at the next opportunity and potentially
reusable sooner.
Also make the validation code aware of them.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
One fundamental validation criteria is to never have consecutive free
chunks. If that ever happens we failed to merge them. That means a free
chunk must always be surrounded by used chunks.
It is a pain to extend valid_chunk() with new rules as it is.
So a VALIDATE() macro is introduced to make things easier to work with.
It also allows for isolating each test, possibly making VALIDATE() into
__ASSERT() to determine exactly which test is tripping when debugging.
Finally, because of that new validation rule, sys_heap_validate() must
be modified so not to use valid_chunk() while it is flipping all the
"used" flags. So let's run valid_chunk() up front before alterating
chunk headers.
Now sys_heap_validate() has become justifiably more expensive and a few
emulated targets are about to bust the tests/lib/heap test timeout. So
bump the timeout as well.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This makes the code cleaner wrt bucket_idx() usage on chunks for which
solo_free_header() is true. In such case the bucket_idx() computation
is useless, and potentially undefined anyway.
In the same vain, move the clearing of the used flag out of
free_chunks() as only one of its callers actually needs that.
Makes free_chunks singular as there is only one chunk (potentially
spanning multiple chunk units) to free.
Also some cosmetic changes for better code uniformity.
No functional changes.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Now that PCIE and PCIE_ENDPOINT are made independent,
remove unnecessary CONFIG_PCIE=y from defconfig
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
With this refactoring of pcie directory, RC drivers are placed under
host/ directory, EP drivers are placed under endpoint/ directory and
they are completely independent of each other.
Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
The p_memsz field which indicates the size of a segment in memory
isn't always a multiple of 8. Remove the assert and add padding if
necessary. Without this change it's not possible to generate EFI
binaries out of all samples & tests in the tree.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Added a link to IEEE GET program web page to suggest
an option of downloading the specification to the users.
Signed-off-by: Uma Praseeda <uma.praseeda@nordicsemi.no>
Zephyr applications will always use the VTOR register when it is
available on the CPU and the register will always be configured
to point to applications vector table during startup.
SW_VECTOR_RELAY_CLIENT is meant to be used only on baseline ARM cores.
SW_VECTOR_RELAY is intended to be used only by the bootloader.
The bootloader may configure the VTOR to point to the relay table
right before chain-loading the application.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Select either SW_VECTOR_RELAY or SW_VECTOR_RELAY_CLIENT
at the time.
Removed #ifdef-ry in irq_relay.S as SW_VECTOR_RELAY was
refined so it became reserved for the bootloader and it
conditionally includes irq_relay.S for compilation.
See SHA #fde3116f1981cf152aadc2266c66f8687ea9f764
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
This patch allows the `SW_VECTOR_RELAY` and
`SW_VECTOR_RELAY_CLIENT` pair to be
enabled on the ARMv7-M and ARMv8-M architectures
and covers all additional interrupt vectors.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Now that we have finished migrating CI from shippable to buildkite,
update the status badge on README.rst.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
`addrlen` parameter is updated on each `recvfrom` call, indicating the
actual address length returned. In case both, IPv4 and IPv6 are used on
different sockets (i. e. on regular LWM2M socket and FOTA socket), the
returned address length will differ.
In case `from_addr_len` is not reinitialized on each iteration, the
value stored in the `from_addr_len` variable will eventually indicate
the smaller IPv4 address size, therefore resulting in a failure in a
consecutive call on an IPv6 socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Although LwM2M engine uses cooperative threads, the internal `send()`
implementation might trigger context switch when it calls a kernel
function, therefore resulting in `send()` call being entered from both
the LwM2M thread and the retransmit work.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added implementation to acquire and initialize auxiliary
channel instance on use of periodic advertising.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Due to issue #20589 DEBUG_OPTIMIZATIONS were enabled for the rv32m1 vega
ri5cy vega config. This is now resolved after making sure the spi tx
buffer is always initialized and the rv32m1 ri5cy core stack properly
initialized, so this workaround can be removed.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The optional SOC_CONTEXT carries processor state registers that need to
be initialized properly to avoid uninitialized memory read as processor
state.
In particular on the RV32M1 the extra soc context stores a state for
special loop instructions, and loading non zero values will have the
core assume it is in a loop.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Saving an extended context for RV32M1 should be optional, but it was
broken due to the offset calculation not taking the according option
into account.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The Itsybitsy exposes the SWD pins on an unpopulated header on the end
of the board. Add a OpenOCD config and document how to use it.
Signed-off-by: Michael Hope <mlhx@google.com>
The antenna control GPIO was incorrectly initialized to active. This
is unnecessary since the HAL will activate the antenna switch when the
chip enters an active state.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
The new sx1276 pin configuration helpers can be used by the sx126x
driver as well. Move them to sx126xx_common.{c,h} to facilitate reuse.
Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
The mcux pwm drivers use period cycles as a divisor to calculate the pwm
frequency in hertz. This operation can underflow easily with large
values of period cycles relative to the pwm clock source, causing the
driver to return an error code and the pwm_api test to fail.
Updates the test to use the smaller set of period and pulse cycles on
kw41z-based boards, fixing the test for the frdm_kw41z board.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
When CONFIG_BT_GATT_NOTIFY_MULTIPLE is selected and the remote has
enabled support for using its procedure data can sometimes not fit
into the buffer since the multiple variant has a bigger header, so
instead of failing immediatelly this attempts to send the data using
the legacy PDU instead so those using bt_gatt_get_mtu - 3 can still be
sent.
Fixes#26106
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
After Zephyr 2.3.0 release system uses more RAM. This update
samr21_xpro configuration to allow echo_client be equal to
echo_server configs and remove unnecessary definitions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
After Zephyr 2.3.0 release system uses more RAM. This update
samr21_xpro configuration to allow echo_server run again and
remove unnecessary definitions.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The sam4e_xpro and sam_v71_xult configs are unnecessary. Now
atmel_rf2xx shield will complement all necessary configuration.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The sam4s_xplained and sam_v71_xult configs are unnecessary. Now
atmel_rf2xx shield will complement all necessary configuration.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
The Atmel RF2xx module shield is a generic solution to enable any Atmel
AT86RF2xx IEEE 802.15.4 transceiver. This module enables IEEE 802.15.4
RF2xx Zephyr driver.
The Atmel RF2xx module shield enables any board with an Atmel Xplained,
Xplained-Pro, Arduino or MikroBus expansion header to connect to
networks operation with IEEE 802.15.4, OpenThread or any other stack
based on this media type.
The Atmel RF2xx module is configured to allow interoperate with other
medias like Ethernet. User need configure network stack properlly.
Fixes#26259.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add arduino uno r3 connectors definitions. This enable hardware related
GPIOs and drivers to drive external shields.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add xplained-pro connectors definitions. This enable hardware related
GPIOs and drivers to drive external shields.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
Add xplained-pro connectors definitions. This enable hardware related
GPIOs and drivers to drive external shields.
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>