Commit graph

99906 commits

Author SHA1 Message Date
Anas Nashif
a91c6e56c8 arch: use same syntax for custom arch calls
Use same Kconfig syntax for those  custom arch call.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-12 12:43:36 +02:00
Anas Nashif
7f52fc4188 arch: custom cpu_idle and cpu_atomic harmonization
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>
2024-08-12 12:43:36 +02:00
Fin Maaß
e6235f49a7 drivers: ethernet: eth_xmc4xxx: fix get_phy
This fixes the eth_xmc4xxx_get_phy function.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-12 12:43:24 +02:00
Dawid Niedzwiecki
f39d8bbe2c arm: clear UNALIGN_TRP bit in CCR register
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>
2024-08-12 12:43:16 +02:00
Luca Burelli
e3cd6fc1c2 llext-edk: fix: add compile definitions to the generated EDK
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>
2024-08-12 12:43:09 +02:00
Luca Burelli
c77bcd2cf8 llext-edk: (refactor) unify variable names
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>
2024-08-12 12:43:09 +02:00
Alberto Escolar Piedras
ee08327b4c Bluetooth: drivers: userchan: Fix gcc 13 overflow warning
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>
2024-08-12 12:43:01 +02:00
Giancarlo Stasi
19c67d55b2 debug: tracing: Add Segger RTT init mode configuration
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>
2024-08-12 10:14:34 +02:00
Giancarlo Stasi
2f8af56042 drivers: console: rtt_console: use Segger recommended write API
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>
2024-08-12 10:14:34 +02:00
Giancarlo Stasi
711ed082a2 debug: tracing: Add Segger RTT linker section options
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>
2024-08-12 10:14:34 +02:00
Yong Cong Sin
5107320075 arch: common: isr_tables: add shell command
Add a shell command to dump the isr_tables.

```CONFIG_SYMTAB=n
uart:~$ isr_table sw_isr_table
_sw_isr_table[1035]

   7: 0x800056e2(0)
  11: 0x80005048(0x80008148)
  22: 0x800054ee(0x80008170)
```

```CONFIG_SYMTAB=y
uart:~$ isr_table sw_isr_table
_sw_isr_table[1035]

   7: timer_isr(0)
  11: plic_irq_handler(0x80008188)
  22: uart_ns16550_isr(0x800081b0)
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-12 10:10:57 +02:00
Yong Cong Sin
d6e0b43006 drivers: intc: plic: print ISR(ARG) in shell cmd
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>
2024-08-12 10:10:57 +02:00
Jonathan Rico
8a2fe27c00 Bluetooth: Host: Free ACL RX fragments on disconnection
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>
2024-08-12 10:10:48 +02:00
Jonathan Rico
5a4fdfbf3e Bluetooth: hci_common: Add assert on buf allocation
`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>
2024-08-12 10:10:48 +02:00
Jonathan Rico
e489ec2b95 Bluetooth: L2CAP: Add re-assembly stress test
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>
2024-08-12 10:10:48 +02:00
Maochen Wang
6d01073e79 manifest: Update hostap to remove els_pkc header file
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>
2024-08-12 10:10:29 +02:00
Sadik Ozer
37ffa074d0 boards: adi: Enable watchdog driver for MAX32690EVKIT
Watchdog enabled for MAX32690EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
de1d376c24 boards: adi: Enable watchdog driver for MAX32680EVKIT
Watchdog enabled for MAX32680EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
f66877d065 boards: adi: Enable watchdog driver for MAX32672 boards
Watchdog enabled for MAX32672EVKIT and MAX32672FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
56393b9a44 boards: adi: Enable watchdog driver for MAX32670EVKIT
Watchdog enabled for MAX32670EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
b7960d4777 boards: adi: Enable watchdog driver for MAX32666 boards
Watchdog enabled for MAX32666EVKIT and MAX32666FTHR boards

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Sadik Ozer
61140fa5f5 boards: adi: Enable watchdog driver for MAX32662EVKIT
Watchdog enabled for MAX32662EVKIT

Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
e3ba874f77 boards: adi: Enable watchdog driver for MAX32655 boards
Watchdog enabled for MAX32655EVKIT and MAX32655FTHR boards

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
cfcfea4a26 dts: arm: adi: Add watchdog inside devicetree
Add watchdog peripheral definiton inside device tree file
Add watchdog binding file

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Mert Vatansever <Mert.Vatansever@analog.com>
2024-08-11 19:18:56 -05:00
Furkan Akkiz
a6ae4f9221 drivers: watchdog: Add watchdog driver for MAX32xxx MCUs
Added watchdog driver for MAX32xxx MCUs

