Commit Graph

91153 Commits

Author SHA1 Message Date
Gaetan Perrot 3409d0ab27 doc: posix: mark sched_getscheduler and getparam as supported
`sched_getscheduler()` and `sched_getparam()`
is now implemented, mark it so.
Was missing on the documentation before.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-02 17:07:08 -05:00
Jacob Siverskog 031f84dff5 manifest: bump hal_nxp revision
this brings in a newer version of the usb middleware.

see https://github.com/zephyrproject-rtos/hal_nxp/pull/316 for more
information.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2024-02-02 22:36:10 +01:00
Manuel Schappacher b5bf5a3cef net: gptp: Use local port identity when forwarding sync messages
As defined in IEEE802.1AS-2020 ch. 10.2.12.2.1, the port identity
of an MDSyncSend structure sent from a port shall be set to the
port identity of the sending port according to and ch. 8.5.2.

This commit replaces the port identity before forwarding a sync.

Fixes #68385

Signed-off-by: Manuel Schappacher <manuel.schappacher@hs-offenburg.de>
2024-02-02 22:35:20 +01:00
Guilherme Casa Nova 583f24e7e8 i2c_mcux_flexcomm: add transaction timeout option
With the device_sync_sem semaphore, there is the possibility of
the code not returning to give it back
(mcux_flexcomm_master_transfer_callback is never called),
causing it to get stuck in k_sem_take(&data->device_sync_sem, K_FOREVER)
in subsequent calls.

The i2c driver recovers by other means
(enabling FSL_FEATURE_I2C_TIMEOUT_RECOVERY)
but the callback might not return.

Adding a timeout option allows for this occurrence to be avoided.

Signed-off-by: Guilherme Casa Nova <guilherme.casa_nova@dell.com>
2024-02-02 15:24:26 -06:00
Daniel DeGrasse 9001512e1f dts: arm: nxp: nxp_rt1010: provide flexspi clock source
Add FlexSPI clock source to RT1010 devicetree definition for FlexSPI
node, to match FlexSPI clock source defined on standard FlexSPI dt node
that is removed in the RT1010 devicetree.

Fixes #68488

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 13:49:48 -06:00
Robert Lubos c6f2f2cf53 tests: net: ip-addr: Fix compiler warning
Building with Zephyr SDK 0.16.5 revealed a minor bug with the buffer
size provided to snprintk():
  specified bound 38 exceeds destination size 20 [-Wstringop-overflow=]

As we provide the buffer to snprintk() with an offset, the actual
buffer size should be reduced by that offset value.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 19:54:52 +01:00
Abderrahmane Jarmouni 32fd2f57b1 drivers: display: stm32_ltdc: fix for stm32f429i_disc1
Display is not working on STM32F429i-DISC1 board because
display_blanking_off() needs to be sent to ILI9341 device, but it's sent
to LTDC instead which does not implement it.
This patch adds a LTDC DT property that provides the pHandle of the
display's own controller so that display_blanking_off/on are forwarded to
it when they are called by an application.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-02-02 19:54:45 +01:00
Keith Packard c4d05b5f9e tests/c_lib: Remove define of _POSIX_C_SOURCE for newlib
This test does not use any APIs beyond those provided in the Zephyr
standard set, so it should not define _POSIX_C_SOURCE.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-02-02 19:54:33 +01:00
Keith Packard e569a13d39 libc/newlib: Wrap <string.h> to define strnlen and strtok_r when needed
Newlib doesn't have Zephyr support, so we need to define these functions
when the application doesn't ask for the right level of POSIX support.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-02-02 19:54:33 +01:00
Jamie McCrae 1a7fb576e7 doc: release: 3.6: Add deprecation note for build type
Adds a note that build type has been deprecated in favour of
file suffix

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae 0f94e5eab9 doc: release: 3.6: Add note on FILE_SUFFIX support
Adds a note with a link to the documentation pages for this
new feature

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae 425ef8abd3 doc: Add documentation on FILE_SUFFIX build variable
Adds details to the application development page and sysbuild
page documenting the variable, how it works and how it should
be used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae 5bf056046a cmake: modules: extensions: Deprecate build type
Adds a deprecation notice if a file is found which has the build
type informing the user of the replacement

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae f7f320c494 sysbuild: Add support for FILE_SUFFIX
Adds supports for sysbuild loading project-specific Kconfiguration
fragments that are suffixed with the user-provided value

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae ef251048e4 cmake: Add support for file suffixes
Adds support for configuration files to use file suffixes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Jamie McCrae 5b6c585673 cmake: Add function for file suffix checking/appending
Adds a function that can be used to check if a file suffix is
supplied and, if so, will update a variable with these filenames

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Torsten Rasmussen 3eaab029ec cmake: extend zephyr_file(CONF_FILES ...) to take NAMES as argument
Extend zephyr_file(CONF_FILES ...) to take a NAMES list of file names
to find instead of creating file names based on board and revision.

