Commit graph

99516 commits

Author SHA1 Message Date
Mark Holden
a56e2f86cc coredump: Enable thread understanding for arm cortex m
Add support in arm_cortex_m python script to read thread
registers off of a thread's stack when switching context.

When CONFIG_ARM_STORE_EXC_RETURN is enabled, check the exc_return value
in thread's arch struct to determine accurately where the stack pointer
is. Also, set r7 (the frame pointer register) in case the frame pointer
is not omitted.

Only 8 registers are read from the top of the stack
for other threads present in the dump. So update the
script to reflect that.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
0b9b33c540 coredump: Enable understanding of threads in scripts
Update zephyr gdb-server scripts to understand threads.

Parse the kernel_thread_info out of the elf file to be used
for finding offsets to data from _kernel structs or from
individual threads.

Update log_parser to understand latest format change, which
allows for the presence of a new section, threads metadata.

Update gdbstub to respond to various packets to describe
the threads present in a dump, and allow switching to
thread context of each thread.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
c35f6d1cac coredump: Add test for threads core dump config
Add z_test which uses new configs to capture multiple
threads in a core dump and with all of the context
necessary to debug the threads.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Mark Holden
45684a598d coredump: Add config for capturing thread data in core dump
Update core dump file format to support a new section which contains
metadata about threads necessary for debugging.

Define configs to capture that metadata and include it in the dumps
when enabled.

Update documentation to reflect the changes.

Signed-off-by: Mark Holden <mholden@meta.com>
2024-08-02 03:32:09 -04:00
Glenn Andrews
9bd0a3f05b doc: boards NXP VMU RT1170 remove broken links
NXP and CogniPilot have removed documentation from their web pages.

Delete the broken links.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-08-02 03:31:55 -04:00
Anke Xiao
bdaeab3537 tests: drivers: uart: uart_basic_api: add configuration for frdm_ke17z512
Add uart configuration for UART driver, add frdm_ke17z512_uart.overlay
and update testcase.yml to support UART testing.
There are LPUART and UART IPs in frdm_ke17z512 platforms, so add
additional shell tests as UART, the shell instructions can be entered
on the UART console window.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
7b72c6f2d9 boards: nxp: frdm_ke17z512: update pinctrl dtsi file
Add uart pinctrl configuration to support uart driver.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
ff0e69607c dts: arm: nxp: nxp_ke17z512.dtsi: add uart driver support
Update dtsi to add uart driver support, there is no error irq
on mke17z9.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Anke Xiao
c7562f7122 drivers: serial: uart_mcux.c: add a feature macro wrap specific code
The enableRxRTS and enableTxCTS can only be configured when the
'UART_HAS_MODEM_SUPPORT' feature is enabled.
Uart has no 'error' IRQ on frdm_ke17z512, so update irq configuration
to configure the error interrupt when it exists.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-02 03:31:38 -04:00
Grzegorz Chwierut
663786d0a4 twister: Skip scanning non-ztest tests in Twister
Twister scans C-files to find testcases that are implemented
using ZTest framework. Also runs scanning of Elf files
after building. Skip scanning files if it is not required.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-08-02 03:31:24 -04:00
Fabio Baltieri
f3a6454f93 pm: refactor pm_device_driver_init
Refactor pm_device_driver_init code to keep the normal execution path
inline and the early exit branches at a single indentation, this is
commonly done throughout the code base.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-02 03:31:17 -04:00
Chris Friedt
91e0a4b9ac misc: move lorem ipsum text to zephyr/misc/lorem_ipsum.h
Instead of duplicating Lorem Ipsum in several places, let's
consolidate in one location.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-02 03:31:06 -04:00
Jose Alberto Meza
c76e776b67 drivers: i3c: common: Do not tread GETCAPS failure as error for 1.0 device
If it's a I3C v1.0 device without any HDR modes do not treat as an error
if GETCAPS gives no valid response.

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2024-08-02 03:30:47 -04:00
Gero Schwäricke
67f8118a72 boards: hardkernel: odroid_go: fix SiP variant
Odroid Go uses a custom ESP WROVER-E N16R4, i.e., 16 MB of flash and
4 MB of PSRAM [1].

[1] https://wiki.odroid.com/odroid_go/odroid_go#specifications

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-02 03:30:25 -04:00
Gero Schwäricke
776ecbca0f soc: espressif: esp32: add WROVER-E-N16R4 SiP variant
It seems this SiP variant is not sold by espressif directly, but it is
used by the Odroid Go. The Odroid Go documentation calls this a "custom"
model [1].

There already exists a SiP specific device tree include file:

  zephyr/dts/xtensa/espressif/esp32/esp32_wrover_e_n16r4.dtsi

