Add a single counter API test case (not using callbacks) running in
user mode. Convert the existing test setup to use semaphores for
counting events to be able to utilize the same test setup and teardown
functionality in both user and supervisor mode tests.
Most of the counter API basic test suite still needs to run in
supervisor mode due the use of callback functions.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
With removal of NFFS from Zaphyr it would be no longer possible to
test multifs with NFFS and LittleFS will be now used instead.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This patch is for suppress CI Kconfig issues caused
by temporary dead code in this test-suie.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Patch introduce references to LittleFS instead of NFFS where it
was suitable. In other places NFFS mentions were removed
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Replaced NFFS mentions by LittleFS in all <board>.dts comments
to storage partitions.
Replaced NFFS by LittleFS in a few boards documentation.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
NFFS support repository reference was removed
as unneeded anymore by removal of NFFS support in the codebase.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
NFFS is removed as it has serious bugs (by design) which haven't
been resolved since extended range of time.
One of most serious issues bunch were described here:
https://github.com/apache/mynewt-nffs/issues/10
Since lack of support NFFS upsterem it doesn't make sense to keep
it in zephyr.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
As multi-fs testsuite uses FS and NFFS it must be disabled
as NFFS was removed. Further thin test should be reworked to use
litlefs in place of NFFS.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
NFFS configuration was removed.
Added working configuration for nRF boards.
Documentation aligned to fact that littlefs is supported.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This patch addapt the sample to using LittleFS as the FS back-end.
After NFFS will be removed this ensures mcumgr FS command functionality.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
smp_svr cleanu
settings nffs targeted test were removed.
the file function settings suite was disabled as need some
rework in order to use litlefs.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
According to NRF product specifications the smallest write unit is
32-bits. Added parameter 'CONFIG_EMULATE_ONE_BYTE_WRITE_ACCESS'
which allows one byte flash write using more complex operation.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Toggling this symbol probably doesn't make sense, because the
architecture is already known when Kconfig runs.
SCHED_IPI_SUPPORTED is enabled through being selected by the ARC_CONNECT
(maybe that one shouldn't be configurable either) and X86_64 symbols.
Note that it's not possible to disable the symbol when it's being
selected, so trying to turn it off on e.g. X86_64 won't work either.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Grouped all nRF driver sub-option under SOC_FLASH_NRF
menuconfig.
This makes menuconfig cleaner.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Create new instances of SPI using single STM32_SPI_INIT() macro
invocation, similar as it is done for STM32 UART driver. Add also
implicit '#ifdef CONFIG_SPI_id' check, so it further reduces required
lines of code for each SPI instance definition.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
To facilitate extending the generated reports without having to
patch this file, leverage generator-expression so that
dependencies can be added to the 'zephyr_property_target' target.
Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Some architectures require more space on the stack when running samples
and tests while the philosopher test (cmsis_rtos_v1) is still using a
fixed-size stack size.
Since the test is going to use CMSIS v1 we cannot directly use
CONFIG_TEST_EXTRA_STACKSIZE to grow the stack size because the extra
space allocated can excess the maximum size allowed by CMSIS and defined
by CONFIG_CMSIS_THREAD_MAX_STACK_SIZE, causing the sample to halt on the
assertion (thread_def->stacksize <= CONFIG_CMSIS_THREAD_MAX_STACK_SIZE).
To avoid this problem (and align the test to what has been already done
on the philosopher test using CMSISv2) we set the stack size to the
maximum allowed size of CONFIG_CMSIS_THREAD_MAX_STACK_SIZE.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
CPU_CORTEX_M_HAS_SYSTICK and CPU_CORTEX_M_HAS_VTOR do not need
to be explicitely selected in SoC/Boards definitions of
platforms implementing the Cortex-M mainline architecture; they
are already selected by ARMV7_M_ARM8_M_MAINLINE Kconfig symbol.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add runtime error handling for k_msgq_cleanup. We return 0 on success
now and -EAGAIN when cleanup is not possible.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add runtime error checking to k_pipe_cleanup and k_pipe_get and remove
asserts.
Adapted test which was expecting a fault to handle errors instead.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove static helper functions used only once and integrate them into
calling functions.
In k_sem_take, return at the end.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Check for errors at runtime and stop depending on ASSERTs.
This changes the API for
- k_sem_init
k_sem_init now returns -EINVAL on invalid data.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
k_mutex_unlock will now perform error checking and return on failures.
If the current thread does not own the mutex, we will now return -EPERM.
In the unlikely situation where we own a lock and the lock count is
zero, we assert. This is considered an undefined bahviour and should not
happen.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Define there options for runtime error handling:
- assert on all errors (ASSERT_ON_ERRORS)
- no runtime checks (no asserts, no runtime error handling)
(NO_RUNTIME_CHECKS)
- full runtime error handling (the default) (RUNTIME_ERROR_CHECKS)
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Function cpu_stats_get_ns from CPU stats module returns
invalid time, because of unnecessary conversion into u32_t.
Higher bits of time value are removed during this conversion.
All time values are u64_t, so there is no need to convert anything.
Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
STM32L073 soc variant is a STM32L072 with LCD peripheral.
Reflect this in dts definition by including stm32l072.dtsi
in stm32l073.dtsi.
This also allows to fix an issue on stm32l073 gpioe which
declared wrong reg definition.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
On nRF platforms, Xtal LF clock source starts hundreds of milliseconds.
Until it is not started, test may fail due to wrong timing. Add initial
delay in the test for required clocks complete their start-up.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Refactor use of #ifdef to IS_ENABLED() pattern for handling cancellation
of outgoing connection attempt. Reduce the amount of indentation by
combining outer if-statements.
Move handling of canceled create connection into a helper function.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Fix advertiser requested to use the identity address while privacy
feature is enabled will change to using RPA address when advertise is
resumed or when RPA timeout occurred.
RPA timeout does not need to run when advertiser is using identity.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add shell command for advertise with identity option to have the
possibility to temporarily disable privacy feature in the advertise from
the shell.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Handle initiator role when RPA timeout expires. For direct connect
establishment procedure we make sure the RPA is refreshed when starting
initiator and limit the timeout to the RPA timeout.
For auto establishment procedure we cancel the initiator and restart it
again in the connection complete event that is generated when canceling
an initiator.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Handle starting of advertiser and scanner or initiator when advertiser
is using a different identity than the default identity to generate the
random resolvable address in the controller.
We need to handle this only for the privacy case because the random
address is set in the RPA timeout handler and not from the API.
When privacy is disabled we can return error code from the LE Set Random
Address HCI command instead.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>