Commit Graph

105349 Commits

Author SHA1 Message Date
Aaron Ye f7b2638165 soc: ambiq: enable the TPIU clock source
This commit enables the TPIU clock source in Apollo3 and
Apollo4 soc initialization if LOG_BACKEND_SWO is used.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Aaron Ye fe3c0ecb53 boards: ambiq: enable the ITM in Ambiq boards
This commit defines the default pinctrl of ITM for Apollo3 and
Apollo4 EVB. Also configures the default SWO frequency.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Aaron Ye 390f8329b4 dts: arm: ambiq: add ITM node for Apollo series
This commit adds the ITM node for Ambiq Apollo3 and Apollo4
series devicetree.

Signed-off-by: Aaron Ye <aye@ambiq.com>
2024-11-16 15:56:49 -05:00
Jonathon Penix 2493123758 cmake: lld: Remove duplicate -fuse-ld=lld
-fuse-ld=lld is currently specified twice through the baremetal property
(in cmake/linker/lld/linker_flags.cmake) and TOOLCHAIN_LD_FLAGS (in
cmake/linker/lld/target.cmake). This doesn't really harm anything as
it isn't duplicated on the link line (and specifying it multiple times
wouldn't hurt even if it was), but it also doesn't really help anything.

-fuse-ld isn't baremetal-specific and setting it via TOOLCHAIN_LD_FLAGS
will cover this case anyway, so remove this duplicate.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-11-16 15:56:42 -05:00
Sudan Landge c99243c8ce arch: arm: cleanup of soc flags in arch
What is changed?

Use CMSIS SystemCoreClock via a dedicated flag instead of using
soc flags.

Why do we need this change?

This change is part of cleaning soc specific code out of arch folder.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2024-11-16 15:56:11 -05:00
Bjarki Arge Andreasen 14117b453d pm: policy: separate default policy and events
The default policy currently directly references the private
variable next_event from policy_events.c to then convert the cycle
of said event (if exists) to a kernel tick in the future, something
policy_events.c already implements and exposes through
pm_policy_next_event_ticks().

Additionally, the implementation of pm_policy_next_state() in
policy_default.c already gets the nearest kernel tick, wherein
the next event has already been accounted for in, see
implementation of pm_system_suspend().

This commit removes the redundant and layer violating computation
if the tick of the next event from policy_default.c and updates
the test test_pm_policy_events to not use default policy to
determine if pm_policy_next_event_ticks() is correct.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-11-16 15:56:02 -05:00
Jukka Rissanen 8070e7ca6d tests: net: conn_mgr_monitor: Increase the sleep between states
The short sleep (10ms) was not enough any more. Increase the sleep
to 100ms so that system stabilizes between checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen 185269d86e net: shell: ipv6: Print information about SLAAC addresses
Print information in "net ipv6" command how the SLAAC addresses
are generated. There is the default legacy EUI-64 method (RFC 4862) or
the stable method described in RFC 7217.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen 3a5c6c54c1 tests: net: ipv6: Add tests for stable IIDs
Add tests that verify that stable IIDs generate a proper IPv6
interface identifier described in RFC 7217.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jukka Rissanen 94177a200e net: ipv6: Add support for stable IID addresses
This implements support for RFC 7217 which describes a method
to have stable IPv6 Interface Identifiers to be used with IPv6
Stateless Address Autoconfiguration (SLAAC). The stable IIDs are used
to provide enhanced privacy so that an IPv6 address configured using
this method is stable within each subnet, but the corresponding
Interface Identifier changes when the host moves from one network
to another. This method is meant to be an alternative to generating
Interface Identifiers based on hardware (MAC) addresses,
such that the benefits of stable addresses can be achieved without
sacrificing the security and privacy of users.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-16 15:55:49 -05:00
Jamie McCrae c9f3690ed4 kconfig: Remove deprecated option BOOTLOADER_SRAM_SIZE
Removes BOOTLOADER_SRAM_SIZE which was deprecated with Zephyr 3.6

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-16 15:55:42 -05:00
Yves Vandervennet 11f18c7340 boards: lpcxpresso55s69: enable multicore debugging
- Refactoring of the cmake code so LinkServer can be invoked with the
correct switches.
 - Documentation update

Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
2024-11-16 15:55:34 -05:00
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