[1] https://wiki.odroid.com/odroid_go/odroid_go#specifications

Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
2024-08-02 03:30:25 -04:00
Luis Ubieda
4b26f8616b doc: shields: Add section on using Source Code
Providing guidance on how to add Source Code on Shields, as well as
clarifying the purpose.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-08-02 03:30:14 -04:00
Peter Mitsis
1bb5f3a52b tests: kernel: Add ISR tests for k_thread_priority_set()
Adds tests demonstrating k_thread_priority_set() being called
from the context of an ISR.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-02 03:29:55 -04:00
Peter Mitsis
8c48665868 kernel: Remove k_thread_priority_set() restriction
Removes the ISR restriction from k_thread_priority_set().
Since the first commit, the routine k_thread_priority_set() has
had a restriction preventing it from being called from within
the context of an ISR. As there does not (any longer) appear to
be a reason why the restriction exists, it is being removed.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-02 03:29:55 -04:00
Daniel Kampert
3bf35ce696 drivers: rtc: Change error to ENODATA in get time function
- Change the error type from ECANCELED to ENODATA

Signed-off-by: Daniel Kampert <DanielKampert@kampis-elektroecke.de>
2024-08-02 03:29:41 -04:00
Andrzej Głąbek
791ba98e7a dts: bindings: nordic: Require pinctrl-names together with pinctrl-0
... so that a clear devicetree error is reported when the pinctrl-names
property is missing, not a quite cryptic compilation error about an
undeclared PINCTRL_STATE_*_UPPER_TOKEN symbol in pinctrl.h.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2024-08-02 03:29:30 -04:00
Joakim Andersson
0efbbcb7fd drivers: gnss: Handle malloc returning NULL pointer
Handle malloc returning NULL pointer, set err and return from function.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Joakim Andersson
76907ff399 drivers: gnss: Do not re-assign err from helper function
Do not re-assign err from helper function, this just causes loss of
information from the helper function.
Only possible err returned is -EINVAL, so not a functional change.

Signed-off-by: Joakim Andersson <joerchan@gmail.com>
2024-08-02 03:29:18 -04:00
Anders T. Akre
26cd98e483 modem: ubx: fix incoming byte processing
`ret` holds the amount of bytes received from the modem. However during
processing of the bytes its value is overwritten by the return value of
`modem_ubx_process_received_byte`, in practice discarding all but the
first byte read.

To prevent this, store the length in a separate variable.

Signed-off-by: Anders T. Akre <anders@akre.io>
2024-08-02 03:29:18 -04:00
Benjamin Cabé
93c9da6694 ci: manifest: fix wrong version being used for action-manifest
A typo in "1.3.0" tag is causing CI to fail since the actual tag is
"v1.3.0"

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-01 12:08:51 -04:00
Rubin Gerritsen
d31caf90b5 ring_buffer: Remove duplicate documentation line
No need to have the same documentation line twice.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-01 16:49:44 +01:00
Jonathan Rico
1c6510312d Bluetooth: L2CAP: Set NULL callback for PDUs
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.

Static channels don't have this issue, as every "SDU" fits into one PDU.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
2024-08-01 16:49:37 +01:00
Jonathan Rico
8d7c1bc7bc Bluetooth: remove forgotten TODO
It's already done.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
08706f98bc Bluetooth: adapt l2cap/userdata test
Modify the test so it checks that user_data is used and then cleared by
the stack.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
ea9449979b Bluetooth: L2CAP: Mark user_data as owned by the stack
Storing stuff in user_data? That's a paddlin'

We have been debugging issue after issue because ownership of this
"user" data is not clearly defined. Now it is. L2CAP owns the user_data
field entirely, as soon as `send()` is called.

Also add a warning and retval using CHECKIF.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
5c6cd27723 Bluetooth: allow compiling host with CONFIG_NO_RUNTIME_CHECKS
Werror fails the build on that function.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Jonathan Rico
d02a13d726 Bluetooth: host: add more info to conn.c log
Print user_data and callback pointers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-01 16:49:37 +01:00
Lucas Tamborrino
7b27d4c9d5 drivers: adc: esp32: Fix calibration scheme for esp32s3
ESP32S3 requires ESP_ADC_CAL_VAL_EFUSE_TP_FIT calibration
scheme. The use of ESP_ADC_CAL_VAL_EFUSE_TP is not supported
in the SoC..

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-01 16:49:25 +01:00
Fabio Baltieri
f1a639ca9f console: ipm_console_sender: fix function naming camel case
Should be console_out not consoleOut.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Fabio Baltieri
e466efaf74 libc, console: declare __stdout_hook_install in libc-hooks.h
Declare __stdout_hook_install in libc-hooks.h and use it in the console
drivers rather than redeclare it every time.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 16:49:08 +01:00
Dominik Ermel
2f530cfbbd samples/soc_flash_nrf: Fix soc_flash_nrf doc and printfs
The commit fixes soc_flash_nrf sample documentation where incorrect
partition names has been used and removes information of
CONFIG_TRUSTED_EXECUTION_NONSECURE affecting which partition is used
as this is no longer true.

