Define the ZEPHYR_{MODULE_NAM}_MODULE option for all available modules.
Right now only modules defined as 'kconfig-ext' has this symbol defined
which may cause problem if the build wants to check if a module not
using this options is available.
This allow us to do something like:
comment "mbedTLS module not available."
depends on !ZEPHYR_MBEDTLS_MODULE
or make a feature depends on the module be present.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This checks that if connect() timeouts, we check TCP pointer
properly in select() and poll() in order to catch the situation.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The writefds is typically set if there is an error while
waiting for example the connect() to finish. So check if
the user supplied the writefds and update it accordingly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If we try to connect to a port which no socket is listening to,
we will get a packet with "ACK | RST" flags set. In this case
the errno should be ECONNREFUSED instead of ETIMEDOUT like we
used to return earlier.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Increase reference count already when initial SYN is sent.
This way the tcp pointer in net_context is fully valid for
the duration of the connection.
Fixes#63952
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add uart1 pin assignment for the raytac_mdbt53v_db_40_nrf5340 board.
This is required in order to support building TF-M for the NS variant.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add HW flow control pins for raytac_mdbt53_db_40_nrf5340 board.
Use the same pins as the cpunet has been assigned, as the RX / TX lines
was also using the same as cpunet.
Remove bias-pull-up as uart1 using same pins on cpunet does not have
this either.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add uart1 pinctrl assignment to nrf5340 Audio DK.
Assigned according to Schematic for this board.
Uart1 pins needed by TF-M when using the NS board variant.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add generic SoC support for the supported nordic SoCs:
- nrf5340
- nrf9160
- nrf9120
Add generic SoC support by taking board specific configurations from
zephyr devicetree and kconfig.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This reverts commit 0781a86862.
BASEPRI is only functionnal if mainline extension is present.
If not, it is "RES0". See: Arm®v8-M Architecture Reference Manual D1.2.5.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
According to conditions in the DFU spec section 6.1.3.7 (Sending a
Firmware Update Status message) and in 'Idempotency' part of section
6.1.3.4 (Receiving a Firmware Update Start message), the FU Server
should not update internal state when 'Wrong Phase' error condition
is triggered.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Add installation instruction for adding nanopb to the west workspace.
This is required because it is optional and not installed by default.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This test cannot be run in this architecture as it does not
support userspace.
Today it is filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Two substests cannot be run in the posix architecture
as they require userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These tests cannot be run in this architecture as it does not
support coredump.
Today it is filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test cannot be run in this architecture as it does not
support userspace.
Today it is filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These tests cannot be run in this architecture as it does not
support userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These tests cannot be run in this architecture as it does not
support this toolchain.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a filter by (arm) architecture, as the filter as it is faster
than filtering by kconfig.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Two substests (userspace and rtt) cannot be run in the posix
architecture.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
These samples & tests cannot be run in this architecture
as it does not support userspace.
Today they are filtered by kconfig, which works but spends
time running cmake.
As native_posix is a default test platform it is better
to filter it alltogether by arch, which saves quite a lot
of time.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In case ping is sent to own address, the request is looped back to the
stack and served before ping work had a chance to reschedule. In result,
when the final ping reply has been server, and ping operation finalized
with `ping_done()`, the work was rescheduled one last time, causing the
ping timeout to be reported. Fix this by rescheduling the work before
sending the actual request, so that the reply handler can cancel the
work properly in such case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
In case packet is looped back to the stack, set LL address information
on the packet, using the LL address set on the corresponding network
interface, so that the information can be interpreted by the SOCK_DGRAM
packet socket.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If the first Ethernet interface is not the first network
interface, then there might be two interfaces with the same name.
The test does not like that.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If we run network tests under tests/net, then set the
Dummy network interface as a default one so that it will
be picked up first.
This should solve the issue if the DUT is having a real
network interfaces like onboard Ethernet interface which
could cause the test to fail. The test might fail in this
case because the network tests assume that only simulated
network interfaces are used by the tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Compiler can't tell that k_thread_abort() won't return and issues a
warning unless we tell it that control never gets this far.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In the iso_receive sample, the semaphores were not reset in
each iteration.
This caused the ISO receiver to act incorrectly and cause
issues with some controllers.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The arg --testsuite-root was copied from twister. When it is used
for test_plan.py it will be propagated to twister calls. This allows
to make alternative test locations (e.g. from another repo) to work
with test_plan.py
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Add --alt-tag arg for test_plan.py script. User can use it and point
to an alternative file with tag-directories relations. If so, such
file will be used instead of the default one.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
Expand test_plan.py args with --ignore-path. This allows to provide an
alternative lists of patterns for the script.
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
The test_plan.py script has a path to repository to be scanned for
changes hard coded to zephyr. This patch separates zephyr path from
such repository's path and adds an arg to pass repo to scan
Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
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>