Commit graph

94083 commits

Author SHA1 Message Date
Wei-Tai Lee 5db2590106 soc: andestech: Remove l2_cache.c
Replace l2_cache.c with cache driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-04-22 09:19:27 -04:00
Wei-Tai Lee 6b26cdb7e0 soc: andestech: set default cache type
Configure default cache driver as external cache driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-04-22 09:19:27 -04:00
Wei-Tai Lee 80f9736115 drivers: cache: add Andes cache driver
Add cache driver for Andes cache.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-04-22 09:19:27 -04:00
Wei-Tai Lee d1e2c8bea5 soc: andestech: add the definitions for cache driver
Add some definitions for cache driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2024-04-22 09:19:27 -04:00
Fin Maaß bb2e53656f doc: release-notes: 3.7: new hawkbit features
Mention new features of hawkbit in the release notes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-22 09:09:56 -04:00
Karthikeyan Krishnasamy 5233a4fa92 doc: posix: mark ftruncate as supported
Add POSIX FD_MGMT option and mark ftruncate as supported
in POSIX Option group Documentation

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-22 04:33:16 -07:00
Karthikeyan Krishnasamy 1ddefc6ba0 doc: posix: mark fynsc as supported
Mark fsync as supported in POSIX options Documentation

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-22 04:33:16 -07:00
Karthikeyan Krishnasamy cc06c2b21f lib: posix: fs: fix errno handling
ftruncate should return -1 on errors and it needs to
set appropriate error values in errno

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-22 04:33:16 -07:00
Jamie McCrae 191b3cbe10 boards: Fix doc build warnings
Fixes warnings when building documentation due to additional SoC
names being part of the Kconfig symbols which they should not be

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-22 03:48:57 -07:00
Laurentiu Mihalcea fb7e9379e1 cmake: add control over inline source code disassembly
By default, the generated disassembly file (i.e: the .lst
file) also contains inline source code. This has the
potential to become problematic when attempting to compare
the generated .lst files accross platforms since they may
differ for various reasons. As such, add the option to
control whether the disassembly file should contain inline
source code or not.

The need for this patch was sparked by the differences
observed in the generated .lst file for Linux and Windows
in one of SOF's CI jobs (details in thesofproject/sof/issues/9034),
which were caused by the addition of the inline source code.
With this, we can keep testing for reproducible builds while
not having to deal with differences in the .lst files caused
by things such as having ".." include paths.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-22 03:48:43 -07:00
Alberto Escolar Piedras 992148375c boards: nrf*bsim: Disable ubsan in bst_install
UBSAN reports a bogus error in this function:
"load of address x with insufficient space for an
object of type '<unknown> *'"
as it seems unable to determine the size of
test_installers.
Let's disable this check in this function.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-22 03:48:32 -07:00
Alberto Escolar Piedras 0263e0205b toolchain gcc: Provide a no UBSAN attribute macro
Provide a macro to set the no undefined sanitizer
attribute in symbols.
To allow skipping its checks/modifications in symbols
in which it is known to either cause trouble or report
false positives.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-22 03:48:32 -07:00
Bartosz Miller 3147243c8f tests: drivers: uart: uart_elementary: Fix 'config_mismatch' test case
UART error may be reported with random timing
from either UART in configuration mismatch case.
The test case is now aligned to such behaviour.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-04-22 03:48:26 -07:00
Pieter De Gendt 5919bd988b include: linker: common-rom-logging: Fix log_strings section subalign
Commit 89679cd975 replaced hard-coded alignment with a define,
but a regression was introduced with a missing SUBALIGN.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-22 09:52:12 +02:00
Kai Vehmanen 45205f865e dts: xtensa: intel_adsp_ace20: correct SSP definition
The ace20 description has incorrect number of SSP instances
described. Correct number should be 3.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-21 03:28:17 -07:00
Kai Vehmanen aecf19c3c1 dts: xtensa: intel_adsp_ace15: correct SSP definition
The ace15 description has incorrect number of SSP instances
described. Correct number should be 3.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-21 03:28:17 -07:00
Kai Vehmanen bc63835ba2 dts: xtensa: intel_adsp_cavs25_tgph: correct SSP definition
The tgph description has incorrect number of SSP instances
described. Correct number should be 3.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-04-21 03:28:17 -07:00
Yong Cong Sin 6a497ac373 doc: release: add notes on RISC-V's stack unwinding
Add an entry in the RISC-V arch section about the
implementation of frame-pointer based stack unwinding.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-20 13:54:43 -04:00
Yong Cong Sin b8b98c2c29 tests: arch: common: add stack_unwind test
Added test for archs that support it. It triggers an exception
and verify that the fatal message has stack unwind info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-20 13:54:43 -04:00
Yong Cong Sin 7398831884 arch: riscv: implement frame-pointer based stack unwinding
Influenced heavily by the RISCV64 stack unwinding
implementation in the Linux kernel.

