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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>