Commit Graph

102488 Commits

Author SHA1 Message Date
Daniel Flodin 746c59c82a arch: kernel: lib: toolchain: Standardize TLS keyword
Up until now, the `__thread` keyword has been used for declaring
variables as Thread local storage. However, `__thread` is a GNU
specific keyword which thus limits compatibility with other
toolchains (for instance IAR).

This PR intoduces a new macro `Z_THREAD_LOCAL` which expands to the
corresponding C11, C23 or C++11 standard keyword based on the standard
that is specified during compilation, else it uses the old `__thread`
keyword.

Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
2024-09-23 10:01:48 +02:00
Chew Zeh Yang 62c0fc3e14 drivers: gpio_ambiq: Fixed uninitialized return variable
Fixed uninitialized return value variable issue, which would cause
functions to wrongly return non-zero value despite a successful
execution.

Signed-off-by: Chew Zeh Yang <zeon.chew@ambiq.com>
2024-09-23 10:01:40 +02:00
Yong Cong Sin d250664dc7 bluetooth: host: fix formatter warnings
Update the string formatter according to the type of the
variables that it is printing to eliminate compilation
warnings.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-23 10:01:34 +02:00
Yong Cong Sin e2310396d6 samples: shell_module: move login cmds into a separate file
Was getting compilation error due to `CONFIG_SHELL_CMD_ROOT`
not being defined whe building the sample under certain
configurations.

The `CONFIG_SHELL_CMD_ROOT` is defined and used only when
`CONFIG_SHELL_START_OBSCURED` is enabled, we can simply move
it to another file and rely on CMakeLists.txt to compile.

Run the `login_init` with `SYS_INIT` so that the `main()`
do not need to have knowledge of its existence.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-23 10:01:34 +02:00
Quy Tran c17a8d3e84 drivers: i2c: change to use IRQ_CONNECT in Renesas RA i2c driver
Change to use IRQ_CONNECT instead of IRQ_DIRECT_CONNECT

Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2024-09-23 10:01:26 +02:00
Grzegorz Swiderski 9d1b361265 cmake: Require Python >= 3.10
The minimum Python version was bumped for Zephyr LTSv3, but only in the
documentation and CI. The build system would still accept Python 3.8,
yet some scripts in tree have already broken support with that version.
Incompatibility errors should be prevented early.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-09-23 10:01:20 +02:00
Lukasz Mrugala cbe5d9833b scripts: Remove wrong bz package
Package in the requirements-run-test.txt file, bz,
is not package enabling bz2 support.
It is a security concern and must be removed.

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
2024-09-23 09:59:56 +02:00
David Demelier e268b56699 docs: adi: Fix table rendering
Improper reStructuredText table syntax breaks rendering.

Signed-off-by: David Demelier <markand@malikania.fr>
2024-09-23 09:59:25 +02:00
Dmitrii Golovanov 4cc3134aa1 scripts: twister: Don't use match/case statements
Don't use match/case syntax to allow twister to run with
python3 versions < 3.10.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2024-09-21 12:24:05 +01:00
TOKITA Hiroshi 42020f202f tests: drivers: build_all: Add auxdisplay drivers test
Add build_all test for auxdisplay drivers.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:51 +01:00
TOKITA Hiroshi 923f47dd80 drivers: auxdisplay: Remove unused variables
Remove unused variables for suppress warnings

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:51 +01:00
TOKITA Hiroshi 325d7df026 tests: drivers: build_all: led_strip: Add RaspberryPi Pico PIO driver
Add build tests for "worldsemi,ws2812_rpi_pico_pio" driver

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
TOKITA Hiroshi 945f9291c4 drivers: led_strip: tlc5971: Enable when the dt-node exists
The TLC5971_STRIP config enables if the "ti,tlc5971" node exists.
Also, removing the setting that explicitly enables in the
`tests/drivers/build_all/led_strip` test.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
TOKITA Hiroshi 295078e8ec tests: drivers: build_all: led_strip: Add i2c-devices build test
Add build tests for following devices.

