Fix issues that surfaced when trying out GCC 9.2, official release name
gcc-arm-none-eabi-9-2019-q4-major, both related to invalid pointers in
GATT when declaring UUIDs in if-scope.
1. Fix the discovery callback giving an invalid pointer in the discovery
callback in two instances.
2. Fix gatt_find_type sending invalid data during discovery procedure.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Send connection parameter update request only if it contains the valid
range of values for connection intervals, latency and timeout.
Signed-off-by: Kiran Paramaswaran <kipm@oticon.com>
The type of SOC_ATMEL_SAME70_DISABLE_ERASE_PIN is bool, yet its default
is specified as an int value of 0.
This commit removes the implied `default 0`, which is equivalent to
`default n`.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Add dts configs for bt-c2h-uart and bt-mon-uart. These are used by
the hci_uart sample and BT_DEBUG_MONITOR.
Signed-off-by: Rubin Gerritsen <Rubin.Gerritsen@nordicsemi.no>
In order to avoid a warning from Sphinx complaining that the
supported_features.rst file is not included in any ToC, rename it to
.txt so that Sphinx understands that this is only a snippet to be
included in other files.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Using ':' as the separator in --modules breaks module specifications
like
nrfxlib:nrfxlib:C:/Users/Carles/src/ncs/nrfxlib
The ':' in 'C:' gets seen as a separator.
Use ',' instead, which is unlikely to appear in paths (at least in
--modules). Treat a doubled ',,' as a literal ','.
Another option would be ';', but it clashes with how CMake represents
lists, which is awkward.
Also make quoting of arguments with spaces more robust by passing
VERBATIM to add_custom_target().
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fills in all missing API documentation for the public Bluetooth Mesh
API, and unifies the formatting of all entries.
Some defines and enum values have been left without documentation in
cases where the meaning is self explanatory, and documentation wouldn't
add any value. Structure members that are just internal parameters are
left without documentation, as this also hides them from the generated
documentation output.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Fix misspellings in docs (and Kconfig and headers processed into docs)
missed during regular reviews.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fix ATT MTU size of length variables resulting in wrong length values
reported to the user. Communicating with an Android device using an MTU
of 517 resulted in write commands reported as length 2 instead.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Commit 5a9a33b0cf changes interrupt
destination in an attempt to broadcast interrupts. However, this
change causes interrupts to stop working on the UP Squared board
in non-SMP configuration. According to QEMU source code,
physical destination address 0xFF000000 is a special case where
it broadcasts the interrupts. However, none of the IOAPIC
documentation (that I can find) describes this behavior. So,
revert that commit.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Deep sleep states are documented to include SoC-level power gating,
i.e. the SoC loses context. In practice entering a deep sleep state
requires an external wakeup mechanism that may need to restart the
application.
Such states are too dangerous to enter automatically based on an
expected duration of sleep, especially since a "forever" sleep that
would normally be woken as a result of a peripheral event would select
the deepest sleep state available. Limit the sleep levels selected by
a residency policy to ones in which the CPU may be stopped, but will
not lose execution context.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The blackmagicprobe runner's Python process fails to ignore SIGINT
when it runs GDB from the debug and flash callbacks, which is wrong.
The other runners tend to use run_server_and_client() to properly
handle this, since they start a GDB server and connect to it with a
client. The BMP USB device presents itself as a serial device which
speaks the GDB serial protocol instead, so there's no server/client,
and thus no call to run_server_and_client().
The problem is that blackmagicprobe essentially uses
subprocess.check_call() to start GDB directly, without ignoring SIGINT
in the python process. Easy fix.
Fixes: #21139
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The network sample automatic testing feature in PR #19677 is moved
to 2.2 so removing it from 2.1 release note.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Since bt_conn_send_cb can fail to send buffer causing it to unref this
may cause buffer leaks as the caller is not aware of the error assuming
the buffer could be sent.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Seems to be fine to temporarly cast to int there as frequencies are in
Mhz and not Ghz.
Fixes#20497
Coverity CID: 205638
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The k_mutex is a priority-inheriting mutex, so on unlock it's possible
that a thread's priority will be lowered. Make this a reschedule
point so that reasoning about thread priorities is easier (possibly at
the cost of performance): most users are going to expect that the
priority elevation stops at exactly the moment of unlock.
Note that this also reorders the code to fix what appear to be obvious
race conditions. After the call to z_ready_thread(), that thread may
be run (e.g. by an interrupt preemption or on another SMP core), yet
the return value and mutex weren't correctly set yet. The spinlock
was also prematurely released.
Fixes#20802
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Fill the `rx_delay` field in the SPIM configuration structure only when
the RXDELAY feature is present in a given SPIM instance, to prevent
compilation errors when some other SPIM instance is enabled together
with SPIM3.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Instead of showing the prompt for symbols on the index page, show their
help texts. This makes searching easier.
Fall back on the prompt if no help text is available.
Also change the code to only show one of the prompts if several are
available (happens if a symbol is defined in multiple locations and adds
a prompt in more than one of them). It's probably overkill to show them
all, and it doesn't come up that often.
Suggested by David B. Kinder.
Co-authored-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Use --modules to split the Kconfig reference up by where symbols are
defined. See the argparse docstring for --modules in
doc/scripts/genrest.py.
Not sure what the best way to split things up is, so feedback would be
appreciated. I just pulled out some top-level directories. It could
always be tweaked later.
If a symbol is defined in more than one module (by being defined in
multiple locations), it appears on multiple index pages.
To build the documentation, do
$ mkdir doc/b && cd doc/b
$ cmake -GNinja ..
$ ninja htmldocs
(output in html/reference/kconfig/index.html)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Instead of having index.rst just link to other index pages in --modules
mode, list all symbols on it, and have links to the module index pages
at the top.
Get rid of index-all.rst and index-main.rst (and all related options).
index-all.rst is no longer needed, and index-main.rst (symbols outside
--modules) might not be that useful to people reading the documentation
(and could be added back if needed).
Also refactor and streamline the code a bunch. For the main index page,
the only difference between modules and non-modules mode is now whether
there's links to other index pages at the top.
Suggested by David B. Kinder.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add support for Zero Latency IRQs, which avoids any Zephyr
OS or application influenced ISR latencies on the
controller's ISRs.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Documents major driver changes (additions, removals, fixes, etc.) across
all driver families since the 2.0.0 release.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Additions:
- Provide clear description of a typical board port on zephyr
- Add a clear statement that peripherals should be disabled by
default (unless clearly specified)
- Add clear mentions on peripheral that should actually be enabled
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The time difference calculation did not check if the result
value would be < 0 which means really large value when converted
to unsigned.
Fixes#20100
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The Newlib in the XCC toolchain for intel_s1000_crb has a few
missing functions which are reentrant versions of the one
defined in lib/libc/newlib/libc-hooks.c. So make these call
the correct functions.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Both HAS_I2C_DW and HAS_SPI_DW are not valid unless I2C and
SPI are both selected. So make them dependent on the parent
subsystem config.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Commit 571741a0c5 introduced a block to determine __BYTE_ORDER__
within toolchain/gcc.h. However, toolchain/xcc.h defined
__BYTE_ORDER__ there but the early inclusion of gcc.h causes
errors since __BYTE_ORDER__ cannot be determined within gcc.h.
So wrap around the gcc.h include with a fake __BYTE_ORDER__ to
bypass the check in gcc.h.
Also set the __BYTE_ORDER__ to the correct __ORDER_*_ENDIAN__
macro.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Both k_thread_stack_t and (*k_thread_entry_t) are defined in
include/kernel.h and include/sys/arch_interface.h. The latter is
indirectly included by kernel.h which causes issues with some
toolchains. So remove the definitions in kernel.h.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
When setting a timeout measure the number of accumulated unannounced
ticks. If this value exceeds half the 24-bit cycle counter range
force an announcement so the unannounced cycles are incorporated into
the system tick counter.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Add a test that repeatedly reschedules a timer before it expires, and
has no other timers active. If the timer internal state overflows due
to counter wrap either the uptime or the tick counter may appear to go
backwards. The test runs until it fails, or until a specified amount
of measured time has passed.
This test is build-only for automated test programs as the default
limit to pass is one hour, and some platforms may require an even
longer period.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
It is possible that the network interface is not set when we
check the interface in net_pkt.c:pkt_buffer_length(). For example
in icmpv6 unit test the interface is left as NULL as the test does
not care about what network interface is used. For real hw like
mimxrt1050_evk, which supports Ethernet, we need to add additional
checks for the interface being non-null.
Fixes#20088
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Processing of data received on dynamic channels is still done via syswq
so the buffer shall not be unrefed when they are queued.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>