`CONFIG_RISCV_EXCEPTION_STACK_TRACE` can be enabled by
configuring the following Kconfigs:

```prj.conf
CONFIG_DEBUG_INFO=y
CONFIG_EXCEPTION_STACK_TRACE=y
CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y
CONFIG_OMIT_FRAME_POINTER=n
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-20 13:54:43 -04:00
Ryan McClelland 732c2e1989 i3c: add i3c shell
Add an I3C shell. This includes support of all I3C CCC commands that
currently have helper functions implemented. This also includes all
the read/write shell commands that the i2c shell supported. An Info
command is also provided which will print out all i3c and i2c info
of an i3c bus. Only SDR read/writes are currently implemented.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-04-20 13:46:26 -04:00
Marcin Niestroj 8654daeebd twister: pytest: use runner_params from hardware map YAML file
Use 'runner_params' specified in hardware map YAML file. This allows to
configure custom params (like openocd's adapter configuration for
FT232-based probe) when used with pytest harness.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-20 13:45:44 -04:00
Peter Mitsis 461fcf4cef linker: drivers: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'drivers' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis 02cc127475 linker: subsys: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'subsys' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis 30625e4c98 linker: samples: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'samples' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis 62db185d5b linker: tests: Use Z_LINK_ITERABLE_SUBALIGN
Updates the linker script fragments under 'tests' to use
Z_LINK_ITERABLE_SUBALIGN for the subalignment instead of
a hardcoded value of 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis 89679cd975 linker: Add Z_LINK_ITERABLE_SUBALIGN
The macro Z_LINK_ITERABLE_SUBALIGN is used by linker scripts to
select the default subalignment based on whether it is 32/64-bit
architecture. 64-bit architectures set the default subalignment
to 8, while 32-bit architectures set it to 4.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis d382c3d644 logging: Update log_source_dynamic_data struct
Updates the log_source_dynamic_data structure to be a multiple of 8
bytes in size on 64-bit platforms.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Peter Mitsis 48fdcfd992 tests: Update iterable sections test
Updates the test_ram/test_rom structures to use a 'long' instead
of an 'int' so that the structure sizes will be 4-bytes on 32-bit
platforms and 8-bytes on 64-bit platforms.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-04-20 13:45:25 -04:00
Bartlomiej Buczek 0b076a93ca twister: pytest: hardware_adapter: adapt to nrfutil.
add --dev-id to flashing command also when nrfutil runner is used.

Signed-off-by: Bartlomiej Buczek <bartlomiej.buczek@nordicsemi.no>
2024-04-20 13:44:24 -04:00
Daniel DeGrasse e396923198 dts: bindings: mipi-dbi: fix language describing mipi dbi modes
Update language describing mipi dbi modes to be more clear, removing a
run-on sentence

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-20 13:44:07 -04:00
Daniel DeGrasse 7d3fe8ea00 include: drivers: mipi_dbi: document return value for mipi_dbi_release
Add documentation for possible return codes of mipi_dbi_release.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-04-20 13:44:07 -04:00
Denis Bourqui e3e009a199 logging: Fix backend filter setting
Call filter_set with backend-id instead of backend-index
when applying a filter on all backends.

Signed-off-by: Denis Bourqui <db@rnx.ch>
2024-04-19 18:01:03 +00:00
Pisit Sawangvonganan 6d99f3797a drivers: flash: spi_nor: clean up unnecessary code
This commit removes unnecessary usage of the `ARG_UNUSED` macro and
unnecessary initialization of the `ret` variable where its value is
guaranteed to be overwritten by subsequent operations.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-04-19 17:55:25 +00:00
Jukka Rissanen b864cd9053 net: if: Do not add IPv6 address lifetime timer twice to list
The IPv6 address lifetime timers are kept in a slist, but
the code that adds the entry to the list does not check
whether the item is already in the list. This will cause
problems when trying to remove the address from the list.

Normally this is not causing issues, but if the function
net_if_ipv6_addr_update_lifetime() is called multiple times
before the address expires, then the item was added to the
slist multiple times.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-04-19 17:04:17 +00:00
Johann Fischer fa5cfbd937 test: device_next: add overlays to build all functions
Add overlays and test case to build all USB device functions.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-04-19 17:04:00 +00:00
Martin Åberg c4766f9572 scripts/checkpatch: Improve blank line check after declarations
This adds volatile type qualifier to the struct declaration matching
when looking for blank line after declarations.

Before this commit, this structure was not accepted by chheckpatch:
  struct cfg {
         struct gpio_driver_config common;
         volatile struct grgpio_regs *regs;
         int interrupt;
  };

checkpatch.pl generated the following warning:
  -:158: WARNING:LINE_SPACING: Missing a blank line after declarations
  #158: FILE: drivers/gpio/gpio_grgpio2.c:27:
  +	struct gpio_driver_config common;
  +	volatile struct grgpio_regs *regs;

With this commit, the warning is no longer generated.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2024-04-19 17:03:49 +00:00
Alberto Escolar Piedras 8e20b80575 drivers/timer grtc: Fix for ISR prototype
Interrupt handlers are expected to have a pototype
void (const void*)
but nrfx_grtc_irq_handler has just a void(void)
(with no input parameter).
Fix it by using a trampoline.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-19 16:56:16 +00:00
Adrian Warecki 9342938ad1 mm: Fix sys_mm_drv_unmap_region documentation
Fixed an obvious mistake in the description of the return value of the
sys_mm_drv_unmap_region function.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
2024-04-19 16:56:05 +00:00
Krzysztof Chruściński b36550b8a5 tests: drivers: uart: uart_elementary: Fix RX handling
Rx_byte_offset was wrongly updated which could lead to test
failures.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:55:46 +00:00
Piotr Kosycarz 5b5f45072b boards: nordic: nrf54l15pdk: enable HWFC
For both UARTs connected to debugger chip.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-19 16:55:37 +00:00
Marcin Szymczyk c26bc94f19 boards: nordic: nrf54l15pdk: fix flashing for CPUFLPR_XIP
`board.cmake` specified runner arguments only for the RAM-based variant,
use SOC config to support both:
`CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUFLPR` and
`CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUFLPR_XIP`.
Also align ARM target so it looks nice.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-04-19 16:55:28 +00:00
Grzegorz Swiderski f16b33e902 soc: nordic: Fix undefined z_arm_platform_init
Fixes #71511
Follow-up to #70977

Update the approach by moving the `PROVIDE` directive to a separate
linker script added using `zephyr_linker_sources()`. This makes the
change more likely to propagate to existing samples which are using
CONFIG_CUSTOM_LINKER_SCRIPT.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-04-19 16:55:13 +00:00
Dominik Ermel d3e7adc7da tests/flash/common: Disable soc flash for SPI with nrf52840dk
The commit sets CONFIG_SOC_NRF_FLASH=n for SPI/QSPI Flash tests
as building internal Flash driver is not needed in these
scenarios.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Dominik Ermel 30f6740512 tests/flash/common: Missing CONFIG_FLASH_PAGE_LAYOUT=y
Test depends on this option to get page information from
device.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Dominik Ermel a7909bc596 drivers/flash/nordic_qspi_nor: Add missing FLASH_HAS_PAGE_LAYOUT
The Kconfig for device has not been missing the FLASH_HAS_PAGE_LAYOUT.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-04-19 16:55:01 +00:00
Krzysztof Chruściński 8e65ed94cb tests: drivers: uart: uart_pm: Add support for nrf54h20dk
Add configuration for nrf54h20dk.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński c72b6a75ba tests: drivers: uart: uart_pm: Limit scope for nrf54l15
Some configurations which are not valid for nrf54l15. Mainly those
which are using ENHANCED_POLL_OUT option which is not applicable for
nrf54l15 because it has ENDTX_STOPTX short so PPI connection is not
needed.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński 3424c7af7f tests: drivers: uart: uart_pm: Minor adjustments in the test
Modifying arbitrary delay to cover for receivers with timeout.
Adding a delay between polling and asynchronous checking to cover
for cases when CPU processing is fast enough so that both checks
may overlap.
Allow error code for uart_rx_disable call.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00
Krzysztof Chruściński a0bb05eb4c tests: drivers: uart: uart_pm: Call pm action from the thread context
PM action shall be called from the thread context thus switching to
k_work instead of the k_timer.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-19 16:41:24 +00:00