Signed-off-by: Furkan Akkiz <hasanfurkan.akkiz@analog.com>
Co-authored-by: Mert Vatansever <Mert.Vatansever@analog.com>
Co-authored-by: Sadik Ozer <sadik.ozer@analog.com>
2024-08-11 19:18:56 -05:00
Richard Wheatley
5ab83d8fee drivers: spi: remove old ambiq mspi
Remove the old Ambiq MSPI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-11 19:18:09 -05:00
Richard Wheatley
188fc58c72 drivers: update AMBIQ drivers to use proper base address
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>
2024-08-11 19:18:09 -05:00
Raffael Rostagno
6710fdf8a1 boards: doc: esp32c6_devkitc: Update for USB CDC
Board document update indicating USB CDC serial port support

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 19:16:35 -05:00
Raffael Rostagno
3dc2e83c7a usb: esp32c6: Add support for USB serial port
Device tree configuration for USB serial node and clock control
fix for proper device initialization.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 19:16:35 -05:00
Marcio Ribeiro
4bdcf44a8c cleanup: soc: esp32: IDF_TARGET parameters removal
IDF_TARGET parameters removed from soc/Kconfig and landed on Espressif hal

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
2024-08-11 19:16:04 -05:00
Jordan Yates
15aab68d29 boards: nordic: nrf9161dk: remove duplicate flash
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>
2024-08-11 10:33:53 +02:00
Raffael Rostagno
eca1112d5b tools: esp32: Update for esp32c2
Added argument to support custom baud rate on ESP monitor
for ESP32C2 and ESP8684.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-11 10:32:59 +02:00
Benjamin Cabé
4458a05ec2 fs: fuse: ensure S_IFxxx macros are available
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>
2024-08-11 10:32:20 +02:00
Alberto Escolar Piedras
40eae69e58 tests: debug/thread_analyzer: Fix platform filter
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>
2024-08-11 10:30:49 +02:00
Alberto Escolar Piedras
a747d1a747 MAINTAINERS: Update release notes owners for 4.0
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>
2024-08-09 11:42:39 -07:00
Richard Wheatley
777882d9b1 tests: drivers: rtc: rtc_api: boards: add conf file
Add configuration file to rtc_api

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
5beb73ae40 boards: ambiq: apollo4p_evb: add rtc to apollo4p_evb
Add RTC to apollo4 plus board

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
16a2f862ea dts: arm: ambiq: add ambiq rtc to dtsi file
Add Ambiq RTC to DTSI

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
0a945cbdec drivers: rtc: add ambiq rtc driver
Add Ambiq RTC driver

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
8f2413fbe2 dts: bindings: rtc: add ambiq rtc
Add Ambiq rtc binding

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Richard Wheatley
5f70958784 zephyr: west yaml update
Updated RTC due to Errata ERR126

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2024-08-09 17:58:35 +01:00
Przemyslaw Bida
bd05d0032c net: openthread: Clean not used defines in OT platform.
Remove unused `DEVICE_NAME` from OT `ble.c`.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2024-08-09 17:58:24 +01:00
Lasse Fröhner
710c89ed11 fix: initialize gpio_keys input from pin state
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>
2024-08-09 17:58:16 +01:00
Daniel Leung
2ef8c4e74f tests: debug/thread_analyzer: add some build tests
Add some build tests for thread_analyzer to catch build issues
at CI.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-09 17:58:03 +01:00
Erwan Gouriou
eec1044309 MAINTAINERS.yml: Add mathieuchopstm as STM32 collaborator
Will help on STM32 reviews.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2024-08-09 17:57:41 +01:00
Jasper Jonker
300f4e4c72 doc: net: mqtt: Add info for mosquitto >= 2.0
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>
2024-08-09 17:57:31 +01:00
Lukasz Fundakowski
857adb28e3 twister: Fix failing tests on CI with Python 3.12
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>
2024-08-09 09:27:59 -04:00
Pieter De Gendt
6a101ae962 scripts: ci: check_compliance.py: Add clang-format check
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>
2024-08-09 08:41:33 -04:00
Pieter De Gendt
f21c97a9c5 scripts: ci: check_compliance.py: Allow multiline annotations
Encode annotation message to allow multiline messages.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-09 08:41:33 -04:00
Yuval Peress
690134356c i2c_emul: Add support for CONFIG_I2C_TARGET_BUFFER_MODE
Add emulation and test to support the buffered target mode.

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-09 08:40:51 -04:00