There are multiple CID errors all based on the test of
'socket > ESWIFI_OFFLOAD_MAX_SOCKETS'. The test needs to
be '>=' in all cases.
Fixes: #27138Fixes: #27139Fixes: #27140Fixes: #27141Fixes: #27142Fixes: #27143
Signed-off-by: David Leach <david.leach@nxp.com>
OpenThread API is not thread safe, therefore it shall be protected
from being preempted by OT thread, or other thread issuing API calls.
The problem showed up after a recent OpenThread upmerge, where changes
in the Joiner class made this problem visible. W/o extra protection,
`otJoinerStart` call can be preempted by the OT thread, leading to an
unexpected behavior.
Introduce new function to allow to lock any API operations for others.
Anyone willing to call OT APIs, shall lock the mutex first to get
exclusive access to the stack.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
`otLinkRawSetEnable` was removed and Link Raw mode is now enabled with
`otLinkRawSetReceiveDone` which requires to register a callback
function. Since it makes little sense for OT L2 to register a Link Raw
callback in current setup, leave it up to the application to register
the callback.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
There may be value in being able to rename a subtree, but there is no
identified need to be able modify the text of an assigned subtree.
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Add details of the LVGL7 update (e.g. warn about higher ROM usage,
changed Kconfig defaults, ...)
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Add a note to warn users about the need to adjust
CONFIG_LOG_STRDUP_BUF_COUNT and/or CONFIG_LOG_STRDUP_MAX_STRING when
deferred logging is enabled.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Update LVGL to version 7.0.2. Notable changes in v7 include:
- New drawing system (note that it uses much more ROM than previous
versions)
- New style system
- Some objects have been renamed (current changes do not align yet
Zephyr Kconfig settings with LVGL)
- New fonts with more sizes (e.g. Montserrat, replacing Roboto)
- Theme changes (most have been removed, default is now Material)
Note that constant defaults have been aligned with LVGL.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
By fixing the issue: #21819 in the shell, it is no longer needed
to keep a workaround, which allows prompting i2c bus name.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
It is not needed by the command to have subcommand in order to be used
for prompting. Removed this condition from the shell engine.
Fixes#21819
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
TI CC32xx does not support binding the same port to multiple sockets,
but instead uses the IPv6 socket to handle both IPv4 and IPv6
connections. This commit modifies the sample to reflect this.
In addition, Kconfig options are overridden in order for the sample
to take advantage of wifi and socket offloading on this platform.
Signed-off-by: Vincent Wan <vwan@ti.com>
When CONFIG_POSIX_API is set in lieu of CONFIG_NET_SOCKETS_POSIX_NAMES,
some macros such as POLLIN, POLLOUT and MSG_PEEK are undefined, and
the appropriate posix headers need to be included to access those.
Signed-off-by: Vincent Wan <vwan@ti.com>
Given socket offloading is now implemented under the fd's vtable, we can
directly use the default fcntl implementation.
Signed-off-by: Vincent Wan <vwan@ti.com>
Bugfix: in tcp_conn_unref(), the conn was zeroed before removing it
from the connection list (tcp_conns).
Zeroing conn, results in zeroing its 'next' member,
which in effect removes all its following connections referred to
in tcp_conns linked list.
The solution is to move the memset() after sys_slist_find_and_remove().
Signed-off-by: David D <a8961713@gmail.com>
The network interface check was invalid when IPv6 Router
Solicitation message was timeout and interface was not found.
This is highly unlikely but needs to be checked properly.
Fixes#27145
Coverity-CID: 211511
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Move implementation of hci_driver.h exposed functions to a common file.
The functions exposed by hci_driver.h header file is implemented in
either hci_core.c, or hci_raw.c. But since these functions would be
identical for both implementations have them in a new file that is
included for both.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Adds native_posix hw counter model and the counter driver.
Functionality is needed by software which is tested
on native_posix and has dependency on counter.
Hardware model was developed similarly to HW timer model.
The counter driver wraps HW counter functions and exposes
basic functionalities: starting, stopping, setting and cancelling
single channel alarms.
Code was tested against: tests/drivers/counter/counter_basic_api.
Signed-off-by: Filip Zajdel <filip.zajdel@nordicsemi.no>
Add HSE,HSI,CSI,PLL as system clock options.
Also add correct configuration of the PLL.
New sysclk options:
- HSI with: CONFIG_CLOCK_STM32_SYSCLK_SRC_HSI=y
- HSE with: CONFIG_CLOCK_STM32_SYSCLK_SRC_HSE=y
- CSI with: CONFIG_CLOCK_STM32_SYSCLK_SRC_CSI=y
Existing sysclk options:
- PLL with: CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
PLL clock options:
- More PLL source clocks:
Existing:
1. HSE with: CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
New:
2. HSI with: CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
3. CSI with: CONFIG_CLOCK_STM32_PLL_SRC_CSI=y
- PLL vco input range is auto-calculated based on PLL DIVM1
-> Example for sysclock 96MHz generated with PLL from HSI
CONFIG_CLOCK_STM32_PLL_SRC_HSI=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=96000000
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=4
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=12
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=4
CONFIG_CLOCK_STM32_PLL_R_DIVISOR=2
Use LL_SetFlashLatency function from stm32h7xx_ll_utils.h
instead to setup the correct latency.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
Currently, the application could receive a duplicate CONNACK event, in
case the server rejected the connection at MQTT level (with an error
code provided with CONNACK message). A subsequent connection close (with
`mqtt_abort` for instance) would produce the duplicate event.
Fix this by reporting back to the MQTT engine, that the connection was
refused, so it can close the connection rightaway. Rework the event
notification logic, so that DISCONNECT event instead of a duplicate
CONNACK event is notified in that case.
Also, prevent the MQTT engine from notyfing DISCONNECT event in case of
socket errors during initial connection phase (i. e. before
`mqtt_connect` function finished).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add a test suite to validate the Software Vector Relaying
feature for Cortex-M architecture.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In CPUs with VTOR we are free to place the relay vector table
section anywhere inside ROM_START section (as long as we respect
alignment requirements). This PR moves the relay table towards
the end of ROM_START. This leaves sufficient area for placing
some SoC-specific sections inside ROM_START that need to start
at a fixed address.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
is_init field is useless, because there is only single code path that
always sets it to true before using it.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
instances that do not run will have no results (beside the fact they
built successfully), so log those as such.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Extend the gen_isr_table test suite to build and run
on Cortex-M baseline platforms. Add a few platforms
in the whitelist so the test builds and runs for some
common Baseline Cortex-M insluding the QEMU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Adding tags for ARC-variant of the test.
Rename test string to comply with ARM-variant name.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Make sure IPv6 address is removed from network interface in IPV6CP
protocol down handler. This makes sure that application can receive
high-level notification about missing network connection.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Make sure IPv4 address is removed from network interface in IPCP
protocol down handler. This makes sure that application can receive
high-level notification about missing network connection.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Ensure multiple OOB transactions can be perform back-to-back
Check OOB transaction response length matches is as expected.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
eSPI slave driver should only indicate that a channel is ready
after the eSPI master has enabled said channel.
However, this indication is incorrectly sent during eSPI reset
even before channel renegotiation starts.
Perform only channel-specific interrupts enabling inside
initialization functions.
Send Channel ready ack only after channel negotiation is received.
Add missing callbacks for channel events to notify client driver.
Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
Updates the contribution guidelines to document the current board policy
of rejecting non-OSI-approved licenses.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
The log output instances all named "log_output" in backends
collide with the "log_output" parameter of various functions.
This renames the variables in the backends to make them
more descriptive. Same goes for the buffers for some of
these instances as they are all named "buf", and "hostname"
being used in the network backend, so they are renamed.
There are a few places where variables are overriden within
an inner scope (e.g. inside loop and if block) so they are
also renamed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
There is a global variable named "dev" to store which UART
device is being used the tracing backend. This name collides
with the parameter of same name in the ISR function. So rename
the global variable.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
In the function smp_init_top(), the variable "start_flags"
collide with global variable of the same name. So rename the one
inside the function.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
In the function sys_heap_alloc(), the variable "chunksz"
collide with function named chunksz(). So rename those variable.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope.
In the function z_set_timeout_expiry(), the parameter "idle"
and an inner variable "next" collide with function named idle()
and next(). So rename those variables.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
MISRA-C Rule 5.3 states that identifiers in inner scope should
not hide identifiers in outer scope. There are a few spinlock
keys simply named "key". So rename those in inner scope to avoid
shadowing the outer ones.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This PR fixes the links to the example files in the Gitlab repository.
Fixes Dir 4.8 and Rule 2.1, 5.1, 5.8, 5.9, 8.5, 8.6, 13.1, and 13.5.
Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
printf function didn't have enough specifiers for the
number of arguments in the command line (Coverity warning).
Fixes#26985Fixes#26986
Signed-off-by: David Leach <david.leach@nxp.com>
Added the 'fall through' comment to switch to quiet compiler
and coverity warnings.
Fixes#25724Fixes#25726
Signed-off-by: David Leach <david.leach@nxp.com>
Coverity is not able to detect that the call to ztest_test_fail()
will not return so it emits a warning on a later access to
param. Add a return; after the call so coverity won't complain.
Fixes#25790
Signed-off-by: David Leach <david.leach@nxp.com>
Coverity warnings on dead loop code. We know this can
occur if the NUM_CPUHOLD is defined as zero which occurs
when CONFIG_SMP is false.
Fixes#20516Fixes#20517
Signed-off-by: David Leach <david.leach@nxp.com>
Suppress the coverity warning on using the semaphore as
this semaphore is used and freed only in this function.
Fixes: #18960
Signed-off-by: David Leach <david.leach@nxp.com>
This is a cargo-culted attempt to make an error observed in poorly
understood CI circumstances go away when loading edt.pickle, by making
edtlib visible in sys.modules before loading the pickle file.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>