The printf message reporting start of sample has been modified
to print "Nordic nRF5 Flash Sample" instead of
"Nordic nRF5 Flash Testing", which is more accurate for code
residing in samples.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-08-01 16:48:30 +01:00
Carles Cufi
e898de52df github: workflows: Update manifest action to detect impostor commits
See additional info in:
https://github.com/zephyrproject-rtos/action-manifest/pull/12

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-08-01 16:47:43 +01:00
Nikodem Kastelik
43128052e7 drivers: serial: nrf: add default value for frame timeout cfg
This is needed to avoid warnings about uninitialized
structure member, which was added in nrfx 3.6.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
443276eccb modules: hal_nordic: nrfx: sync configs for UARTE MAGIC_BYTE option
New option is used in RX FIFO flush workaround
performed by the nrfx_uarte driver.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
c0ede7106e modules: hal_nordic: nrfx: remove nrfx_uarte rx cache for nrf54l15 enga
This option is no longer valid for nRF54L15 Eng A target.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Nikodem Kastelik
492a474c62 manifest: update hal_nordic revision to integrate nrfx 3.6.0
New nrfx version contains support
for nRF54L20 Eng A and nRF9230 Eng B devices.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-08-01 16:45:04 +01:00
Théo Battrel
c1a2c5b8a8 Drivers: ssd1306: Respect segment-offset DTS property
Update `ssd1306_write_default` to take into account the `segment_offset`
property. This is needed for some displays to show the image correctly.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Théo Battrel
bfb541ccbe Drivers: ssd1306: Add use_internal_iref DTS option
Necessary for supporting for EastRising 0.42 OLED display/board.

Some boards don't have external Iref set up. This is probably done in an
effort to save on component cost. This command is only documented in the
V1.1 revision of the SSD1306 datasheet.

See issue https://github.com/olikraus/u8g2/issues/1047

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-08-01 16:44:24 +02:00
Martin Stumpf
77eafac1bf linker: section_tags: fix missing include
If using `<zephyr/linker/section_tags.h>` without including
`zephyr/linker/sections.h` as well, we get a warning an the linker fails
to place the data in the desired section.

Signed-off-by: Martin Stumpf <finomnis@gmail.com>
2024-08-01 16:44:05 +02:00
Mathieu Choplain
94c375ed2f drivers: sensor: stm32_vref: update incorrect comment
The ICACHE must be disabled on STM32H5 series due to documented
behaviour of the flash controller, not to an errata.

For a more technical explaination: (see RM0492 for references)
 -  on STM32H5, the ICACHE block is interposed on C-bus between
    the Cortex-M33 and the FLASH (§2.1.1)
 -  the ICACHE determines if accesses are cacheable or non-cacheable
    based on an AHB attribute; the Cortex-M33 sets this attribute or
    not depending on the MPU configuration (§8.4.6)
 -  when a cacheable access is requested by the Cortex-M33, if the
    requested data is not present in ICACHE (cache miss), a cache line
    refill (128-bit burst read) is performed (§8.4.7)
 -  however, all accesses to OTP and Read-Only regions of the FLASH must
    be done with caching disabled (§7.3.2); indeed, the accesses MUST be
    16 or 32-bit sized - otherwise, the flash interface raises a bus
    error (§7.5.9 / Table 38 "OTP/RO access constraints").

    This is the behaviour that was observed and lead to the introduction
    of ICACHE disable code in 065a8f25e1.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
bbfe499874 boards: nucleo_h753zi: disable Vbat sensor
This commit disables the Vbat sensor on the Nucleo-H753ZI
board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
0a16d6fc2d boards: stm32h735g_disco: disable Vbat sensor
This commit disables the Vbat sensor on the STM32H735G
Discovery board, as the corresponding ADC is not enabled.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
c77d5b8c3b drivers: sensor: stm32_vbat: handle disabled ADCs more gracefully
This commit modifies the STM32 battery voltage sensor driver
to handle erroneous usage more gracefully. More precisely,
it now fails builds with an explicit error message when the
sensor is enabled but the corresponding ADC is not. This can
only happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
1e0e3a874f drivers: sensor: stm32_vref: handle disabled ADCs more gracefully
This commit modifies the STM32 internal voltage reference sensor
driver to handle erroneous usage more gracefully. More precisely:
  - driver no longer builds if no ADC node is enabled
  - fail builds with an explicit error message when the sensor
    is enabled but the corresponding ADC is not. This can only
    happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
8d40279644 drivers: sensor: stm32_temp: handle disabled ADCs more gracefully
This commit modifies the STM32 internal temperature sensor driver
to handle erroneous usage more gracefully. More precisely:
 - driver no longer builds if no ADC node is enabled
 - fail builds with an explicit error message when the sensor
   is enabled but the corresponding ADC is not. This can only
   happen on STM32 series with more than one ADC (e.g., H7).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00
Mathieu Choplain
47187a9ec9 dts: bindings: STM32 ADC: don't require pinctrl
This commit removes the requirement for pinctrl in the STM32 ADC binding.
This allows usage of ADC with internal channels only (no GPIO pin waste).

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-01 16:43:51 +02:00