- apa,apa102
- greeled,lpd8806
- worldsemi,ws2812-spi

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-09-21 12:23:45 +01:00
Yong Cong Sin 022041edba soc: riscv: andes_v5: fix PMA compilation warnings
These static functions in the `pma.c` are used only when
`CONFIG_NOCACHE_MEMORY` is enabled, so guard them accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-21 12:23:39 +01:00
Fabian Blatz 7e2337a1b7 drivers: stepper: shell: Add test for stepper shell
Adds a basic test suite for the stepper shell commands.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Fabian Blatz c525dc0813 drivers: stepper: Add fake stepper driver
Add `zephyr,fake-stepper` compatible which can be used inside of unit
tests.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Fabian Blatz c694858d06 drivers: stepper: add stepper shell
Add shell commands to enable/disable, move, set velocity, configure
micro-step resolution, and display stepper motor status. Includes an
`info` command to output all relevant data with graceful handling of
unsupported features.

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-09-21 12:23:19 +01:00
Marek Matej 7aa710287b samples: wifi: ESP32-S2 sample configuration
Remove the system heap override config from the board sample config.
Remove the memory saving restrictions.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 548131476e boards: espressif: Update system heap increment
Remove the system heap increment based on used parts.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej a1c4552ea9 soc: esp32c6: Add runtime heap symbols
Update the linker scripts to provide necessary symbols.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej bf2c67c441 soc: esp32c2: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Update the ROM-code SRAM usage according the IDF main.
Fix static allocations size check.
Increase iram_seg memory size for MCUboot.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 2683774265 soc: esp32c3: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocations size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 13a59fb855 soc: esp32s3: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocations size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 3784beb6cc soc: esp32s2: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix the loader ROM buffers start address.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 94731488e7 soc: esp32: ESP WiFi heap
Provide symbols for the creation of dynamic memory pool.
Fix static allocation size check.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej 15d0189d3e soc: espressif: Introduce runtime heap mempool
Add the `CONFIG_ESP_RUNTIME_HEAP` kconfig.
This allows the memory pool to be created starting
at `z_mapped_end` ending at `_heap_sentry`.

Added choice symbol ESP_WIFI_HEAP_* to select which
heap to use in the ESP WiFi adapter module.

Add file heap.c with code to initialize the runtime heap.
Size of the pool is checked during the runtime.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Marek Matej e05d3ba661 manifest: update hal_espressif
Get latest necessary changes to support the following changes.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-09-21 11:29:53 +02:00
Daniel Leung 2c551554e2 riscv: support dumping privilege stack during coredump
Adds some bits to enable dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung 4c5e33b2c2 soc: cdns/dc233c: advertise coredump with privilege stack
This lets the SoC to select the correct kconfigs to show that
it supports coredump, and with the ability to dump privilege
stack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung efb2a354a0 xtensa: coredump: support dumping privilege stack
Adds the bits to support dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung a3f4251ed5 x86: coredump: support dumping privilege stack
Adds the bits to support dumping privilege stack during
coredump.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung 71bea33894 tests: debug/coredump: crash from user thread if userspace
Modify the test to spawn a user thread if it is running
with userspace enabled. This allows testing coredump when
the crashing thread is a user thread.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung 4f52860fe0 debug: coredump: dump privileged stack
This adds the bits to call into architecture code to dump
the privileged stack for user threads.

The weak implementation is simply there as a stub until
all architectures have implemented the associated function.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Daniel Leung f5163d8940 arch: add interface to dump privileged stack in coredump
This adds a interface to allow coredump to dump privileged
stack which is defined in architecture specific way.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-09-21 11:29:39 +02:00
Emil Gydesen e1e4f2a2af Bluetooth: Host: Set scan option type to uint8_t
Changed the scan option type from uint32_t to
uint8_t.

There are 2 reasons for this:
1) This reduces the size of the struct bt_le_scan_param.
   Since we are now storing two copies of scan parameters
   statically in the host, this is not insignficant.
2) This fixes a "hole" in the struct. There are no longer
   3 empty octets between the `type` and the `options`, which
   caused valgrind warnings when using `memcpy` and `memcmp`
   of the struct.

