Commit Graph

105337 Commits

Author SHA1 Message Date
Yves Vandervennet 7b29b66bd5 west: linkserver: change the default port number for semihost
LinkServer manages port numbers for gdb and semihost as separate linear
sequences when invoked to debug multi-core applications, e.g the
gdb-server instance for cpu0 will have the default GDB port 3333 and the
next gdb-server instance will be assigned the port 3334. The latter will
conflict with the default port for semihost which is 3334.

This patch changes the default port for semihost to 8888.
Port numbers can be changed when invoking the linkserver runner.

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:55:34 -05:00
Marcin Szymczyk 26973bd054 snippets: nordic-*: support custom boards
Apply overlays for custom boards, based on already supported SoCs.

Fixes #77639.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-11-16 15:55:27 -05:00
James Roy 28238d03ad devicetree: Add DT_HAS_ALIAS macro
Add 'DT_HAS_ALIAS' macro to verify node alias existence.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-11-16 15:55:10 -05:00
Aleksander Wasaznik 3734268f90 Bluetooth: host: Remove useless alloc_buf_cb in test
The alloc_buf callback is not used when `seg_recv` is set, so it is
never called in this test. Remove it.

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2024-11-16 15:55:02 -05:00
Corey Wharton 76bceb9ed2 kernel: mem_slab: always validate memory address on free
Allowing an invalid address to be "freed" when asserts are disabled
is dangerous and can lead to a very hard class of bugs (and potential
security issues) to troubleshoot. This change always validates the
address before adding it to the free list and calls k_panic() if
asserts are not enabled.

Signed-off-by: Corey Wharton <xodus7@cwharton.com>
2024-11-16 15:54:56 -05:00
Ioannis Damigos e330b55f81 soc/da1469x: Update sys_arch_reboot() function
Update sys_arch_reboot() function

Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
2024-11-16 15:54:45 -05:00
Daniel Leung a6c1f80f46 tests: benchmarks/latency: limit CPU to 1 for Intel ADSP ACE
Due to addition of busy threads running on other cores, and
the simulator runs in single thread bouncing through all cores,
we are wasting quite a bit of time just busy waiting. This makes
each simulator run too long for CI. So limit CPU number to 1.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-11-16 15:54:36 -05:00
Alexander Kozhinov e68c7f2f73 boards: arm: nucleo_h745zi_q
add fdcan1, fdcan2 and usb_fs DT configurations

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2024-11-16 15:54:27 -05:00
Torsten Rasmussen cc488787ea cmake: source dedicated linker library properties for native builds
Native builds uses system libraries per default.
Instead of handling this in each linker_libraries.cmake files, then the
check for native build is moved one level up and for native build a
dedicated linker_libraries_native.cmake is sourced.

This simplifies the linker_libraries.cmake files as they no longer need
to check for native builds.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-11-16 15:28:20 -05:00
Torsten Rasmussen d2896df821 cmake: set minimal C++ linker properties in minimal C++ CMake impl
The property based toolchain integration allows a cleaner design by
letting the toolchain define its properties and values and let CMake
implementation of Zephyr provided C and C++ libraries adjust those
properties when minimal C or C++ libraries are used.

This commit moves handling of C++ linker library properties into
the minimal C++ CMake implementation.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-11-16 15:28:20 -05:00
Guennadi Liakhovetski 44d96a2668 LLEXT: add llext_section_offset() to replace llext_find_section()
Now that section header cache is persistent, it can be used for
finding sections. Add a new function, similar to llext_find_section()
to use it and deprecate llext_find_section().

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski c714f0e148 LLEXT: preserve section headers
Move cached section headers to struct llext from struct llext_loader
to preserve them after llext_load() returns.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski e2d8daae16 LLEXT: Xtensa: add a Kconfig option to enable -fPIC
Currently when building LLEXT for Xtensa we use the -fPIC compiler
option, but this cannot be used when using detached sections in
extensions. Add a Kconfig option to switch between the two
compilation modes and switch -fPIC off when building relocatable
(partially linked) ELF binaries.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski 4f0cb90c59 LLEXT: fix advanced uses of detached sections
When detached sections are used, STB_GLOBAL relocations also have to
be processed depending on the relocation type. This commit unified
STB_GLOBAL and STB_LOCAL flows by making them use the same relocation
type parser, adds support for R_XTENSA_GLOB_DAT and R_XTENSA_JMP_SLOT
type relocations on Xtensa and fixes STT_SECTION address calculation
for such sections.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski 2b3666109e LLEXT: fix detached section cache synchronisation
Detached sections are used in situ without being copied to or
referenced from ext->mem[] LLEXT region arrays. Their caches must be
synchronised accordingly.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski ce32eea24a LLEXT: Xtensa: fix logging level
Use the same logging level as in the rest of LLEXT.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Guennadi Liakhovetski ec02b815a7 LLEXT: (cosmetic) reduce the scope of a variable
Move a variable calculation inside the block, where it is actually
used.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-11-16 15:28:00 -05:00
Lukasz Majewski 835cbad6cc drivers: ethernet: lan865x: Avoid writing PLCA node count when nodeID not 0
The newest AN1760 application note - Revision F (DS60001760G - June 2024)
is recommending to not write the node count to PLCA_CTRL1 register when
the node is not the PLCA coordinator (i.e. its ID is not zero).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-11-16 15:27:45 -05:00
Lukasz Majewski 3ea491cb1c drivers: ethernet: lan865x: Update initial setup guidelines (from AN1760)
This patch brings update of the procedure to initially configure the
LAN865x devices. It follows setup guidelines from newest AN1760 [*].

