An option --no-detailed-test-id was added to twister to help align
names for test outside of zephyr tree. This commit add this arg
to test_plan.py script which is then propagated to twister.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Function pm_state_cpu_get_all is declared in state.h
but it is only implemented if CONFIG_PM is set.
Add an inline implementation for when CONFIG_PM is not set.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
For GPIO pins above 31, one needs to use the `&gpio1` (or similar)
definition, as zephyr seperates GPIOs into chunks of 32.
Signed-off-by: Sophie 'Tyalie' Friedrich <dev@flowerpot.me>
Previously the seed connector was defined incorrectly and as such D6 and D7
weren't usable as i.e. inputs. Zephyr distinguishes GPIO pins in blocks of
32, a distinction the ESP32 reference manual doesn't do. As such one needs
to write `&gpio1 11` in order to access `GPIO43`.
Signed-off-by: Sophie 'Tyalie' Friedrich <dev@flowerpot.me>
Add support for CAN statistics to the SJA1000 CAN controller driver. The
hardware does not support distinguishing between being unable to transmit
dominant versus being unable to transmit recessive bits.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The bit error counter is incremented when the CAN controller is unable to
transmit either a dominant or a recessive bit.
This new error counter should only be incremented directly if the CAN
controller is unable to distinquish between failure to transmit a dominant
versus failure to transmit a recessive bit. If the CAN controller supports
distinguishing between the two, either the `bit0` or `bit1` error counter
shall be incremented instead. Incrementing one of these will automatically
increment the bit error count as well.
Typically, a CAN controller driver will either use this new bit error
counter or the discrete bit0 and bit1 error counters depending on the
features supported by the hardware. Mixing the two on driver level should
not be required.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Don't re-use the `rxmsg` buffer in the `bt_spi_send` function. This
buffer is still used by the RX thread after releasing the SPI semaphore.
The current re-use can result in buffer corruption if the RX thread is
swapped out as a result of the `k_sem_give`.
Moving the semaphore release later can result in deadlocks due to
buffer allocation being performed while holding the semaphore, so
instead just eliminate the re-use entirely.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Extract the HCI message handling out to a dedicated function to simplify
the main thread function. This also solves a bug as a side effect.
Previously `discardable` and `timeout` were never being reset after
an advertising report was received, resulting in ALL events after the
first advertising report being treated as discardable.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This files has been changed as part of a refactoring in 13a87081b9.
Unfortunately the refactoring introduced few issues:
- usage of devicetree macros before their definition
- usage of pinctrl label before the definition of the corresponding node
- removal of few node overrides that are causing build errors
Unfortunately there's no board usptream using this specific dts file, so
the issue has not been caught in CI and was only found downstream.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Disable power management for this particular test case as it expects a
particular pattern of pm get/puts that isn't matched by the driver and
usage in SoF.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
The remote address of the connection is checked whether
it is v4-mapping-to-v6 address in which case we should
print it such.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
When a new incoming connection is accepted, do not overwrite
the listening remote address. The remote address for the
listening socket is the any address (like :: for IPv6)
and not the accepted socket remote address.
This only affects the "net conn" shell command which prints
the remote address incorrectly. There is no problem accepting
new connections in this case.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The sent pkt must be removed after we have cloned it
in the simulated driver otherwise there is a memory leak.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We should use the NET_CONN_RANK() macro when printing the
current rank value as that macro masks the rank values properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The sample enables CONFIG_NET_IPV4_MAPPING_TO_IPV6 and then
turns off IPV6_V6ONLY option which allows it to support both
IPv6 and IPv4 using the same socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The socket address passed in accept() call should point
to the new connection address and not the old one.
Fortunately this only affects things after the v4-mapping-to-v6
support so older code than this works fine.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The address length of the accepted socket must reflect the
size of the address struct, so it should either be
sizeof(struct sockaddr_in) for IPv4 or sizeof(struct sockaddr_in6) for
IPv6 socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The IPV6_V6ONLY option is only checked if
CONFIG_NET_IPV4_MAPPED_TO_IPV6 option is set.
By default the IPV6_V6ONLY option is set.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This allows IPv4 and IPv6 share the same port space.
User can still control the behavior of the v4-mapping-to-v6
by using the IPV6_V6ONLY socket option at runtime.
Currently the IPv4 mapping to IPv6 is turned off by
default, and also the IPV6_V6ONLY is true by default which
means that IPv4 and IPv6 do not share the port space.
Only way to use v4-mapping-to-v6 is to enable the Kconfig
option and turn off the v6only socket option.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add support for IPv4 mapped IPv6 addresses when converting
IP address to a string in inet_ntop() function.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Create a function that can create IPv4 mapped to IPv6 address.
Create a function that can check if the IPv6 address is a
mapped IPv4 one.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Fix two issues with net tcp command:
* The `net tcp` commands are still based on net_context API. For TCP,
the API caller (net shell) should add one extra reference to the
allocated net context, to prevent premature context release in case of
connection teardown. Currently that was not the case, and the context
was released too early, resulting in missing final ACK from the Zephyr
side on connection close.
* The net context API should not be called from the registered connect
callback, as this creates a temporary deadlock situation. The
net_context_connect() function blocks until the connection is
established, or an error or timeout occurs. For that time the
net_context mutex is being locked. In case of connection error (for
example after receiving RST packet) the connect callback is called,
indicating an error. If we try to call net_context API from within, a
deadlock situation takes place, as the context mutex is still locked
by the net_context_connect() (called from the shell thread). This
blocks the further execution of the TCP stack and can result in an
unexpected behavior (like for example retransmitting the SYN packet,
which takes place from yet another thread, TCP work queue).
Fix this, by releasing the net context not from the callback directly,
but based on the return value from net_context_connect().
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
File gcc-m-fpu.cmake is responsible for determining what should be
passed to -mfpu option. Fortunately GCC and Clang options are compatible
so we can use the file for clang.
The list of supported -mfpu options can be found at
https://github.com/llvm/llvm-project in
llvm/include/llvm/TargetParser/ARMTargetParser.def file.
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Use IN_RANGE instead of explicitly checking that a value is
in between two other values
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
The BT Core Spec v5.4 allows separate SDU_Interval to
be set on C_To_P and P_To_C directions,
but this is not possible with the existing interface.
This PR splits the interval parameter in the call to
bt_iso_sig_create into one for C_To_P
and one for P_To_C
It also splits the latency parameter into one for
C_To_P and one for P_To_C
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Bluetooth: ISO: update UI for extended API
The API for setting the SDU interval and latency have been updated.
This PR also updates the setting of these by the user in the shell
and the iso_connected_benchmark sample
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Correct a previous mistake indicating syntax highlighting is
autoguessed.
Add recommendations and samples around languages that documentation
authors are encouraged to use.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Force code blocks with no 'language' explicitly set to render with no
highlighting. The current default was to use python (bad), and there
would also be an option to set it to "guess" but this doesn't work all
so well (ex. some C blocks would be detected as Transact-SQL!).
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Backport a useful CSS rule from Godot that allows to have *all* cells of
a table to wrap. This can be useful for list-tables in particular,
where otherwise the first column don't wrap.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
The counter_native_posix driver currently does not support top value
configuration, i.e. `ctr_set_top_value` returns `-ENOTSUP`. This commit
adds support for top value configuration, and with the counter API now
fully implemented, adds `counter` to `supported` peripherals for
native_posix target.
It also resolves an existing bug in which the
counter ISR did not reset upon reaching `TOP_VALUE`.
And adds support for multiple channels
Signed-off-by: Jason Wright <jason@jpw.nyc>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
If an event occurs between the status registers being read and
the event being cleared, the interrupt line will remain active.
As the interrupt is edge triggered, all future interrupts
will being ignored. This problem will also occur if an I2C
transation fails in the callback.
The state of the interrupt pin is now checked at the end of the
callback, and a retry is attempted if the interrupt has not
been cleared.
Signed-off-by: Andy Sinclair <andy.sinclair@nordicsemi.no>
Passing arguments to west flash is needed in many cases
but there was no way to properly generate documentation
with such examples.
With this new "flash-args" option we can now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix the west invokation. "-t" is added automatically
to the run goal, otherwise we get a "-t -t" command.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The figure and table related to the VDED notification sequence were wrong.
It fixes that by changing the image and adjusting the table content.
Signed-off-by: Rodrigo Peixoto <rodrigopex@gmail.com>
Since samples are starting to leverage the new :zephyr:code-sample
directive, let's use the available meta data to expose that structured
information to search engines.
This commit adds JSON-LD markup to the HTML output of code sample pages
and sets the meta description to the samples' description.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
CodeSample node is meant to be a temporary node that's transformed into
standard docutils nodes. While the node might contain children useful
for the transformation, they're not meant to be included in the result
of the transform.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Since CRC32 hash/checksum support is enabled by default, make it
select the CRC Kconfig symbol
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Only SMP over console transports need CRC support, therefore do
not imply CRC support for MCUmgr entirely because only 2 optional
transports require it
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>