MCUboot support flash write-bock-size up to BOOT_MAX_ALIGN.
This patch takes this into account.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Some parts of subsys/dfu/boot code are re-implementations of
what is implemented in the MCUBoot repository.
Mcuboot's repository already provide implementation of function
required for application for interact with the MCUboot.
This patch introduces new MCUBOOT_BOOTUTIL module which covers
common code which is used in the bootloader and the chainnloaded
application.
dfu/boot: use MCUBoot's source code
Module was reworked so it start using MCUBoot's
bootutil_public API instead of copied code.
Reworked boot_is_img_confirmed() used MCUBoot's API
for determine image_ok flag.
mcuboot_shell switchd to use MCUboot's boot_read_swap_state_by_id()
This is MCUBoot function, use it for avoid linking conflict.
test/subsys/mcuboot: fix `test_write_confirm`
dfu/boot library was reworked so it uses MCUboot's bootutil_public
library whenever it can.
The library required that image was marked as copy-done before it
can be pending.
This patch adds such mark which fixes the test.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add a check to stop a multicast address to be registered multiple times.
This can happen if the application is using net_if_ipv6_maddr_add()
directly.
Tested on the existing bluetooth/ipsp sample:
<wrn> net_if: Multicast address ff02::1 is is already registered.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
The mesh settings.c module is a giant piece of code responsible for
storing the mesh stack configuration. Such approach makes it difficult
to control the data to be stored, breaks the stack modules'
encapsulation by forcing them to reveal the internal kitchen, which
leads to unpleasant issues such as #19799.
This commit moves the responsibility of storing the configuration
to corresponding modules while keeping control of the moment of storing
the configuration and of starting the stack after the settingss loading
is completed.
This doesn't introduce any abstraction between the mesh settings.c and
other modules as it will add more complexity and overhead than necessary
for the actual task.
Fixes#19850
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
As FPU enalbed the printf code size is changed,
so increase main stack size to make test pass on NXP RT platforms
Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
Make sure that received and out-of-order TCP segments are queued
until we receive proper segments.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adding acrn configurations specific to the platform
on which acrn boots zephyr, Only the EHL specifc
configurations for now. Keeping the HW clock frequency to
1900Mhz for EHL and using the new APIc timer driver.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Added gpio_loopback to indicate that test requires pins to be
shorten. This allows to filter out tests on setup which does
not have pin setup.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The fs_seek and fs_tell are expected to return -ENOTUSP if file system
driver lacks implementation of said funcions.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Get rid of weak functions adding a new API to register an object to
receive notifications when the system changes power state.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit adds the board definition files
needed to support the Arduino Nano BLE 33.
Tested: the following have been verified with
my logic analyzer.
* Serial peripherals (UART, I2C, SPI)
* USB
* RTC
Untested:
* PWM. In theory it should work but I don't
have a good enough logic analyzer to test this
* RTC's. The board doesn't have a backup battery.
The peripherals are enabled for modding another
battery in the device tree.
Signed-off-by: Jefferson Lee <jeffersonlee2000@gmail.com>
This function was designed to support the logging infrastructure's
need to copy values from va_list structures. It did not meet that
need, since some values need to be changed based on additional data
that is only available when the complete format specification is
examined. Remove the function as unnecessary.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
checkpatch wants parameters to IS_ENABLED() to be Kconfig constants,
i.e. ones that start with CONFIG_. Avoid the whinage.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
TC_PRINTF doesn't append a newline, so the skip messages sometimes ran
into the test result message.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The net_timeout structure is documented to exist because of behavior
that is no longer true, i.e. that `k_delayed_work_submit()` supports
only delays up to INT32_MAX milliseconds. Nonetheless, use of 32-bit
timestamps within the work handlers mean the restriction is still
present.
This infrastructure is currently used for two timers with long
durations:
* address for IPv6 addresses
* prefix for IPv6 prefixes
The handling of rollover was subtly different between these: address
wraps reset the start time while prefix wraps did not.
The calculation of remaining time in ipv6_nbr was incorrect when the
original requested time in seconds was a multiple of
NET_TIMEOUT_MAX_VALUE: the remainder value would be zero while the
wrap counter was positive, causing the calculation to indicate no time
remained.
The maximum value was set to allow a 100 ms latency between elapse of
the deadline and assessment of a given timer, but detection of
rollover assumed that the captured time in the work handler was
precisely the expected deadline, which is unlikely to be true. Use of
the shared system work queue also risks observed latency exceeding 100
ms. These calculations could produce delays to next event that
exceeded the maximum delay, which introduced special cases.
Refactor so all operations that use this structure are encapsulated
into API that is documented and has a full-coverage unit test. Switch
to the standard mechanism of detecting completed deadlines by
calculating the signed difference between the deadline and the current
time, which eliminates some special cases.
Uniformly rely on the scanning the set of timers to determine the next
deadline, rather than assuming that the most recent update is always
next.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Skip the memory mapping execution test case when code coverage enabled
for qemu_x86_64 platform. See issue #30434.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
Add test cases for checking the previously untested `net_buf_push_*`
functions in terms of the new `net_buf_remove_*` functions.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
The "sentinel" variant of this test runs the same code, but enables
the stack sentinel feature. Inexplicably, it's also disabling
TICKLESS_KERNEL, forcing a timer interrupt at every tick boundary.
That doesn't seem to be required for any test functionality I can see.
And worse, by changing that setting without adjusting the tick rate,
it runs afoul of more modern platforms which were designed with
tickless operation in mind. Specifically, the intel_adsp platforms
have a default tick rate of 50 kHz, which is just too fast for
reasonable operation. It leaves almost no time available for
application code and something falls behind and fails.
Just remove it.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If the new size amounts to the same number of chunks then:
- If right-chunk is used then we needlessly allocate new memory and
copy data over.
- If right-chunk is free then we attempt to split it with a zero size
which corrupts the prev/next list.
Make sure this case is properly handled and add a test for it.
While at it, let's simplify the code somewhat as well.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Leftover from old renaming commits. This function is not private and
should not start with underscore.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Inside the semaphore tests, there are mis-matched pair of timing
start/stop calls. One called start without calling stop, another
one calling stop twice. So fix them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add some error test cases for spinlock, include:
1.Validate indentical spinlock cannot be used recursively.
2.Validate unlocking incorrect spinlock will trigger assertion.
3.Validate releasing incorrect spinlock will trigger assertion.
Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
For a while now, we've had two APIC drivers. The older was preserved
initially as the new (much smaller, "new style") code didn't have
support for Quark interrupt handling. But that's long dead now. Just
remove it.
Note that this migrates the one board using this driver (acrn) to
CONFIG_APIC_TIMER instead.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add some testcases for stack source code coverage,
and add a fatal handler function to hand the error
by null parameter.
Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
The dma test applications for MEM-to-MEM transfers are modified
to run on the stm32l476 with a DMA.
The CONFIG_DMA_LOOP_TRANSFER_DRV_NAME is either DMA_1 or DMA_2
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 7 for DMA_1
CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 1 to 5 for DMA_2
Signed-off-by: Francois Ramu <francois.ramu@st.com>
The dma test applications for MEM-to-MEM transfers are modified
to run on the stm32wb55 with a DMAMUX
loop_transfer on any CONFIG_DMA_LOOP_TRANSFER_CHANNEL_NR from 0 to 13
chan_blen_trasnfer on CONFIG_DMA_TRANSFER_CHANNEL_NR_0 from 0 to 13
and on CONFIG_DMA_TRANSFER_CHANNEL_NR_1 from 0 to 13
Signed-off-by: Francois Ramu <francois.ramu@st.com>
It adds flexibility to test different dma channels
The chan_blen_transfer is modified
like the loop_transfer application to support stm32xx devices
with dma and/or dmamux.
On the stm32 devices, the first dma channel is 1.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This adds support for emulated GPIO (CONFIG_GPIO_EMUL=y) and
additionally allows BOARD=native_posix and
BOARD=native_posix_64 to run the gpio_api_1pin test suite.
Fixes#26477
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
This adds support for emmulated GPIO (CONFIG_GPIO_EMUL=y) and
additionally allows BOARD=native_posix and
BOARD=native_posix_64 to run the gpio_basic_api test suite.
Fixes#26477
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>