This allows to unify lookup prj.conf and <board>/app.overlay for
application, as well as pave the way for future enhancements to
configuration file handling.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-02-02 19:54:21 +01:00
Radoslaw Koppel 53becb05bf tests: kernel: common: Enable tests with LTO
This commit enables some kernel tests with
Link Time Optimization enabled.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 26c8776c70 buildsystem: Add an option to enable LTO
This commit adds option to enable Link Time Optimization.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 3799b93689 tests: kernel: gen_isr_table: Add tests for local ISR tables declaration
This commit adds configurations to test local ISR tables declaration.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 8f98b8b574 bluetooth: nordic: lll: Use direct ISR when applicable
This commit updates nordic lll controller to use
IRQ_DIRECT_CONNECT where applicable instead of
using IRQ_CONNECT with ISR_FLAG_DIRECT.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 664319f9ef arch: arm: Upgrade IDT_LIST memory section size
Make IDT_LIST section bigger to fit bigger interrupt description.
Note: This section would be removed from final build.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 1ff24b34eb arch: arm: Update to support local ISR declaration
This commit updates the arm and arm64 architecture files
to support the new ISR handlers creation parser.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 8174c7e049 arch: irq: Use Z_ISR_DECLARE_DIRECT for direct ISR declaration.
This commit changes the way how ARCH_IRQ_DIRECT_CONNECT is defined.
Now it uses Z_ISR_DECLARE_DIRECT internally.
That is a requirement for local isr declaration.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 19bb21ef6d doc: kernel: interrupts: Description of the local isr declaration
This commit adds a documentation about the new parser of the
interrupt vectors tables that is using linker to construct
the arrays with all the runtime required data.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 13638a0351 arch: sw_isr_table: Implement local interrupt table entry creation
This commit implements the possibility to locally create an interrupt
table entry. This changes the way interrput table is created,
now it should not be created as an source file but rather it would be
constructed by the linker.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 0ae48ecb58 scripts: build: gen_isr_tables: Implement local ISR generation
This commit moves all the functionality related to the current
interrupt parser into gen_isr_tables_parser_carrays.py file.
The new parser file gen_isr_tables_parser_local.py file is
implemented with the new parser that.
Additional information added to the generated interrupt header
that contains data required by the new parser.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel b0c83f328c arch: sw_isr_table: Update shared interrupts structures
This commit updates the definition of z_shared_isr_table_entry
to use _isr_table_entry instead of specially created z_shared_isr_client.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 568cced14f scripts: gen_isr_tables: Break code into classes
This commit breaks the code into functional classes.
This way the functionality is visibly splitted into
functional parts and it is easier to replace the
specific parser part to implement new code generators.

There is also common functionality to handle multi level interrupts
moved to configuration class.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 4360acb27e scripts: gen_isr_tables: Code cleanup
This commit cleans up the gen_isr_tables code for better clarity
and easier modification.
Changes include:
- Separate functions to load intList section.
- Replace spurious handlers in internal data with None.
  Now it is the output generator work to choose right function.
- All the work to generate vt and swt separated into its own functions.
- Remove the need for internal shared array - all the information
  is here in swt array.
- The update_masks function - more functionality moved here.
- Simplify bit_mask function.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Radoslaw Koppel 717c5835d6 arch: isr_tables: Add __used attribute to int_list_header
This commit adds missing __used attribute it int_list_header,
preventing it from being optimized out.

Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
2024-02-02 19:49:36 +01:00
Tom Burdick 84e883b611 llext: Support memory protection
Sets up memory partitions and allows for the partitions to be added to a
memory domain after loading an extension. This allows for applying
memory protection attributes to all of the needed memory regions an
extension requires to execute code correctly.

Currently only works when usermode is enabled as otherwise memory
protection APIs are unavailable.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-02-02 13:06:28 -05:00
Tom Burdick 172bc0c238 llext: Remove automatic include
clangd like to automatically add include directives, this one slipped by
and made its way in the tree. Remove it.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-02-02 13:06:28 -05:00
Daniel DeGrasse b6feb567d1 drivers: display: ili9xxx: do not delay for reset unless supported
Check the return code of mipi_dbi_reset, and do not delay for the reset
wait time unless the mipi controller has issued a hardware reset to the
display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse 5b767a0dd2 drvers: display: ili9xxx: fix usage of MIPI buffer descriptor
Fix usage of MIPI buffer descriptor in ili9xxx driver. Previously, the
buffer descriptor size was being set to display buffer size. For cases
where the write height/width  was not equal to the size of the buffer, this
resulted in additional data being written that was not needed. To
resolve this, calculate the mipi descriptor buffer size in the driver