The values from "TABLE1" on the [*] must be written to the device in the
indicated order with recommended values.

This was not the case previously, as first values from in-flash allocated
(const) table were written and only afterwards calculated configuration
parameters (cfgparams) were updated.

With this patch the lan865x_conf[] table is allocated in-RAM, so
placeholder values can be updated and it can be written at once at the
end of configuration process.
Its single entry has been reduced from 8B to only 4B. Moreover, moving
it out of flash saves 512B of flash memory.

Note:
[*] - AN1760 Revision F (DS60001760G - June 2024)

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-11-16 15:27:45 -05:00
Yves Vandervennet 04dee0025f boards: frdm_k22f: enable linkserver`
- add linkserver arguments in board.cmake
 - update documentation

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:27:39 -05:00
Jamie McCrae 0c7433dcaa boards: Remove PINCTRL from some boards
Removes lines from defconfig files having PINCTRL in them

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 15:27:31 -05:00
Andries Kruithof f1f78682d9 Bluetooth: Audio: API for the distribute broadcast code procedure
Define the API for the distribute broadcast code CAP procedure

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-11-16 15:27:10 -05:00
Adam Cavender a68a0a4a5b bluetooth: host: Update FAE table type for HCI commands
Update FAE table type from array of uint8_t to int8_t. From Vol 6.0,
Part B, section 2.4.2.52: "The ChFAE field contains the per-channel
mode-0 FAE table of the local Controller. Every per-channel mode-0
FAE value is represented by an 8-bit signed integer"

Signed-off-by: Adam Cavender <adam.cavender@nordicsemi.no>
2024-11-16 15:27:04 -05:00
Fin Maaß fbea2ceba3 samples: net: cloud: aws_iot_mqtt: remove redundant kconfig
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR is on
by default, if the device supports that, so there is no need
to enable it explicit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Fin Maaß 3231b993ae samples: net: cloud: aws_iot_mqtt: use auto init
use auto init for networking, dhcp and sntp.
This simplifys the code of this sample by using the
auto init feature of the networking stack.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-11-16 15:26:57 -05:00
Fabio Baltieri d6013e7044 input: it8xxx2_kbd: add a kso-ignore-mask property
The it8xxx2_kbd KSO pins can be used as both keyboard scan and GPIO. By
default the keyboard scanning driver controls the output level of all
the KSO signals from 0 to (col-size - 1), meaning that any line in
between used as GPIO is going to have its output value overridden.

Add a kso-ignore-mask property to the keyboard scan driver to allow
specifiying extra pins that should not be controlled by the driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-11-16 15:26:49 -05:00
Noemie Gillet 4355d07fcd test: posix: timer: fix format
change { 0 } to {0}

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Noemie Gillet cbec9a342b test: posix: add test_one_shot__SIGEV_SIGNAL testcase
increase test coverage for newly added code

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Noemie Gillet a214ddb2c9 posix: fix one-time timer for SIGEV_SIGNAL
For SIGEV_SIGNAL, the function zephyr_timer_wrapper() is the handler
between kernel and posix layer.
Here, for one-time timer, reload is equal to 0 and function returns.
As a consequence, handler function was never called.

Signed-off-by: Noemie Gillet <ngillet@sequans.com>
2024-11-16 15:26:42 -05:00
Ryan McClelland 37784442f8 tests: drivers: build_all: uart: add uart interrupt driven
Add CONFIG_UART_INTERRUPT_DRIVEN for building the uart driver

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-16 15:26:24 -05:00
Ryan McClelland 36772a8889 drivers: serial: cdns: fix interrupt driven uart
The tx fifo empty interrupt is a edge driven interrupt, so if it
is already empty then and the interrupt is enabled, it will not
fire so the isr needs to be triggered manually for the callback.

This also removes the unnecessary interrupt locking in the isr and
removes the receiver timeout interrupt.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2024-11-16 15:26:24 -05:00
Pisit Sawangvonganan df24d0114c drivers: can: sja1000: reduce number of `frame->id` pointer dereferences
Refined `can_sja1000_read_frame` and `can_sja1000_write_frame` by
reducing `frame->id` pointer dereferences.
Using a local `id` variable aims to improve efficiency, given
the frequent execution of this code in CAN applications.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-11-16 15:25:55 -05:00
Emil Gydesen f9b5de2d0a tests: Bluetooth: Tester: Set conn = NULL in btp_gap
bt_conn_le_create logs an error if the provided conn is
not NULL. This small change cleans up the log a bit to
avoid the warning.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:25:41 -05:00
Andrej Butok 92273c5754 samples: smp_svr: add common sysbuild true
Adds sysbuild: true to the common section,
to build the project using sysbuild.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-11-16 15:25:03 -05:00
Emil Gydesen 75f5f71200 tests: Bluetooth: Tester: Redefine service IDs as hex
Everything else is defined as hex, so it makes sense to
be consistent. This will also make it easier to find the
service IDs in the logs that primarily already log
commands and events as hex.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:24:08 -05:00
Emil Gydesen 9a5fa367ba tests: Bluetooth: Tester: Format BTP cmd/evt/rsp logs as hex
Since the values are defined as hex, e.g. 0x82, it is easier
to compare with the log if they also log them as such.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-11-16 15:24:08 -05:00
Ian Morris 44477ad732 drivers: serial: fix renesas ra8 sci_b uart hardware flow control enable
Fixed typo in Renesas RA8 SCI_B UART configuration that was preventing
hardware flow control from being enabled.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2024-11-16 15:23:24 -05:00
Chris Friedt 9504034733 sys: util: use BITS_PER_BYTE macro instead of the magic number 8
Obviously, everyone knows that there are 8 bits per byte, so
there isn't a lot of magic happening, per se, but it's also
helpful to clearly denote where the magic number 8 is referring
to the number of bits in a byte.

Occasionally, 8 will refer to a field size or offset in a
structure, MMR, or word. Occasionally, the number 8 will refer
to the number of bytes in a 64-bit value (which should probably
be replaced with `sizeof(uint64_t)`).

For converting bits to bytes, or vice-versa, let's use
`BITS_PER_BYTE` for clarity (or other appropriate `BITS_PER_*`
macros).

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-11-16 15:22:35 -05:00
Jilay Pandya 5032d8ede8 drivers: stepper: add common helper header for tmc5xxx functions
This commit adds a common helper header for tmc5xxx driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-11-16 15:22:24 -05:00
Henrik Brix Andersen 3825c852e8 boards: fysetc: add FYSETC UCAN USB to CAN 2.0B adapter board
Add support for the open-source FYSETC UCAN USB to CAN 2.0B board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-16 15:22:10 -05:00
Henrik Brix Andersen 7f5351bc45 dts: bindings: vendor-prefixes: add fysetc
Add Shenzhen Fuyuansheng Electronic Technology Co., Ltd. devicetree vendor
prefix (https://www.fysetc.com/).

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-11-16 15:22:10 -05:00
Adrian Gielniewski 9fd9e231df net: openthread: Add platform message management
* Add CONFIG_OPENTHREAD_PLATFORM_MESSAGE_MANAGEMENT to allow enabling
message management by the platform.
* Add implementation of `otPlatMessagePoolInit`, `otPlatMessagePoolNew`
and `otPlatMessagePoolFree`.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
2024-11-16 15:21:20 -05:00
Gerard Marull-Paretas a706461ea9 snippets: add serial-console
Add a new snippet to enable serial console. Even though most Zephyr
boards enable this by default, the same is not true for many real
boards, where enabling UART can increase power consumption. Having
this snippet may become handy on such scenarios. We could also
consider cleaning up upstream boards by just enabling this snippet
by default.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:14 -05:00
Gerard Marull-Paretas 40a73ec96e snippets: rtt-console: fix README issues
- Title underline too long
- Remove redundant how-to-use snippet bit, this can be documented
  generically for all snippets instead of repeating it everywhere.
- Snippet does not redirect anything.
- RTT does not require HW support for console.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:00 -05:00
Gerard Marull-Paretas ce4ce9986a snippets: rtt-console: do not disable SERIAL
There's no point in disabling serial when enabling RTT. They are
not incompatible between each other.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-11-16 15:21:00 -05:00
Ren Chen 06f4213e6b driver: spi: support it8xxx2 spi driver
This commit adds the it8xxx2 spi driver support.

Tested with:
- west build -p always -b it8xxx2_evb samples/drivers/spi_flash

Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
2024-11-16 15:20:51 -05:00
Neil Chen 02027365f1 boards: nxp/frdm_mcxn236: Support MRT for NXP frdm_mcxn236 board
Enabled the MRT at the board level for mcxn236.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 15:20:31 -05:00
Neil Chen 7e1f754f02 dts: arm/nxp: Add mrt nodes to NXP MCXN23x dtsi file
Add mrt nodes to NXP MCXN23x dtsi file

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-11-16 15:20:31 -05:00
Yishai Jaffe b44ab89c4c samples: sensor: die temperature polling: remove redundant configuration
rpi_pico.conf only adds CONFIG_ADC=y which already exists in the
prj.conf so it's redundant and can be removed.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-11-16 15:20:24 -05:00
Tom Burdick 2b5012a5d9 kernel: Move run queue initialization
Move the initialization of the priority q for running out of sched.c to
remove one more ifdef from sched.c. No change in functionality but
better matches the rest of sched.c and priority_q.h such that the
ifdefry needed is done in in priority_q.h.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-11-16 15:20:15 -05:00