custom arch_cpu_idle and arch_cpu_atomic_idle implementation was done
differently on different architectures. riscv implemented those as weak
symbols, xtensa used a kconfig and all other architectures did not
really care, but this was a global kconfig that should apply to all
architectures.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Clear the UNALIGN_TRP bit in the CCR register, if the config
CONFIG_TRAP_UNALIGNED_ACCESS is not set.
Despite the fact that the reset value of UNALIGN_TRP is 0, always clear
the bit. It is useful in double image systems. The new image can't rely
on settings left by the previous image.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
The LLEXT EDK was not exporting common Zephyr compile definitions
("-Dxxx" flags). This patch adds the compile definitions before the
other compile flags, as it is done in the Zephyr build system.
This patch also adds to this list the "-DLL_EXTENSION_BUILD" flag,
instead of providing a special case at a later stage.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
The variable llext_edk_cflags was used in the main CMakeLists.txt file,
while llext_cflags was used in the llext-edk.cmake file. This commit
unifies the variable names to use llext_edk_cflags in both files.
No logic changes are introduced by this commit.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
gcc 13 produces a build warning (see below), as it seems to
believe the number of read bytes may overflow the frame_size
type.
Let's increase the frame_size bitwidth to avoid this.
(Any 32bit type, signed or unsigned, avoids this warning)
The build warning:
```
In file included from /usr/include/features.h:502,
from bits/libc-header-start.h:33,
from /usr/include/stdint.h:26,
from include/stdint.h:9,
from zephyr/include/zephyr/types.h:11,
from zephyr/include/zephyr/kernel_includes.h:21,
from zephyr/include/zephyr/kernel.h:17,
from zephyr/drivers/bluetooth/hci/userchan.c:9:
In function ‘read’,
inlined from ‘rx_thread’ at drivers/bluetooth/hci/userchan.c:201:9:
/usr/include/i386-linux-gnu/bits/unistd.h:28:10: warning: ‘__read_alias’
specified size between 4294902273 and 4294967295 exceeds maximum object
size 2147483647
[-Wstringop-overflow=]
28 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
drivers/bluetooth/hci/userchan.c: In function ‘rx_thread’:
drivers/bluetooth/hci/userchan.c:187:32: note: destination object allocated
here
187 | static uint8_t frame[512];
| ^~~~~
/usr/include/i386-linux-gnu/bits/unistd-decl.h:29:16: note: in a call to
function
‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
29 | extern ssize_t __REDIRECT_FORTIFY (__read_alias, (int __fd, void
| ^~~~~~~~~~~~~~~~~~
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Allows RTT inizialization function to either init Cntrol Block always
or initialize only after checking it it's not already initialized by
another program, typically by a bootloader.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
Use recommended write API that internally locks RTT usage and checks
if the RTTcontrol block initialization is done.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
Allows optionally placing Segger RTT data either in a specific
linker section that is located at RAM start, or in a specific linker
section defined by a memory region in DTS, as third and fourth
alternative to the DTCM section or the default data section.
This is useful to share the fixed address for different programs,
typically bootloader and application, and have seamless logging.
Signed-off-by: Giancarlo Stasi <giancarlo.stasi.co@gmail.com>
Print the ISR & its ARG along with the IRQ and Hits in
`plic stats get <intc>` command, i.e.
```CONFIG_SYMTAB=n
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits ISR(ARG)
10 541 0x800054ee(0x80008170)
```
```CONFIG_SYMTAB=y
uart:~$ plic stats get interrupt-controller@c000000
IRQ Hits ISR(ARG)
10 114 uart_ns16550_isr(0x80008230)
```
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This function call frees the buffer kept by the host for reassembling L2CAP
PDUs into.
Without this call, the current buffer will eventually be
leaked, leading to a non-functional host due to lack of RX buffers.
The effect is worse when host flow control is not enabled, as the RX
buffer pool is shared with events, which means communication with the
controller is essentially dead.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
`net_buf_alloc(K_FOREVER)` can now return NULL if running in the system
workqueue. `bt_hci_evt_create()` is called in that context in a few cases.
Since we can't really do anything about it, add a (default-on) assert.
This should ideally never fail. I saw it fail because of a leak in the ACL
buffer pool, which is also shared with events when host flow control is not
enabled.
In that particular case, the host is rendered non-functional, so trying to
recover using error handling is futile.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Add a test that verifies no resources are leaked when re-assembling L2CAP
PDUs over an unreliable channel (ie. lots of disconnects).
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Remove wpa_supp_els_pkc_mbedtls_config.h, as this header file
contains PSA_CRYPTO_DRIVER_ELS_PKC, and ELS-PKC is a proprietary
component of nxp to provides HW acceleration for psa-apis.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
REG_X_BASEADDR will be removed from all hal files.
This forces the use of the peripheral base address
Define MSPI_PORT macro for chip drivers
Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
Device tree configuration for USB serial node and clock control
fix for proper device initialization.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Remove the flash node defined in the default `v0.9.0` variant before
adding a new node for the `v0.7.0` variant. Fixes two instances of
`jedec,spi-nor` being present in the final dts.
Signed-off-by: Jordan Yates <jordan@embeint.com>
set _XOPEN_SOURCE appropriately to avoid compilation errors
due to missing S_IFxxx macros on some systems.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Today the thread analyzer depends on !ARCH_POSIX,
so this filter needs to filter any board for this architecture
not just native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As mentioned in the TSC Meeting of 7 August 2024
* Mahesh Mahadevan (mmahadevan108)
* Dan Kalowsky (dkalowsk)
will be the release managers for 4.0.
Let's update the MAINTAINERS files accordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Some kind of race condition caused the gpio_keys input module to
occasionally miss an event after boot. This is fixed by initializing the
pin state variable in the input_gpio_keys module.
Related to https://github.com/starcopter/bms-firmware/issues/6
Signed-off-by: Lasse Fröhner <lasse@starcopter.com>
Provide information how to configure mosquitto >= 2.0
for the mqtt publisher sample. Secondly, how to
configure ethernet interface in case the board is
connected directly to the host computer through LAN.
Signed-off-by: Jasper Jonker <jjasper.jonker@gmail.com>
This change is removing some deprecation warnings
which for some reason causing failing tests with
Python 3.12 on CI #76877.
Also, it fixes warnings from pytest like:
PytestCollectionWarning: cannot collect test class 'TestPlan'
because it has a __init__ constructor
(from: scripts/tests/twister/test_testplan.py)
Signed-off-by: Lukasz Fundakowski <lukasz.fundakowski@nordicsemi.no>
Add a new compliance check that reports any clang-format issues on
the git diff and prints a warning.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- Change the argument for i2c_is_read_op to a const pointer
- Add function i2c_is_stop_op to test if a message has a stop flag.
Signed-off-by: Yuval Peress <peress@google.com>