Also, remove the unconditional setting of mipi_desc.height, as this
would override the previous (correct) setting.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Daniel DeGrasse f81ca136fe drivers: mipi_dbi: clarify write size for mipi_write_display
Clarify write size used by mipi_write_display, so that implementers of
MIPI drivers know to use the buf_size field of the display buffer
descriptor to determine write size.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-02 11:52:17 -06:00
Jukka Rissanen aa546baf44 tests: net: sockets: udp: Add recvmsg test for checking msg_controllen
Make sure that msg_controllen is cleared if there is no
control data received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-02 11:51:53 -06:00
Jukka Rissanen 692ebf404c net: sockets: Update msg_controllen in recvmsg properly
If recvmsg() does not update control data, then it must
set msg_controllen length to 0 so that the caller can
understand this.

Fixes #68352

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-02 11:51:53 -06:00
Armando Visconti 12017b8481 drivers/sensor: lps2xdf: Fix uninitialized variables
Fix some uninitialized variables calling the proper get()
routine prior the equivalent set() operation.

Fixes: #66791, #66778, #66772.
Coverity-CID: 338119, 338144, 338157.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-02-02 10:53:32 -06:00
Grzegorz Chwierut 8f18094c62 twister: pytest: Fix shell fixture
On the hardware, after booting up the device, on the
console might appear additional logs after receiving first
prompt. Wait and clear the buffer to avoid unexpected
messages when verifying output.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2024-02-02 10:52:46 -06:00
Juliane Schulze 34cb22e919 sensors: Add driver for Vischay VCNL36825T Proximity Sensor
Driver for the Vishay VCNL36825T including power management support.

Signed-off-by: Juliane Schulze <juliane.schulze@deveritec.com>
2024-02-02 10:51:10 -06:00
Robert Lubos 68bc981c52 net: zperf: Fix session leak
In case zperf session was aborted by the user (by for instance stopping
it from shell), or practically in case of any other
communication-related error, the zperf session could end up in a state
other than NULL or COMPLETED, with no way to recover. This made the
session no longer usable and eventually could lead to zperf being not
able to start a new session anymore.

Fix this by introducing zperf_session_reset() function, which resets the
session state back to defaults. The function is called when the zperf
receiver service is stopped.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Robert Lubos 4ce0352026 net: zperf: Fix TCP receiver start/stop operation
The issues found for UDP receiver were also identified for TCP receiver,
this commit applies practically the same set of changes as in case of
UDP.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Robert Lubos 139bc4e87e net: zperf: Fix UDP receiver start/stop operation
This commit fixes restarting of UDP receiver service, along with some
other minor cleanups:

* The core issue was udp_server_running flag not being cleared when
  service was stopped. Fix this by introducing udp_receiver_cleanup()
  which does all of the required cleanups when receiver service is
  stopped. The function is called either when the application stopped
  the service with zperf_udp_download_stop(), or when the service was
  stopped due to error.
* net_socket_service_unregister() was not called on
  zperf_udp_download_stop(), but only from the service callback - that
  would not work in case there's no active communication.
* at the same time, net_socket_service_unregister() would be called from
  the service callback in case of errors. Fix this, by making
  udp_recv_data() only return an error, and let the service callback to
  do the cleanup.
* Remove no longer used udp_server_run semaphore
* Remove udp_server_stop - with socket services it seems no longer
  needed.
* zperf_udp_receiver_init() now returns an error, so that we don't
  mark the service as running in case of socket/services error.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-02-02 10:31:53 -06:00
Jamie McCrae 1c70041dcb doc: develop: west: sign: Add details on signing
Adds details on how to do signing using sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
Jamie McCrae 605c854369 doc: release: 3.6: Add note on signing script addition
Adds a note about how the signing script can be set

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
Jamie McCrae d676234493 cmake: Add support for sysbuild-set signing script
Allows a sysbuild project to specify a signing script file to
use instead of the default zephyr one

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-02-02 10:08:27 -06:00
John Johnson 125a2bccaa net: net_pkt: add peer sockaddr member in net_pkt struct
Add sockaddr member in struct net_pkt to store peer address if offloaded
network inteface is used. This enables recvfrom() to fill in src_addr if
socket type is UDP and offloaded interface driver supports it.

Signed-off-by: John Johnson <john.filip.johnson@gmail.com>
2024-02-02 09:42:18 -06:00
Lars Knudsen c460d285c0 MAINTAINERS: Add pin-zephyr to Bluetooth Audio
Ping is collaborating on Bluetooth Audio

and is attending the weekly LE Audio Zephyr meetings

Signed-off-by: Lars Knudsen <larsgk@gmail.com>
2024-02-02 09:41:10 -06:00
Gerard Marull-Paretas 117194ae22 boards: riscv: add nrf54h20pdk_nrf54h20_cpuppr
Add a board that allows to build for the nRF54H20 PPR RISC-V core.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-02-02 16:40:11 +01:00