Currently we only need 8 bits for the options available.
If additional options are added later, the field need
to be increased. For the above reasons some additional
refactoring my be required to avoid significant size
increases and the valgrind issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-09-21 11:29:21 +02:00
Anas Nashif f08c91a7e4 soc: stm32g4x/stm32l0x: fix soc hook calls
Missed 2 places related to power management.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-21 11:29:06 +02:00
Anas Nashif 3eded9d10d soc: intel_ish: remove duplicate hook
Remove duplicate hook and fold power code into the same early soc hook.

Fixes #78776

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-09-21 11:29:06 +02:00
David Brown c3438903d2 github: workflows: Add cargo support to twister
Add cargo's bin to the path, and print out the versioning of the tool to
make it easy to ensure the right version has been installed.

Signed-off-by: David Brown <david.brown@linaro.org>
2024-09-20 15:25:05 -05:00
Emilio Benavente 63308c5f13 tests: drivers: dma: Enabled DMA Tests for MIMXRT1010_EVK
The Buffer data was being stored in cacheable memory for
the MIMXRT1010_EVK, the caching is not handle in these
test and cause mimxrt1010 to fail, this commit moves the
memory region to DTCM and in some cases lowers the size
of the DATA Buffer since it won't fit in DTCM for MIMXRT1010_EVK

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2024-09-20 15:23:58 -05:00
Chekhov Ma c93a5de3ae drivers: mcux_igpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Chekhov Ma a296705d37 drivers: mcux_rgpio: improve pin-gaps handling
Improve handling of "pin-gaps" using "GPIO_DT_RESERVED_RANGES_NGPIOS"
series macro.

Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
2024-09-20 15:18:49 -05:00
Felipe Neves 2aa7cb5a7c samples: drivers: video: add arduino nicla vision
As supported board to the video capture sample.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Felipe Neves 591b7d380b drivers: video: gc2145: add resolution support
Add VGA and QVGA resolution support to enable
usage of gc2145 sensor by smaller ram capable devices.

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Felipe Neves cdca844d3a boards: arduino_nicla_vision: add camera subsystem
initial support on device tree

Signed-off-by: Felipe Neves <ryukokki.felipe@gmail.com>
2024-09-20 15:18:13 -05:00
Krzysztof Chruściński af391b8b3f logging: frontend: stmesp_demux: Improve robustness
Demultiplexer was not ready to handle case when log message was
incomplete which was followed by other log messages. Such scenario
could occur if there was a fault that happen during logging of
a message. In that case incomplete message was followed by valid
messages (fault report) and this fault report was not handled
because processing was blocked waiting for completion of a
message which preceeded fault report.

Since it is expected that some messages may be incomplete a
garbage collection mechanism is added. When start of a message is
received timestamp is logged and list of incomplete messages
is checked for 'old' messages which persist in incomplete state
for long. When message timeouts it is closed and marked as
invalid. It unblocks processing of following messages.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:46 -05:00
Krzysztof Chruściński da8ba3efa4 logging: frontend_stmesp: Avoid unaligned word access
write_data function which was writing to STMESP data registers was
starting by writing words and tail was written using byte access.
However, RISCV core does not support unaligned access and on Cortex-M33
even if supported it is faster to do aligned access. Reworked
write_data to start first by writing data using byte or half word
access until data pointer is word aligned, then word access is used
and finally tail is written using byte or half word access.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:16 -05:00
Krzysztof Chruściński d7a62bdeb6 logging: frontends: stmesp: Run clang-format
Apply clang-format formatting.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-09-20 15:16:16 -05:00
Tom Chang 0b04b772cb boards: npcx_evb: update espi vw index for DnX
This CL updates the virtual wire index to support DnX_WARN signal for
npcx4m8f_evb.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00
Tom Chang 9795dc2758 drivers: espi: npcx: add support to customize vw index
This CL adds support to revise vw index accroding to the
vw-index-extend-set.

Signed-off-by: Tom Chang <CHChang19@nuvoton.com>
2024-09-20 15:14:57 -05:00