Fix the advertise object not release when a high-duty cycle directed
advertiser timeout happens. If the extended advertising feature has been
enabled in the host, but not supported by the controller then the
advertising object must be released in the connection complete event
since there will not be a advertising set terminated event.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Instead of whitelist, use a filter that checks if a required
"atmel,at45" compatible node is present.
Add a build-only test case to be used by CI and provide a harness
configuration so that execution of the sample can be also verified.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Plus corresponding configuration file for the spi_loopback test that
will be activated for that board by this added capability.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This sample still used the old name of the nrf9160dk_nrf9160 board,
both in documentation and sample.yaml. Because of the latter, this
sample was not picked up by sanitycheck, what resulted in compilation
errors in the spi_flash_at45 driver not caught by CI.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
For some reason, use of the DT_NUM_INST macro in this driver was not
replaced with DT_NUM_INST_STATUS_OKAY. In consequence, this driver
could not be compiled successfully. Furthermore, because this now
undefined macro had been used inside UTIL_LISTIFY, gcc was not even
able to report an error, instead the compilation just "froze".
This patch replaces UTIL_LISTIFY(DT_NUM_INST()) with more appropriate
in this context DT_INST_FOREACH_STATUS_OKAY. It also adds an apparently
missing inclusion of sys/byteorder.h.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
In some cases we were not handling return code correctly and evaluating
timeouts as a pass. Report failure correctly.
Fixes#26065
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Reference an updated head that removes references to reporting
infrastructure when reporting is disabled.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Rewrite console log section to encourage bug-reporters to obtain the
console output in text-format over screenshots, as well as hinting
about other debug information that can be attached.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Test is configured with CONFIG_POSIX_API=y, so there is no reason to
check for it being enabled in C. Additionally when CONFIG_POSIX_API=n a
much "bigger" posix/sys/socket.h was included instead of net/socket.h,
which should be rather opposite.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Move the --erase option to core.py from nrfjprog.py and jlink.py,
where it is currently supported.
Using the RunnerCaps option enforcement mechanism introduced earlier,
enforce that it will only be given to runners that support it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Require all implementations to provide a do_create(), a new
ZephyrBinaryRunner abstract class method, and make create() itself
concrete.
This allows us to enforce common conventions related to individual
runner capabilities as each runner provides to the core via
RunnerCaps.
For now, just enforce that:
- common options related to capabilities are always added, so runners
can't reuse them for different ends
- common options provided for runners which don't support them emit
sensible error messages that should be easy to diagnose and support
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
We can just call super() instead of super(MyClassName, self). The
original extra verbosity is likely due to old habits of mine from
Python 2 which are no longer necessary, but got copy/pasted around.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
fatfs_open and fatfs_opendir fail to free reserved memory on error
which may lead to memory exhaustion, when too many file/dir open errors
are caused, and will cause all subsequent open attempts to fail with
ENOMEM error.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Fix issue with directed advertiser not accepting connection request
from non-privacy enabled peer that has given us a non-zero IRK.
When device privacy is enabled then ull_filter_lll_rl_addr_allowed will
return true, and update the rl_idx to entry in the resolving list.
When the directed advertiser is not privacy enabled then lll->rl_idx is
set to FILTER_IDX_NONE and will not use RPA for the target address.
The check rl_idx != lll->rl_idx will then fail (0 != 0xff) and the
connect request is denied, even though all addresses matches on-air.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
pcie has an all in one command for listing pci devices. Make it support
additional commands and move lspcie to `pcie ls`.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If shell is enabled then enable all sub-shells if their dependencies are
satisfied. This was done for some modules and subsystems but was not
consistent.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sample is not working on all boards anymore. Adding every single
shell we have to the prj.conf does not work on every board, due to
missing features.
Instead, we now change how shell modules are enabled and make it
possible to enable shell command and modules for any application when
CONFIG_SHELL is enabled.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
No need to specify a default configuration for
ENTROPY_NRF_FORCE_ALT Kconfig symbol in the
qemu_cortex_m0 board definition.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Add timer label for this test suite, so it is included
in sanity check runs with -t timer.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
After the Qemu Cortex-M0 timer driver rework, we may
enable the test-suite that had been (always) excluded
from running on this platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
After the Qemu Cortex-M0 timer driver rework, we may
re-enable the test-suite that had been excluded for this
platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
After the Qemu Cortex-M0 timer driver rework, we may
re-enable the test-cases that had been skipped for this
platform.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We rework the timer driver for Cortex-M0 QEMU Board.
The driver is adapted to follow the (recent) nRF RTC
driver logic, and adaptations are made simply because
the driver is based on the TIMER peripheral instead of
the RTC.
A couple of tweaks are added due to QEMU issues with the
simulation of the TIMER peripheral.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Instead of endlessly repeating the same command line args,
centralize this and tune the shift value on a per-board
basis.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
For iterable areas defined with Z_STRUCT_SECTION_ITERABLE(),
the corresponding output section in the linker script is just
boilerplate. Add macros to make these definitions simpler.
Unfortunately, we have a fair number of iterable sections not
defined with Z_STRUCT_SECTION_ITERABLE(), this patch does not
address this.
The output sections are all named <struct name>_area, update
sanitylib.py with this.
sys_sem with no userspace, and k_lifo/k_fifo are special cases
where different data types that are all equivalent need to be
put in the same iterable area. Add
Z_STRUCT_SECTION_ITERABLE_ALTERNATE() for this special case.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add support for 64 bit conversions in a uniformly expressable way by
printing values backwards into a buffer on the stack first. This
allows all operations to work on the low bits of the value and so the
code doesn't need to care (beyond the size of that buffer) about the
word size. This trick also doesn't care about the specifics of the
base value, so in the process this unifies the decimal and hex printk
conversion code to a single function.
This comes at a mild cost in CPU cycles to the decimal converter and
somewhat higher cost to hex (because it's now doing a full div/mod
operation instead of shifting and masking). And stack usage has grown
by a few words to hold the temporary. But the benefits in code size
are substantial (e.g. ~250 bytes of .text on arm32).
Note that this also contains a change to tests/kernel/common to
address what appears to have been a bug in the original converters.
The printk test uses a format string that looks like "%-4x%-2p" and
feeds it the literal arguments "0xABCDEF" and "(char *)42".
Now... clearly both those results are going to overflow the 4 and
2-byte field sizes, so there shouldn't be any whitespace between these
fields. But the test was written to expect two spaces, inexplicably
(yes, I checked: POSIX-compatible printf implementations don't have
those spaces either).
The new code is definitely doing the right thing, so fix the test
instead.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Printing the file descriptor does not give any information when
the network interface creation fails, so print errno here instead.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we have multiple network interfaces and we are waiting incoming
network packets, make sure to honor the bind of the socket so that
correct socket will receive data in certain network interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The driver was returning zero due to accessing the, say, 0x81'th
endpoint instead of the 0x01'th endpoint.
Signed-off-by: Michael Hope <mlhx@google.com>
This patch enables the Independent watchdog (iwdg)
so that the testcase tests/drivers/watchdog/wdt_basic_api
can run on this stm32f3_disco board
Signed-off-by: Francois Ramu <francois.ramu@st.com>
1.Add a new testcase to verify multiple queues can be defined
2.Add some code comments to describe function performance.
Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
USB access to the flash device is not synchronized with the
application, so if the application needs to create a new file system
USB may read configuration state that is incorrect. Wait until the
the application is done with the flash before starting USB.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
I received feedback that setting e.g. BOARD_ROOT in CMakeLists.txt is
not quite well specified; in particular, it's important to do so
before pulling in the boilerplate via find_package(). Clear that up.
Reported-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Explicitly ignore the nanosleep() return value.
nanosleep() is called to slow down native_posix in real time
mode.
There is no real reason to handle this call returning too early:
The call may return earlier if a signal was sent to the process
(e.g. the user pressed Ctrl+C), or in case of errors.
In case of SIGKILL, SIGTERM, what we do is what we should do
(not wait, but terminate the program as requested by the user ASAP)
In case of another signal, we will wait the appropriate
amount of time in the next systick (so we won't accumulate any
error over time)
So there is no real need to add extra code here to handle
those cases.
Solves coverity CID 211046
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
QEMU icount does not work correctly when more than 1 CPU is used,
but works fine with only 1 CPU enabled. So we can enable icount
on qemu_x86_64 when CONFIG_MP_NUM_CPUS=1. Sanitycheck goes from
~158 seconds to ~113 seconds on my dev machine.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The argparse module, by default, complains about non-defined
arguments. This prevents passing arguments prefixed with '-'
or '--' to the target script (e.g. calling another Python
script using argparse). This changes the misc-flasher script
so that any arguments not recognized by west will be passed
to the target script.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>